|
|
@@ -282,13 +282,12 @@ where a.match_id = b.match_id and a.id = b.id ";
|
|
|
|
|
|
//赔率数据
|
|
|
$oddsCodeNum = $this->getOddsData($game_code,$models['model_odds'],$match_ids,$lg_ids,$p_code,$type);
|
|
|
-
|
|
|
if(empty($p_code) and $type != 'StRollBall') {
|
|
|
return $oddsCodeNum;
|
|
|
}
|
|
|
|
|
|
//处理联赛/赛事/赔率 数据
|
|
|
- $data = $this->get_l_m_o($p_code,$matchNum,$oddsCodeNum,$models['model_result_record'],$game_code);
|
|
|
+ $data = $this->get_l_m_o($p_code,$matchNum,$oddsCodeNum,$models['model_result_record'],$game_code,$type);
|
|
|
|
|
|
return $data;
|
|
|
}
|
|
|
@@ -296,8 +295,17 @@ where a.match_id = b.match_id and a.id = b.id ";
|
|
|
/*
|
|
|
* 联赛/赛事/赔率 组装数据
|
|
|
*/
|
|
|
- public function get_l_m_o($p_code='',$matchData=[],$oddsCodeNum=[],$model_result_record='',$game_code=''){
|
|
|
+ public function get_l_m_o($p_code='',$matchData=[],$oddsCodeNum=[],$model_result_record='',$game_code='',$type=''){
|
|
|
+ //如果是滚球赔率 追加状态字段
|
|
|
+ if($type == 'StRollBall' and !empty($oddsCodeNum)){
|
|
|
+ $rollOdds = [];
|
|
|
+ foreach($oddsCodeNum as $k=>$v){
|
|
|
+ $v['oddsType'] = 'StRollBall';
|
|
|
+ $rollOdds[] = $v;
|
|
|
+ }
|
|
|
|
|
|
+ $oddsCodeNum = $rollOdds;
|
|
|
+ }
|
|
|
$match_odds = [];
|
|
|
//如果是冠军盘口
|
|
|
if($p_code == 'kemp'){
|
|
|
@@ -457,6 +465,7 @@ where a.match_id = b.match_id and a.id = b.id ";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
//排序
|
|
|
sort($match_odds);
|
|
|
$data = [];
|
|
|
@@ -528,7 +537,7 @@ where a.match_id = b.match_id and a.id = b.id ";
|
|
|
}else{
|
|
|
$whereOr = [['sort','=',0],['status','=',0],['is_stringscene','=',0]];
|
|
|
}
|
|
|
- $select = ['lg_id','match_id','id','p_code','odds_code','condition','odds','odds_only','sort','status','team'];
|
|
|
+ $select = ['lg_id','match_id','others_match_id','id','p_code','odds_code','condition','odds','odds_only','sort','status','team'];
|
|
|
//获取冠军盘口
|
|
|
if($p_code == 'kemp'){
|
|
|
$whereOr = [['sort','=',0],['type','=',1],['status','=',0]];
|
|
|
@@ -554,7 +563,7 @@ where a.match_id = b.match_id and a.id = b.id ";
|
|
|
}
|
|
|
//如果是滚球,则获取滚球下详细数据
|
|
|
if($type == 'StRollBall'){
|
|
|
- $select = ['lg_id','match_id','id','p_code','odds_code','condition','odds','odds_only','sort','status','team'];
|
|
|
+ $select = ['lg_id','match_id','others_match_id','id','p_code','odds_code','condition','odds','odds_only','sort','status','team'];
|
|
|
$whereOr = [['sort','=',0],['status','=',0],['is_stringscene','=',0]];
|
|
|
//获取滚球下,各球类默认玩法代码
|
|
|
if($game_code == 'zq'){
|