vali 6 rokov pred
rodič
commit
f20b6a05fe
1 zmenil súbory, kde vykonal 6 pridanie a 2 odobranie
  1. 6 2
      app/Logic/DataLogic.php

+ 6 - 2
app/Logic/DataLogic.php

@@ -1483,11 +1483,15 @@ class DataLogic
             $warn_data = $getData['data'];
 
             //获取赛事 match_id
-            $match_id = $models['model_local_match']::SELECT('others_match_id', 'match_id')
+            $match_Model= $models['model_local_match']::SELECT('others_match_id', 'match_id')
                 //->where(['source' => $source, 'identity' => $match_identity])
                 ->where(['identity' => $match_identity])
-                ->first()->match_id;
+                ->first();
+            if (empty($match_Model)){
+                throw new \Exception(Response::generate('', Response::SET_WARN_ERR));
+            }
 
+            $match_id = $match_Model->match_id;
             if (!empty($match_id)) {
                 //更新 危险球
                 $ret = ZqResultModel::set_result_warn($match_id, $warn_data);