彭俊 6 роки тому
батько
коміт
9ace26a57c
2 змінених файлів з 5 додано та 3 видалено
  1. 2 2
      app/Lib/Settlement/SettlementAuto.php
  2. 3 1
      app/Models/Comendnotice.php

+ 2 - 2
app/Lib/Settlement/SettlementAuto.php

@@ -38,7 +38,7 @@ class SettlementAuto
         if (empty($model)) {
             return 0;
         }
-        Common::SET_NOMAM_RECORD('开始自动结算! ' . $model->match_id);
+        Common::SET_NOMAM_RECORD('开始自动结算! ', ['id' => $model->id, 'match_id' => $model->match_id]);
 
         $model->pcount = 1;
         $model->start_time = date('Y-m-d H:i:s', time());
@@ -51,7 +51,7 @@ class SettlementAuto
             $model->status = 4;
             $model->save();
             $this->cgStatus($model->game_code, $model->match_id);
-            Common::SET_NOMAM_RECORD('结束自动结算(无match记录)! ' . $model->match_id);
+            Common::SET_NOMAM_RECORD('结束自动结算(无match记录)! ', ['id' => $model->id, 'match_id' => $model->match_id]);
             return 0;
         }
 

+ 3 - 1
app/Models/Comendnotice.php

@@ -10,6 +10,7 @@ namespace App\Models;
 
 use DB;
 use App\Models\MoneyBuyMatch as MoneyBuyMatchModel;
+use App\Lib\Biz\Sport\Common;
 
 
 class Comendnotice extends BaseModel
@@ -38,7 +39,7 @@ class Comendnotice extends BaseModel
         $lastDay = date("Y-m-d H:i:s", time() - 86400 * 30);
         $now = date("Y-m-d H:i:s", time() - 5 * 36000);
 
-        $model = $this->where([['game_start_time', '>=', $now], ['ctime', '>=', $lastDay], ['pcount', '=', 0]])->orderBy('id', 'asc')->first();
+        $model = $this->where([['game_start_time', '<=', $now], ['game_start_time', '>=', $lastDay], ['ctime', '>=', $lastDay], ['pcount', '=', 0]])->orderBy('game_start_time', 'asc')->first();
         return $model;
     }
 
@@ -49,6 +50,7 @@ class Comendnotice extends BaseModel
         foreach ($types as $gtype) {
             $rows = $this->findByType($gtype, $day);
             if (!empty($rows) && count($rows) > 0) {
+                Common::SET_NOMAM_RECORD('自动结算之添加通知消息!', ['count' => count($rows)]);
                 foreach ($rows as $matchidObj) {
                     $matchid = $matchidObj->match_id;
                     $start_time = $matchidObj->start_time;