vali 6 năm trước cách đây
mục cha
commit
5d0fdc2f28
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      app/Logic/DataLogic.php

+ 6 - 1
app/Logic/DataLogic.php

@@ -384,7 +384,7 @@ class DataLogic
                             //===追加查询 该赛事 本地是否存在 同联赛同球队 记录
                             //查询赛事 如果存在 则更新为 已取消
                             $matchData = $models['model_match']::where(['home_team' => $data['home_team'], 'guest_team' => $data['guest_team'], 'identity' => $data['uuid']])
-                                ->update(['status' => 6,'utime'=>date('Y-m-d H:i:s'), 'handle_mark' => '重复赛事取消']);
+                                ->update(['status' => 6, 'utime' => date('Y-m-d H:i:s'), 'handle_mark' => '重复赛事取消']);
                             //===end====
                             $half_match_id = $v['half_match_id'];
                             //获取 本地 联赛 ID
@@ -1052,6 +1052,11 @@ class DataLogic
                             // 新增 更新 赛事结果
                             $this->match_result($game_code, $v['match_id']);
 
+                            // 更新 赛事结果表 状态 为已结束
+                            $ret_up_r = $model['model_result']::where(['match_id' => $v['match_id']])
+                                ->update(["status" => 2, 'is_correct' => -1, "update_time" => date('Y-m-d H:i:s')]);
+                            if ($ret_up_r < 1) throw new \Exception(Response::generate('', Response::ADD_MATCH_R_ERROR));
+
                             // 写入结算通知表 用于自动结算
                             $Comendnotice = new \App\Models\Comendnotice();
                             $ret_add = $Comendnotice->addcomendnotice($v['match_id'], $game_code, 0, $game_start_time);