彭俊 6 жил өмнө
parent
commit
6618427720

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

@@ -212,13 +212,13 @@ class WriteSportsController extends BaseController{
              //提交事务
              DB::commit();
              //写请求数据 日志记录
-             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
              return Response::success();
          } catch (\Exception $e) {
              //回滚事务
              DB::rollBack();
              //写请求数据 日志记录
-             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
              return $e->getMessage();
          }
     }
@@ -433,13 +433,13 @@ class WriteSportsController extends BaseController{
              //提交事务
              DB::commit();
              //写请求数据 日志记录
-             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
              return Response::success();
          } catch (\Exception $e) {
              //回滚事务
              DB::rollBack();
              //写请求数据 日志记录
-             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
              return $e->getMessage();
          }
 
@@ -645,13 +645,13 @@ class WriteSportsController extends BaseController{
              //提交事务
              DB::commit();
              //写请求数据 日志记录
-             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
              return Response::success();
          } catch (\Exception $e) {
              //回滚事务
              DB::rollBack();
              //写请求数据 日志记录
-             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+             if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
              return $e->getMessage();
          }
 
@@ -772,13 +772,13 @@ class WriteSportsController extends BaseController{
               //提交事务
               DB::commit();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
               return Response::success();
           } catch (\Exception $e) {
               //回滚事务
               DB::rollBack();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
               return $e->getMessage();
           }
 
@@ -893,13 +893,13 @@ class WriteSportsController extends BaseController{
               //提交事务
               DB::commit();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
               return Response::success();
           } catch (\Exception $e) {
               //回滚事务
               DB::rollBack();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
               return $e->getMessage();
           }
 
@@ -1052,13 +1052,13 @@ class WriteSportsController extends BaseController{
               //提交事务
               DB::commit();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
               return Response::success();
           } catch (\Exception $e) {
               //回滚事务
               DB::rollBack();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
               return $e->getMessage();
           }
     }
@@ -1203,13 +1203,13 @@ class WriteSportsController extends BaseController{
               //提交事务
               DB::commit();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
               return Response::success();
           } catch (\Exception $e) {
               //回滚事务
               DB::rollBack();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
               return $e->getMessage();
           }
     }
@@ -1358,13 +1358,13 @@ class WriteSportsController extends BaseController{
               //提交事务
               DB::commit();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
               return Response::success();
           } catch (\Exception $e) {
               //回滚事务
               DB::rollBack();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
               return $e->getMessage();
           }
     }
@@ -1425,13 +1425,13 @@ class WriteSportsController extends BaseController{
               //提交事务
               DB::commit();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
               return Response::success();
           } catch (\Exception $e) {
               //回滚事务
               DB::rollBack();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
               return $e->getMessage();
           }
     }
@@ -1760,13 +1760,13 @@ class WriteSportsController extends BaseController{
               //提交事务
               DB::commit();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],Response::success());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],Response::success());
               return Response::success();
           } catch (\Exception $e) {
               //回滚事务
               DB::rollBack();
               //写请求数据 日志记录
-              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($obt,$getData['title'],$e->getMessage());
+              if($this->isRecord) commonFunction::SET_SPORTS_RECORD($game_code,$obt,$getData['title'],$e->getMessage());
               return $e->getMessage();
           }
     }

+ 2 - 2
app/Lib/Biz/Sport/Common.php

@@ -1181,9 +1181,9 @@ class Common {
     }
 
     //写入赛事数据日志文件
-    static function SET_SPORTS_RECORD($obt,$title,$msg){
+    static function SET_SPORTS_RECORD($game_code,$obt,$title,$msg){
         Log::getMonolog()->popHandler(); 
-        Log::useFiles(storage_path('logs/set_sports_record/'.date('Y-m-d',time()).'/'.$title.'.log'), 'info');
+        Log::useFiles(storage_path('logs/set_sports_record/'.date('Y-m-d',time()).'/'.$game_code.'_'.$title.'.log'), 'info');
         Log::info('--->msg:' . $msg . ';data:' . $obt);
     }
 }