|
@@ -115,7 +115,7 @@ class Sport extends Command
|
|
|
$sport_locked = Config::where('field', 'sport_locked')->first()->val ?? 1;
|
|
$sport_locked = Config::where('field', 'sport_locked')->first()->val ?? 1;
|
|
|
|
|
|
|
|
// 比赛开始后,状态还是未开始的数据检测
|
|
// 比赛开始后,状态还是未开始的数据检测
|
|
|
- $ids = SportModel::where('status', 1)->where('state', 0)->where('game_time', '<=', time())->pluck('data_id')->toArray();
|
|
|
|
|
|
|
+ $ids = SportModel::where('state', 0)->where('game_time', '<=', time())->pluck('data_id')->toArray();
|
|
|
if ($ids) {
|
|
if ($ids) {
|
|
|
$ids = implode('-', $ids);
|
|
$ids = implode('-', $ids);
|
|
|
$data = SportClientService::fixtures(['ids' => $ids]);
|
|
$data = SportClientService::fixtures(['ids' => $ids]);
|
|
@@ -135,7 +135,7 @@ class Sport extends Command
|
|
|
|
|
|
|
|
//2. 比赛进行中,超过3分钟未更新的数据检测
|
|
//2. 比赛进行中,超过3分钟未更新的数据检测
|
|
|
$end_time = date("Y-m-d H:i:s", time() - 180);
|
|
$end_time = date("Y-m-d H:i:s", time() - 180);
|
|
|
- $ids = SportModel::where('status', 1)->where('state', 1)->where('updated_at', '<=', $end_time)->pluck('data_id')->toArray();
|
|
|
|
|
|
|
+ $ids = SportModel::where('state', 1)->where('updated_at', '<=', $end_time)->pluck('data_id')->toArray();
|
|
|
if ($ids) {
|
|
if ($ids) {
|
|
|
$chunks = array_chunk($ids, 10);
|
|
$chunks = array_chunk($ids, 10);
|
|
|
foreach ($chunks as $chunk) {
|
|
foreach ($chunks as $chunk) {
|