lip hace 1 semana
padre
commit
f17f50b97d
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      app/Console/Commands/SportOdds.php

+ 3 - 3
app/Console/Commands/SportOdds.php

@@ -93,12 +93,12 @@ class SportOdds extends Command
                 // --- 关键优化:在循环内部嵌套 try-catch ---
                 try {
                     $data = SportClientService::odds([
-                        'fixture' => $item->data_id,
+                        'fixture' => $item['data_id'],
                     ]);
-                    $this->updateOdds($item->data_id, $data);
+                    $this->updateOdds($item['data_id'], $data);
                 } catch (Throwable $e) {
                     // 记录具体哪条赛事出错了,但不抛出,让循环继续
-                    Log::error("赛前赔率更新失败: " . $e->getMessage());
+                    Log::error($item['data_id'].",赛前赔率更新失败: " . $e->getMessage());
                     continue; 
                 }
             }