Jelajahi Sumber

异常处理

彭俊 6 tahun lalu
induk
melakukan
83c48ef3dd
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      app/Http/Controllers/Api/WriteSportsController.php

+ 4 - 0
app/Http/Controllers/Api/WriteSportsController.php

@@ -656,8 +656,12 @@ class WriteSportsController extends BaseController{
             //更新赛事 tag 值
             //更新赛事 tag 值
             //如果未获取到本地赛事id,则返回异常
             //如果未获取到本地赛事id,则返回异常
             if(empty($match_id)) throw new \Exception(Response::generate($gameName.'赛事-match_id:'.$s_match_id.';',Response::L_MATCH_ID_ERR)) ;
             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])
             $upMatch = $models['model_match']::where(['id'=>$match_id])
             ->update(['tag'=>$tag,'utime'=>date('Y-m-d H:i:s')]);
             ->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)) ;
             if($upMatch < 1) throw new \Exception(Response::generate($gameName.'赛事-match_id:'.$s_match_id.';',Response::UPMATCHTAG_ERROR)) ;
 
 
             //获取 赔率数据
             //获取 赔率数据