|
|
@@ -290,7 +290,11 @@ class WriteSportsController extends BaseController{
|
|
|
$data = $v;
|
|
|
$half_match_id = 0;
|
|
|
//获取 本地 联赛 ID
|
|
|
+ //验证本赛事是否有数据源lg_id
|
|
|
+ if(empty($data['lg_id'])) throw new \Exception(Response::generate($gameName.'赛事-match_id:'.$data['match_id'].';',Response::S_LG_ID_NULL));
|
|
|
$lg_id = commonFunction::searcharray($data['lg_id'],'others_lg_id',$l_lg_data,'lg_id');
|
|
|
+ //验证 本赛事是否获取到本地lg_id
|
|
|
+ if(empty($lg_id)) throw new \Exception(Response::generate($gameName.'赛事-match_id:'.$data['match_id'].';',Response::L_LG_ID_NULL));
|
|
|
//如果有上半场赛事id 获取上半场赛事是否存在
|
|
|
if(!empty($l_match_data) and $data['half_match_id'] > 0){
|
|
|
$half_match_id = -1;
|
|
|
@@ -304,7 +308,7 @@ class WriteSportsController extends BaseController{
|
|
|
$last_time = $models['model_league']::where(['id'=>$lg_id])
|
|
|
->value('last_time');
|
|
|
|
|
|
- if(empty($last_time)) throw new \Exception(Response::generate($gameName.'联赛-lg_id:'.$data['lg_id'].';',Response::LG_LASTTIME_ERROR)) ;//Render([], '10023', lang('Tips','Sports')->get('lg_lastTime_error'));
|
|
|
+ if(empty($last_time)) throw new \Exception(Response::generate($gameName.'联赛-lg_id:'.$data['lg_id'].';',Response::LG_LASTTIME_ERROR));//Render([], '10023', lang('Tips','Sports')->get('lg_lastTime_error'));
|
|
|
//给冠军盘口赛事 赋值时间
|
|
|
$time = strtotime($last_time);
|
|
|
$data['match_date'] = date('Y-m-d',$time);
|