|
@@ -939,7 +939,7 @@ class DataLogic
|
|
|
//请求 数据 为空
|
|
//请求 数据 为空
|
|
|
if (empty($obt)) throw new \Exception(Response::generate('请求数据为空,', Response::ABNORMAL));
|
|
if (empty($obt)) throw new \Exception(Response::generate('请求数据为空,', Response::ABNORMAL));
|
|
|
$data = $this->getAddData($obt);
|
|
$data = $this->getAddData($obt);
|
|
|
- //不是 直播 数据
|
|
|
|
|
|
|
+ //不是更新赛事状态数据
|
|
|
if ($data['title'] != 'match_status') throw new \Exception(Response::generate('不是更新赛事状态数据', Response::ABNORMAL));
|
|
if ($data['title'] != 'match_status') throw new \Exception(Response::generate('不是更新赛事状态数据', Response::ABNORMAL));
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -985,6 +985,13 @@ class DataLogic
|
|
|
$ret = $model['model_match']::where(['id' => $v['match_id']])
|
|
$ret = $model['model_match']::where(['id' => $v['match_id']])
|
|
|
->update($set_status);
|
|
->update($set_status);
|
|
|
if ($ret < 1) throw new \Exception(Response::generate(gameModel::getGameName($game_code) . '赛事-match_id:' . $v['others_match_id'], Response::UPSTATUS_ERROR));
|
|
if ($ret < 1) throw new \Exception(Response::generate(gameModel::getGameName($game_code) . '赛事-match_id:' . $v['others_match_id'], Response::UPSTATUS_ERROR));
|
|
|
|
|
+
|
|
|
|
|
+ //===如果赛事已结束 新增 更新 赛事结果===
|
|
|
|
|
+ if($vv['status'] == 2){
|
|
|
|
|
+ $this->match_result($game_code, $v['match_id']);
|
|
|
|
|
+ }
|
|
|
|
|
+ //===end===
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1003,6 +1010,13 @@ class DataLogic
|
|
|
$ret = $model['model_match']::where(['id' => $v['match_id']])
|
|
$ret = $model['model_match']::where(['id' => $v['match_id']])
|
|
|
->update($set_status);
|
|
->update($set_status);
|
|
|
if ($ret < 1) throw new \Exception(Response::generate(gameModel::getGameName($game_code) . '赛事-match_id:' . $v['others_match_id'], Response::UPSTATUS_ERROR));
|
|
if ($ret < 1) throw new \Exception(Response::generate(gameModel::getGameName($game_code) . '赛事-match_id:' . $v['others_match_id'], Response::UPSTATUS_ERROR));
|
|
|
|
|
+
|
|
|
|
|
+ //===如果赛事已结束 新增 更新 赛事结果===
|
|
|
|
|
+ if($vv['status'] == 2){
|
|
|
|
|
+ $this->match_result($game_code, $v['match_id']);
|
|
|
|
|
+ }
|
|
|
|
|
+ //===end===
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1441,13 +1455,13 @@ class DataLogic
|
|
|
/*
|
|
/*
|
|
|
* 写入 赛事 初始 结果
|
|
* 写入 赛事 初始 结果
|
|
|
*/
|
|
*/
|
|
|
- public function match_result($game_code = '')
|
|
|
|
|
|
|
+ public function match_result($game_code = '',$match_id = 0)
|
|
|
{
|
|
{
|
|
|
$model = commonFunction::getModels($game_code, 1);
|
|
$model = commonFunction::getModels($game_code, 1);
|
|
|
- if ($game_code == 'zq') ZqResultModel::ZQresult($model);
|
|
|
|
|
- if ($game_code == 'lq') LqResultModel::LQresult($model);
|
|
|
|
|
- if ($game_code == 'wq') WqResultModel::WQresult($model);
|
|
|
|
|
- if ($game_code == 'bq') BqResultModel::BQresult($model);
|
|
|
|
|
|
|
+ if ($game_code == 'zq') ZqResultModel::ZQresult_v2($model,$match_id);
|
|
|
|
|
+ if ($game_code == 'lq') LqResultModel::LQresult_v2($model,$match_id);
|
|
|
|
|
+ if ($game_code == 'wq') WqResultModel::WQresult_v2($model,$match_id);
|
|
|
|
|
+ if ($game_code == 'bq') BqResultModel::BQresult_v2($model,$match_id);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
/*
|