彭俊 6 rokov pred
rodič
commit
22bc15f7ad

+ 3 - 6
app/Http/Controllers/Api/WriteSportsController.php

@@ -300,7 +300,7 @@ class WriteSportsController extends BaseController{
                             //获取 本地 联赛 ID
                             //验证本赛事是否有数据源lg_id
                             if(empty($data['lg_id'])) throw new \Exception(Response::generate($gameName.'赛事-match_id:'.$data['match_id'].';',Response::S_LG_ID_NULL));
-                            $lg_id = commonFunction::searcharray($data['lg_id'],'others_lg_id',$l_lg_data,'lg_id');
+                            $lg_id = commonFunction::searcharray($data['uuid'],'identity',$l_lg_data,'lg_id');
                             //验证 本赛事是否获取到本地lg_id
                             if(empty($lg_id)) throw new \Exception(Response::generate($gameName.'赛事-match_id:'.$data['match_id'].';',Response::L_LG_ID_NULL));
                             //如果有上半场赛事id 获取上半场赛事是否存在
@@ -586,7 +586,7 @@ class WriteSportsController extends BaseController{
             foreach($match_r_data as $k=>$v){
                 $data = $v;
                 //获取 本地 联赛 ID
-                $lg_id = commonFunction::searcharray($data['lg_id'],'others_lg_id',$l_lg_data,'lg_id');
+                $lg_id = commonFunction::searcharray($data['uuid'],'identity',$l_lg_data,'lg_id');
                 //获取 本地 赛事 ID
                 $match_id = commonFunction::searcharray($data['match_id'],'others_match_id',$l_match_data,'match_id');
 
@@ -656,12 +656,9 @@ class WriteSportsController extends BaseController{
             //更新赛事 tag 值
             //如果未获取到本地赛事id,则返回异常
             if(empty($match_id)) throw new \Exception(Response::generate($gameName.'赛事-match_id:'.$s_match_id.';',Response::L_MATCH_ID_ERR)) ;
-            DB::enableQueryLog();
 
             $upMatch = $models['model_match']::where(['id'=>$match_id])
             ->update(['tag'=>$tag,'utime'=>date('Y-m-d H:i:s')]);
-            $ss = DB::getQueryLog();
-            return Response::success($ss);
             if($upMatch < 1) throw new \Exception(Response::generate($gameName.'赛事-match_id:'.$s_match_id.';',Response::UPMATCHTAG_ERROR)) ;
 
             //获取 赔率数据
@@ -792,7 +789,7 @@ class WriteSportsController extends BaseController{
              //拼装 待写入 赔率数据
              foreach($oddsData as $k=>$v){
                 //获取 本地 联赛 ID
-                $lg_id = commonFunction::searcharray($v['lg_id'],'others_lg_id',$l_lg_data,'lg_id');
+                $lg_id = commonFunction::searcharray($data['uuid'],'identity',$l_lg_data,'lg_id');
                 //组装数据
                 $set_odds = [
                     'match_id'=>0,