|
|
@@ -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;
|