vali 6 年之前
父节点
当前提交
e4d0a036aa
共有 1 个文件被更改,包括 12 次插入10 次删除
  1. 12 10
      app/Logic/DataLogic.php

+ 12 - 10
app/Logic/DataLogic.php

@@ -850,24 +850,25 @@ class DataLogic
      */
     public function upMatch($data)
     {
+        $sdata = $data;
         try {
             //开启事务
             DB::beginTransaction();
             //获取待更新赛事
             $obt = $data['data'];
 
-
-            //请求 数据 为空
             if (empty($obt)) throw new \Exception(Response::generate('请求数据为空,', Response::ABNORMAL));
-            $getData = $this->getAddData($obt);
+            $data = $this->getAddData($obt);
             //不是 直播 数据
-            if ($getData['title'] != '"match_status",') throw new \Exception(Response::generate('不是更新赛事状态数据', Response::ABNORMAL));
+            if ($data['title'] != 'match_status') throw new \Exception(Response::generate('不是更新赛事状态数据', Response::ABNORMAL));
 
+            /*
             //写请求数据 日志记录
-            if ($this->isRecord) {
-                $setSportsRecord = St_set_sports_recordModel::setSportsRecord($getData['title'], $obt, $getData);
-                if ($setSportsRecord < 1) throw new \Exception(Response::generate('', Response::SPORTS_RECORD_ERR));
+            if($this->isRecord){
+                $setSportsRecord = St_set_sports_recordModel::setSportsRecord($getData['title'],$obt,$getData);
+                if($setSportsRecord < 1) throw new \Exception(Response::generate('',Response::SPORTS_RECORD_ERR));
             }
+            */
 
             //获取 球类代码
             $game_code = $data['game_code'];
@@ -892,24 +893,25 @@ class DataLogic
                 $set_status = [
                     'status' => $v['status'],
                     'is_rollball' => $v['is_rollball'],
-                    'stais_todaytus' => $v['is_today'],
+                    'is_today' => $v['is_today'],
                     'is_morningplate' => $v['is_morningplate'],
                     'is_stringscene' => $v['is_stringscene'],
                     'is_horn' => $v['is_horn'],
+                    'utime' => date('Y-m-d H:i:s'),
                 ];
                 $ret = $model['model_match']::where(['id' => $v['match_id']])
                     ->update($set_status);
                 if ($ret < 1) throw new \Exception(Response::generate(gameModel::getGameName($game_code) . '赛事-match_id:' . $v['others_match_id'], Response::UPSTATUS_ERROR));
             }
 
-            $this->writeLog($data, Response::success());
+            $this->writeLog($sdata, Response::success());
             //提交事务
             DB::commit();
             return Response::success();
         } catch (\Exception $e) {
             //回滚事务
             DB::rollBack();
-            $this->writeLog($data, ['file' => $e->getFile(), 'line' => $e->getLine(), 'msg' => $e->getMessage()]);
+            $this->writeLog($sdata, ['file' => $e->getFile(), 'line' => $e->getLine(), 'msg' => $e->getMessage()]);
             return $e->getMessage();
         }
     }