Kaynağa Gözat

调整页面地区显示赛事

彭俊 6 yıl önce
ebeveyn
işleme
806d1a42eb

+ 1 - 1
Application/Sports/Controller/Head.php

@@ -64,7 +64,7 @@ class Head extends Controller{
         //获取所有冠军盘口
         $where = [
             ['type','=',1],
-            ['source','=',$this->source]
+            // ['source','=',$this->source]
         ];
         $select = ['match_id','type'];
         $ZQoddsData = ZQoddsModel::getOddsData($where,$select)->toArray();

+ 0 - 1
Application/Sports/Controller/MatchList.php

@@ -403,7 +403,6 @@ class  MatchList extends Controller {
                     }
                 }else{
                     $matchNum = lm($matchModel['model_odds'], 'Sports')
-                        ->where($this->source)
                         ->where($where)
                         ->count('*');
                     //获取满足状态的球类/去除冠军类

+ 1 - 1
Application/Sports/Model/St_zq_odds.php

@@ -21,7 +21,7 @@ class St_zq_odds extends Model
      * 获取赔率数据
      */
     public static function getOddsData($where=[],$select='id',$sort='id',$orderby='asc'){
-        $oddsData = self::select($select)->where($where)->groupby("match_id","type")->get();
+        $oddsData = self::select($select)->where($where)->groupby("lg_id","match_id","type")->get();
         return $oddsData;
     }
 

+ 1 - 1
Biz/Common/CommonFunction.php

@@ -929,7 +929,7 @@ class CommonFunction {
                     unset($vv['oddsData']);
                 }
 
-                if(count($vv) == 5){
+                if(count($vv) != 5){
                     unset($v['league_count'][$kk]);
                 }
             }

+ 3 - 4
Biz/Match/GetmatchData.php

@@ -442,7 +442,6 @@ class GetmatchData {
                 ->where(['status'=>0])
                 ->groupBy("id","lg_id","match_id","p_code","odds_code","team","odds","sort","status","odds_only")
                 ->get()->toArray();
-
             //按p_code分组
             $p_code=array();
             foreach($championData as $k=>$v){
@@ -482,12 +481,12 @@ class GetmatchData {
             ->leftjoin('st_area_country','st_area_country.id',$models['model_league'].'.area_id')
             ->select('st_area_country.id as area_id','st_area_country.name as region')
             ->distinct('st_area_country.name')
+            ->where([[$models['model_league'].'.country_id','=',0]])
             ->where([[$models['model_league'].'.name_chinese','!=','']])
             ->where($models['model_league'].'.name_chinese','like','%'.$search.'%')
             ->get()
             ->toArray();
 
-
         if($type_code != 'StChampion'){//非冠军赛事
             $data = $this->getMatchNum($source,$country,$area,$models,$where,$search,$time);
         }else{//冠军赛事
@@ -561,7 +560,7 @@ class GetmatchData {
                 if($v['area_id']){
                     $areaData[$k] = $v;
                     foreach ($leagueData as $kk=>$vv){
-                        if($v['area_id'] == $vv['area_id']){
+                        if($v['area_id'] == $vv['area_id'] and $vv['country_id'] == 0){
                             $areaData[$k]['league_count'][] = $vv;
                         }
                     }
@@ -630,7 +629,7 @@ class GetmatchData {
                 if($v['area_id']){
                     $areaData[$k] = $v;
                     foreach ($leagueData as $kk=>$vv){
-                        if($v['area_id'] == $vv['area_id']){
+                        if($v['area_id'] == $vv['area_id'] and $vv['country_id'] == 0){
                             $areaData[$k]['league_count'][] = $vv;
                         }
                     }