|
|
@@ -1087,28 +1087,26 @@ class CommonFunction {
|
|
|
}
|
|
|
//获取下赛事赔率
|
|
|
$oddsData = lm($models['model_odds'],'Sports')
|
|
|
- ->select('id','match_id')
|
|
|
->whereIn('match_id',$match_ids)
|
|
|
- ->get()
|
|
|
+ ->pluck('match_id')
|
|
|
->toArray();
|
|
|
|
|
|
- //根据match_id 去重
|
|
|
- $oddsData = $this->array_unset_tt($oddsData,'match_id');
|
|
|
+ $oddsData = array_unique($oddsData);
|
|
|
sort($oddsData);
|
|
|
|
|
|
- //如果赔率为空,则返回空
|
|
|
- if(empty($oddsData)) return $oddsData;
|
|
|
- $matchData_new = [];
|
|
|
- foreach($matchData as $k=>$v){
|
|
|
- foreach($oddsData as $kk=>$vv){
|
|
|
- if($v['match_id'] == $vv['match_id']){
|
|
|
- $matchData_new[] = $matchData[$k];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return $matchData_new;
|
|
|
- //===赛事空赔率 处理end ===
|
|
|
+ //如果赔率为空,则返回空
|
|
|
+ if(empty($oddsData)) return $oddsData;
|
|
|
+ $matchData_new = [];
|
|
|
+ foreach($matchData as $k=>$v){
|
|
|
+ foreach($oddsData as $kk=>$match_id){
|
|
|
+ if($v['match_id'] == $match_id){
|
|
|
+ $matchData_new[] = $matchData[$k];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return $matchData_new;
|
|
|
+ //===赛事空赔率 处理end ===
|
|
|
}
|
|
|
}
|
|
|
|