|
|
@@ -141,6 +141,7 @@ class StWqResult extends Model
|
|
|
|
|
|
//拼装赛事结果数据
|
|
|
$set_match_r = [];
|
|
|
+ $ss = [];
|
|
|
|
|
|
if(!empty($match_result)){
|
|
|
foreach($matchData as $k =>$v ){
|
|
|
@@ -151,12 +152,18 @@ class StWqResult extends Model
|
|
|
//获取赛事每节的赛果
|
|
|
$resultData = commonFunction::filter_by_value($match_result,'match_id',$v['id']);
|
|
|
|
|
|
- if(!empty($resultData)){
|
|
|
+ //如果有获取到结果,并且进程不为空,则写入赛事结果数据
|
|
|
+ if(!empty($resultData) and $resultData['match_process'] != ''){
|
|
|
//获取赛果json
|
|
|
$result_mark = json_decode($resultData['result_mark'],true);
|
|
|
|
|
|
+ $sss[] = $result_mark;
|
|
|
+
|
|
|
//获取进程
|
|
|
- $match_process = $result_mark['schedule'];
|
|
|
+ $match_process = '';
|
|
|
+ if($result_mark['schedule']){
|
|
|
+ $match_process = $result_mark['schedule'];
|
|
|
+ }
|
|
|
|
|
|
//获胜球员
|
|
|
$match_winer = '';
|
|
|
@@ -223,11 +230,13 @@ class StWqResult extends Model
|
|
|
"match_winer_player"=> $match_winer?:'',//获胜队员
|
|
|
"match_process"=> $match_process?:'',//比赛进程
|
|
|
"inning"=> json_encode($inning)?:'',//每局输赢结果
|
|
|
- ];
|
|
|
+ ];
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
//写入赛果
|
|
|
if(!empty($set_match_r)){
|
|
|
$ret = $model['model_result']::insert($set_match_r);
|
|
|
@@ -235,6 +244,7 @@ class StWqResult extends Model
|
|
|
}
|
|
|
|
|
|
return 1;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//计算滚球 赛事进行时间
|