|
|
@@ -262,33 +262,12 @@ class GetmatchData {
|
|
|
if(empty($matchData)) return $matchData;
|
|
|
|
|
|
//===获取当前赛事是否有赔率,如果没有则去除===
|
|
|
+ $matchData_new = $this->commonFunction->Handle_Odds_Null($matchData,$models);
|
|
|
//获取当前match_id
|
|
|
$match_ids = [];
|
|
|
foreach($matchData as $k=>$v){
|
|
|
$match_ids[] = $v['match_id'];
|
|
|
}
|
|
|
- //获取下赛事赔率
|
|
|
- $oddsData = lm($models['model_odds'],'Sports')
|
|
|
- ->select('id','match_id')
|
|
|
- ->whereIn('match_id',$match_ids)
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
-
|
|
|
- //根据match_id 去重
|
|
|
- $oddsData = $this->commonFunction->array_unset_tt($oddsData,'match_id');
|
|
|
- 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];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //===赛事空赔率 处理end ===
|
|
|
//组装联赛下赛事
|
|
|
$data = [];
|
|
|
foreach ($leagueData as $k=>$v){
|
|
|
@@ -329,34 +308,13 @@ class GetmatchData {
|
|
|
if(empty($matchData)) return $matchData;
|
|
|
|
|
|
//===获取当前赛事是否有赔率,如果没有则去除===
|
|
|
+ $matchData_new = $this->commonFunction->Handle_Odds_Null($matchData,$models);
|
|
|
+
|
|
|
//获取当前match_id
|
|
|
$match_ids = [];
|
|
|
foreach($matchData as $k=>$v){
|
|
|
$match_ids[] = $v['match_id'];
|
|
|
}
|
|
|
- //获取下赛事赔率
|
|
|
- $oddsData = lm($models['model_odds'],'Sports')
|
|
|
- ->select('id','match_id')
|
|
|
- ->whereIn('match_id',$match_ids)
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
-
|
|
|
- //根据match_id 去重
|
|
|
- $oddsData = $this->commonFunction->array_unset_tt($oddsData,'match_id');
|
|
|
- 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];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //===赛事空赔率 处理end ===
|
|
|
-
|
|
|
//获取当前美东时间
|
|
|
$s_time = strtotime($this->commonFunction->qgmdate('Y-m-d H:i:s', '', -4));
|
|
|
$data = [];
|
|
|
@@ -548,33 +506,7 @@ class GetmatchData {
|
|
|
if(empty($matchData)) return $matchData;
|
|
|
|
|
|
//===获取当前赛事是否有赔率,如果没有则去除===
|
|
|
- //获取当前match_id
|
|
|
- $match_ids = [];
|
|
|
- foreach($matchData as $k=>$v){
|
|
|
- $match_ids[] = $v['match_id'];
|
|
|
- }
|
|
|
- //获取下赛事赔率
|
|
|
- $oddsData = lm($models['model_odds'],'Sports')
|
|
|
- ->select('id','match_id')
|
|
|
- ->whereIn('match_id',$match_ids)
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
-
|
|
|
- //根据match_id 去重
|
|
|
- $oddsData = $this->commonFunction->array_unset_tt($oddsData,'match_id');
|
|
|
- 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];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //===赛事空赔率 处理end ===
|
|
|
+ $matchData_new = $this->commonFunction->Handle_Odds_Null($matchData,$models);
|
|
|
|
|
|
//按国家
|
|
|
$countryData = [];
|
|
|
@@ -746,33 +678,8 @@ class GetmatchData {
|
|
|
if(empty($matchData)) return $matchData;
|
|
|
|
|
|
//===获取当前赛事是否有赔率,如果没有则去除===
|
|
|
- //获取当前match_id
|
|
|
- $match_ids = [];
|
|
|
- foreach($matchData as $k=>$v){
|
|
|
- $match_ids[] = $v['match_id'];
|
|
|
- }
|
|
|
- //获取下赛事赔率
|
|
|
- $oddsData = lm($model_odds,'Sports')
|
|
|
- ->select('id','match_id')
|
|
|
- ->whereIn('match_id',$match_ids)
|
|
|
- ->get()
|
|
|
- ->toArray();
|
|
|
-
|
|
|
- //根据match_id 去重
|
|
|
- $oddsData = $this->commonFunction->array_unset_tt($oddsData,'match_id');
|
|
|
- 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];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //===赛事空赔率 处理end ===
|
|
|
+ $models = ['model_odds'=>$model_odds];
|
|
|
+ $matchData_new = $this->commonFunction->Handle_Odds_Null($matchData,$models);
|
|
|
|
|
|
//获取各球类默认赔率
|
|
|
$game_code = $_REQUEST['game_code'];
|