浏览代码

解决网球赛事结果记录接口异常

彭俊 6 年之前
父节点
当前提交
4d7fd00c33
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      app/Http/Controllers/Api/WriteSportsController.php

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

@@ -487,8 +487,10 @@ class WriteSportsController extends BaseController{
 
                 //根据球类 获取 赛事结果记录字段
                 $set_match_r = $this->get_match_r($game_code,$lg_id,$match_id,$data);
+
                 //写 赛事 结果 记录
                 $ret = $models['model_result_record']::insert($set_match_r);
+
                 if($ret != true) throw new \Exception(Response::generate($gameName.'赛事-match_id:'.$data['match_id'].';',Response::ADD_MATCH_R_R_ERROR));
             }
 
@@ -1609,7 +1611,7 @@ class WriteSportsController extends BaseController{
                 "match_process"=>$data['match_process']?:'',
                 // "tag"=>$data['tag']?:0,
                 "match_id"=>$match_id,
-                "result_mark" =>$data['result_mark']?:'',
+                "result_mark" =>json_encode($data['result_mark'])?:'',
             ];
         }
         if($game_code == 'bq'){
@@ -1632,7 +1634,7 @@ class WriteSportsController extends BaseController{
                 "match_id"=> $match_id,
                 "all_inning"=>$data['all_inning']?:9,
                 "update_time"=>date('Y-m-d H:i:s'),
-                "result_mark" =>$data['result_mark']?:'',
+                "result_mark" =>json_encode($data['result_mark'])?:'',
             ];
         }