lip 23 часов назад
Родитель
Сommit
7c6a522d2e
1 измененных файлов с 13 добавлено и 0 удалено
  1. 13 0
      app/Console/Commands/Sport.php

+ 13 - 0
app/Console/Commands/Sport.php

@@ -106,11 +106,24 @@ class Sport extends Command
             //$this->updateOvertimeFixtures();
         } elseif ($this->is_live == 3) {
             $this->checkOvertimeFixtures();
+        } elseif ($this->is_live == 4) {
+            $this->leagueFixtures();
         } else {
             $this->initOdds();
         }
     }
 
+    public function leagueFixtures()
+    { 
+        //体育赛事结束前几(分钟)锁盘,90分钟结束
+        $sport_locked = Config::where('field', 'sport_locked')->first()->val ?? 1;
+        //查询世界杯的赛事 
+        $data = SportClientService::fixtures(['league' => 1]);
+        //file_put_contents('leagueFixtures.json', json_encode($data));
+        $this->updateOrCreateSport($data, $sport_locked);
+        return true;
+    }
+
     //到了比赛开始时间,但是状态还是未开始,检查比赛
     public function checkOvertimeFixtures()
     {