|
|
@@ -334,78 +334,28 @@ class MatchListWeb extends Controller{
|
|
|
$whereOr = [];
|
|
|
//有父级玩法,则获取该玩法下详细数据
|
|
|
if($p_code){
|
|
|
+ $whereOr = [['sort','=',0]];
|
|
|
$select = ['lg_id','match_id','id','p_code','odds_code','condition','odds','odds_only','sort','status','team'];
|
|
|
//获取冠军盘口
|
|
|
if($p_code == 'kemp'){
|
|
|
$whereOr = [['sort','=',0],['type','=',1]];
|
|
|
- $oddsData = lm($model_odds,"Sports")
|
|
|
- ->select($select)
|
|
|
- ->whereIn('lg_id', $lg_ids)
|
|
|
- ->where('source',$this->source['source'])
|
|
|
- ->where($whereOr)
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
- return $oddsData;
|
|
|
- }
|
|
|
- if($p_code == 'concede' and $game_code == 'zq'){
|
|
|
- $whereOr = [['sort','=',0]];
|
|
|
- $oddsData = lm($model_odds,"Sports")
|
|
|
- ->select($select)
|
|
|
- ->whereIn('match_id', $match_id)
|
|
|
- ->where('source',$this->source['source'])
|
|
|
- ->where($whereOr)
|
|
|
- ->whereIn('p_code',['concede','goal_size'])
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
- return $oddsData;
|
|
|
}
|
|
|
- if($p_code == 'concede' and $game_code == 'lq'){
|
|
|
- $whereOr = [['sort','=',0]];
|
|
|
- $oddsData = lm($model_odds,"Sports")
|
|
|
- ->select($select)
|
|
|
- ->whereIn('match_id', $match_id)
|
|
|
- ->where('source',$this->source['source'])
|
|
|
- ->where($whereOr)
|
|
|
- ->whereIn('p_code',['concede','total_size','team_score'])
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
- return $oddsData;
|
|
|
+ else if($p_code == 'concede' and $game_code == 'zq'){
|
|
|
+ $p_code = ['concede','goal_size'];
|
|
|
}
|
|
|
- if($p_code == 'concede' and $game_code == 'wq'){
|
|
|
- $whereOr = [['sort','=',0]];
|
|
|
- $oddsData = lm($model_odds,"Sports")
|
|
|
- ->select($select)
|
|
|
- ->whereIn('match_id', $match_id)
|
|
|
- ->where('source',$this->source['source'])
|
|
|
- ->where($whereOr)
|
|
|
- ->whereIn('p_code',['dishes','bureau','total_number'])
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
- return $oddsData;
|
|
|
+ else if($p_code == 'concede' and $game_code == 'lq'){
|
|
|
+ $p_code = ['concede','total_size','team_score'];
|
|
|
}
|
|
|
- if($p_code == 'concede' and $game_code == 'bq'){
|
|
|
- $whereOr = [['sort','=',0]];
|
|
|
- $oddsData = lm($model_odds,"Sports")
|
|
|
- ->select($select)
|
|
|
- ->whereIn('match_id', $match_id)
|
|
|
- ->where('source',$this->source['source'])
|
|
|
- ->where($whereOr)
|
|
|
- ->whereIn('p_code',['concede','total_size','two_sides'])
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
- return $oddsData;
|
|
|
+ else if($p_code == 'concede' and $game_code == 'wq'){
|
|
|
+ $p_code = ['dishes','bureau','total_number'];
|
|
|
}
|
|
|
- else{
|
|
|
- $whereOr = [['p_code','=',$p_code],['sort','=',0]];
|
|
|
- $oddsData = lm($model_odds,"Sports")
|
|
|
- ->select($select)
|
|
|
- ->whereIn('match_id', $match_id)
|
|
|
- ->where('source',$this->source['source'])
|
|
|
- ->where($whereOr)
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
- return $oddsData;
|
|
|
+ else if($p_code == 'concede' and $game_code == 'bq'){
|
|
|
+ $p_code = ['concede','total_size','two_sides'];
|
|
|
+ }else{
|
|
|
+ $p_code = [$p_code];
|
|
|
}
|
|
|
+ $oddsData = ZQoddsModel::getOddsDataPC($model_odds,$select,$match_id,$whereOr,$p_code);
|
|
|
+ return $oddsData;
|
|
|
}
|
|
|
//如果是滚球,则获取滚球下详细数据
|
|
|
if($type == 'StRollBall'){
|
|
|
@@ -427,13 +377,7 @@ class MatchListWeb extends Controller{
|
|
|
$oddsData = ZQoddsModel::getOddsDataPC($model_odds,$select,$match_id,$whereOr,$p_code);
|
|
|
return $oddsData;
|
|
|
}
|
|
|
- $oddsData = lm($model_odds,"Sports")
|
|
|
- ->select($select)
|
|
|
- ->whereIn('match_id', $match_id)
|
|
|
- ->where('source',$this->source['source'])
|
|
|
- ->where($whereOr)
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
+ $oddsData = ZQoddsModel::getOddsDataPC($model_odds,$select,$match_id,$whereOr);
|
|
|
|
|
|
//按父级玩法分组
|
|
|
$oddsCode = [];
|