Explorar o código

解决web版滚球球类数量数据异常

彭俊 %!s(int64=6) %!d(string=hai) anos
pai
achega
8e69b83c7a
Modificáronse 1 ficheiros con 7 adicións e 2 borrados
  1. 7 2
      Application/Sports/Controller/MatchListWeb.php

+ 7 - 2
Application/Sports/Controller/MatchListWeb.php

@@ -92,10 +92,15 @@ class MatchListWeb extends Controller{
             if($v['game_code'] !='gj'){
                 $models = $this->commonFunction->getModels($v['game_code'],1);
                 $where = $this->commonFunction->getState($type,$models['model_match']);
-                $matchNum = lm($models['model_league'],"Sports")
+                $matchData = lm($models['model_league'],"Sports")
                     ->join($models['model_match'],$models['model_match'].'.lg_id',$models['model_league'].'.id')
+                    ->select($models['model_match'].'.id as match_id')
                     ->where($where)
-                    ->count("*");
+                    ->get()
+                    ->toarray();
+                //===获取当前赛事是否有赔率,如果没有则去除===
+                $matchData_new = $this->commonFunction->Handle_Odds_Null($matchData,$models);
+                $matchNum = count($matchData_new);
                 //获取满足状态的球类
                 if($matchNum != 0){
                     $gameData[$k]['game_code'] = $v['game_code'];