彭俊 6 年 前
コミット
7d5cf0c0b1
1 ファイル変更3 行追加3 行削除
  1. 3 3
      app/Models/Comendnotice.php

+ 3 - 3
app/Models/Comendnotice.php

@@ -26,7 +26,7 @@ class Comendnotice extends BaseModel
         $data = $this->where(['match_id' => $match_id, 'game_code' => $type])->first();
         if (!$data) {
             $insertArr = ['game_code' => $type, 'status' => 0, 'pcount' => $pcount, 'match_id' => $match_id, 'ctime' => date('Y-m-d H:i:s')];
-            if($game_start_time){
+            if ($game_start_time) {
                 $insertArr['game_start_time'] = $game_start_time;
             }
             $res = $this->insert($insertArr);
@@ -41,9 +41,9 @@ class Comendnotice extends BaseModel
     public function getNeedSettelent()
     {
         $lastDay = date("Y-m-d H:i:s", time() - 86400 * 30);
-        $now = date("Y-m-d H:i:s", time() - 5 * 36000);
+        $now = date("Y-m-d H:i:s", time() - 5 * 3600);
 
-        $model = $this->where([['game_start_time', '<=', $now], ['game_start_time', '>=', $lastDay], ['ctime', '>=', $lastDay], ['pcount', '=', 0]])->orderBy('game_start_time', 'desc')->first();
+        $model = $this->where([['game_start_time', '<=', $now], ['game_start_time', '>=', $lastDay], ['pcount', '=', 0]])->orderBy('game_start_time', 'desc')->first();
         return $model;
     }