瀏覽代碼

异常处理

彭俊 6 年之前
父節點
當前提交
38a58918a2
共有 2 個文件被更改,包括 8 次插入8 次删除
  1. 2 2
      Biz/Common/CommonFunction.php
  2. 6 6
      Biz/Match/GetmatchData.php

+ 2 - 2
Biz/Common/CommonFunction.php

@@ -723,7 +723,7 @@ class CommonFunction {
             switch ($type_code){
                 case 'StRollBall'://滚球 正在进行
                     //追加不同球类的滚球时间
-                    if($game_code == 'zq'){
+                    if($game_code == 'zq' || $game_code == 'gj'){
                         $where = [
                             // ['is_rollball','=',1],
                             ['status','<','2'],
@@ -822,7 +822,7 @@ class CommonFunction {
             switch ($type_code){
                 case 'StRollBall'://滚球 正在进行
                     //追加不同球类的滚球时间
-                    if($game_code == 'zq'){
+                    if($game_code == 'zq' || $game_code == 'gj'){
                         $where = [
                             // [$model_match.'.is_rollball','=',1],
                             [$model_match.'.status','<','2'],

+ 6 - 6
Biz/Match/GetmatchData.php

@@ -35,7 +35,7 @@ class GetmatchData {
         $model_match = $models['model_match'];
 
         //获取 不同状态的查询条件
-        $where = $this->commonFunction->getState($ret['type_code'],$model_match);
+        $where = $this->commonFunction->getState($ret['type_code'],$model_match,$ret['game_code']);
 
         //根据联赛id查询
         if(!empty($ret['lg_id'])){
@@ -91,7 +91,7 @@ class GetmatchData {
 
                 }
                 if($ret['str_type'] == 2){//冠军盘口
-                    $where = $this->commonFunction->getState('StChampion',$model_match);
+                    $where = $this->commonFunction->getState('StChampion',$model_match,$ret['game_code']);
                     $data = $this->getChampion($source,$models,$where,$lg_id,$search,'StChampion');
                 }
                 break;
@@ -838,7 +838,7 @@ class GetmatchData {
         $model_odds = $model['model_odds'];
         $model_result = $model['model_result'];
 
-        $where = $this->commonFunction->getState($type_code,$model_match);
+        $where = $this->commonFunction->getState($type_code,$model_match,'zq');
         $matchData = lm($model_match,"Sports")
             ->leftjoin($model_result,$model_result.'.match_id',$model_match.'.id')
             ->select($model_match.'.id as match_id',$model_match.'.tag','match_date',$model_match.'.match_time',$model_match.'.home_team',$model_match.'.guest_team','home_score','guest_score',$model_result.'.match_time as a_time','match_process')
@@ -886,7 +886,7 @@ class GetmatchData {
         $model_match = $model['model_match'];
         $model_odds = $model['model_odds'];
 
-        $where = $this->commonFunction->getState($type_code);
+        $where = $this->commonFunction->getState($type_code,'','zq');
         $matchData = lm($model_match,'Sports')
             ->select('id as match_id','match_date','match_time','tag','home_team','guest_team')
             ->where($where)
@@ -930,7 +930,7 @@ class GetmatchData {
         $model_match = $model['model_match'];
         $model_odds = $model['model_odds'];
 
-        $where = $this->commonFunction->getState($type_code);
+        $where = $this->commonFunction->getState($type_code,'','zq');
 
         $matchData = lm($model_match,'Sports')
             ->select('id as match_id','match_date','match_time','tag','home_team','guest_team')
@@ -955,7 +955,7 @@ class GetmatchData {
     public function getUEFAStChampion($model,$type_code,$source,$lg_id,$last_time=''){
         $model_odds = $model['model_odds'];
 
-        $where = $this->commonFunction->getState($type_code);
+        $where = $this->commonFunction->getState($type_code,'','zq');
         $championData = lm($model_odds, 'Sports')
             ->select("id","lg_id","match_id","p_code","odds_code","team","odds","sort","status","odds_only")
             ->where('lg_id',$lg_id)