Selaa lähdekoodia

追加串场赛事赔率验证

彭俊 6 vuotta sitten
vanhempi
commit
263aab56e1
2 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 2 1
      Biz/Common/CommonFunction.php
  2. 1 1
      Biz/Match/GetmatchData.php

+ 2 - 1
Biz/Common/CommonFunction.php

@@ -1078,7 +1078,7 @@ class CommonFunction {
     }
 
     //处理空赔率赛事
-    function Handle_Odds_Null($matchData=[],$models=[]){
+    function Handle_Odds_Null($matchData=[],$models=[],$oddsTypeWhere=[]){
          //===获取当前赛事是否有赔率,如果没有则去除===
         //获取当前match_id
         $match_ids = [];
@@ -1088,6 +1088,7 @@ class CommonFunction {
         //获取下赛事赔率
         $oddsData = lm($models['model_odds'],'Sports')
         ->whereIn('match_id',$match_ids)
+        ->where($oddsTypeWhere)
         ->pluck('match_id')
         ->toArray();
 

+ 1 - 1
Biz/Match/GetmatchData.php

@@ -708,7 +708,7 @@ class GetmatchData {
 
         //===获取当前赛事是否有赔率,如果没有则去除===
         $models = ['model_odds'=>$model_odds];
-        $matchData_new = $this->commonFunction->Handle_Odds_Null($matchData,$models);
+        $matchData_new = $this->commonFunction->Handle_Odds_Null($matchData,$models,$oddsTypeWhere);
 
         //获取各球类默认赔率
         $game_code = $_REQUEST['game_code'];