彭俊 6 роки тому
батько
коміт
13be772f6f
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      app/Http/Controllers/Api/WriteSportsController.php

+ 1 - 1
app/Http/Controllers/Api/WriteSportsController.php

@@ -292,7 +292,7 @@ class WriteSportsController extends BaseController{
                             //获取 本地 联赛 ID
                             $lg_id = commonFunction::searcharray($data['lg_id'],'others_lg_id',$l_lg_data,'lg_id');
                             //如果有上半场赛事id 获取上半场赛事是否存在
-                            if(!empty($l_match_data) and !empty($data['half_match_id'])){
+                            if(!empty($l_match_data) and $data['half_match_id'] > 0){
                                 $half_match_id = $models['model_local_match']::where(['others_match_id'=>$data['half_match_id'],'source'=>$source])
                                     ->value('match_id');
                                 if(empty($half_match_id)) throw new \Exception(Response::generate($gameName.'上半场赛事-match_id:'.$data['match_id'].';',Response::HALF_MATCH_ERROR)) ;//Render([], '10024', lang('Tips','Sports')->get('half_match_error'));