|
@@ -857,6 +857,7 @@ class DataLogic
|
|
|
//获取待更新赛事
|
|
//获取待更新赛事
|
|
|
$obt = $data['data'];
|
|
$obt = $data['data'];
|
|
|
|
|
|
|
|
|
|
+ //请求 数据 为空
|
|
|
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);
|
|
|
//不是 直播 数据
|
|
//不是 直播 数据
|
|
@@ -889,19 +890,35 @@ class DataLogic
|
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
if (empty($local_match)) throw new \Exception(Response::generate('', Response::MATCHID_NULL));
|
|
if (empty($local_match)) throw new \Exception(Response::generate('', Response::MATCHID_NULL));
|
|
|
//更新状态字段
|
|
//更新状态字段
|
|
|
- foreach ($local_match as $k => $v) {
|
|
|
|
|
- $set_status = [
|
|
|
|
|
- 'status' => $v['status'],
|
|
|
|
|
- 'is_rollball' => $v['is_rollball'],
|
|
|
|
|
- '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));
|
|
|
|
|
|
|
+ if($game_code == 'zq'){
|
|
|
|
|
+ foreach ($local_match as $k => $v) {
|
|
|
|
|
+ $set_status = [
|
|
|
|
|
+ 'status' => $v['status'],
|
|
|
|
|
+ 'is_rollball' => $v['is_rollball'],
|
|
|
|
|
+ '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));
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ foreach ($local_match as $k => $v) {
|
|
|
|
|
+ $set_status = [
|
|
|
|
|
+ 'status' => $v['status'],
|
|
|
|
|
+ 'is_rollball' => $v['is_rollball'],
|
|
|
|
|
+ 'is_today' => $v['is_today'],
|
|
|
|
|
+ 'is_morningplate' => $v['is_morningplate'],
|
|
|
|
|
+ 'is_stringscene' => $v['is_stringscene'],
|
|
|
|
|
+ '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($sdata, Response::success());
|
|
$this->writeLog($sdata, Response::success());
|