Browse Source

异常处理

彭俊 6 years ago
parent
commit
ff51a8b044
2 changed files with 49 additions and 4 deletions
  1. 49 2
      app/Models/SportsNoteList.php
  2. 0 2
      resources/views/admin/Sportsbq/outcome.blade.php

+ 49 - 2
app/Models/SportsNoteList.php

@@ -160,7 +160,10 @@ class SportsNoteList extends BaseModel {
                         $data[$i]->team = $string['2'].'/'.$string['3'];
                     }
                 }
-                if($data[$i]->match_id == $content[$b]->match_id && $data[$i]->batch_id == $content[$b]->batch_id){
+
+                //处理普通赛事玩法详情
+                if($data[$i]->match_id == $content[$b]->match_id && $data[$i]->batch_id == $content[$b]->batch_id &&$data[$i]->is_champion == 0){
+
                     if($content[$b]->p_code == 'first_last_ball' || $content[$b]->p_code == 'half_full' || $content[$b]->p_code == 'capot' || $content[$b]->p_code == 'two_sides' || $content[$b]->p_code == 'total_goal'){
                         $content[$b]->condition = '';
                     }
@@ -171,13 +174,57 @@ class SportsNoteList extends BaseModel {
                     if(!empty($data[$i]->match_time)){
                         $data[$i]->content1 = '['.$data[$i]->match_time.']';
                         //$data[$i]->match_time = $data[$i]->match_time;
-                    }else{
+                    }
+                    else{
+                        if(!empty($data[$i]->last_time)){
+                            $datetime = explode(' ',$data[$i]->last_time);
+                            //$data[$i]->match_time = $datetime[1];
+                            $data[$i]->content1 = '['.$datetime[1].']';
+                        }
+                    }
+                    for($c=0;$c<count($result);$c++){
+                        if($content[$b]->odds_code == $result[$c]->odds_code){
+                            $data[$i]->str1 = 1;        
+                            if($content[$b]->result=='未处理'){
+                                $data[$i]->content = $data[$i]->content.$result[$c]->odds_name.'<br>'.$content[$b]->condition.' '.$data[$i]->team.'@'.$content[$b]->odds.' ¥'.$content[$b]->bet_money.'<br>';
+                            }else{
+                                $data[$i]->content = $data[$i]->content.$result[$c]->odds_name.'<br>'.$content[$b]->condition.' '.$data[$i]->team.'@'.$content[$b]->odds.' ¥'.$content[$b]->bet_money.'<br><span>'.$content[$b]->result.'</span>('.$content[$b]->matchresult.')<br>';
+                            }
+                        }
+                    }
+                    if($data[$i]->str1 == 0){
+                        if($content[$b]->result=='未处理'){
+                            $data[$i]->content = $data[$i]->content.$content[$b]->odds_code.'<br>'.$content[$b]->condition.' '.$data[$i]->team.'@'.$content[$b]->odds.' ¥'.$content[$b]->bet_money.'<br>';
+                        }else{
+                            $data[$i]->content = $data[$i]->content.$content[$b]->odds_code.'<br>'.$content[$b]->condition.' '.$data[$i]->team.'@'.$content[$b]->odds.' ¥'.$content[$b]->bet_money.'<br><span>'.$content[$b]->result.'</span>('.$content[$b]->matchresult.')<br>';
+                        }
+                    }
+                }
+                //处理冠军联赛玩法详情
+                if($data[$i]->match_id == $content[$b]->lg_id && $data[$i]->batch_id == $content[$b]->batch_id &&$data[$i]->is_champion == 1){
+
+                    $content[$b]->condition = '';
+
+                    if($content[$b]->p_code == 'first_last_ball' || $content[$b]->p_code == 'half_full' || $content[$b]->p_code == 'capot' || $content[$b]->p_code == 'two_sides' || $content[$b]->p_code == 'total_goal'){
+                        $content[$b]->condition = '';
+                    }
+
+                    $data[$i]->game_status = $data[$i]->game_status;
+
+                    /*
+                    //投注详情
+                    if(!empty($data[$i]->match_time)){
+                        $data[$i]->content1 = '['.$data[$i]->match_time.']';
+                        //$data[$i]->match_time = $data[$i]->match_time;
+                    }
+                    else{
                         if(!empty($data[$i]->last_time)){
                             $datetime = explode(' ',$data[$i]->last_time);
                             //$data[$i]->match_time = $datetime[1];
                             $data[$i]->content1 = '['.$datetime[1].']';
                         }
                     }
+                    */
                     for($c=0;$c<count($result);$c++){
                         if($content[$b]->odds_code == $result[$c]->odds_code){
                             $data[$i]->str1 = 1;

File diff suppressed because it is too large
+ 0 - 2
resources/views/admin/Sportsbq/outcome.blade.php


Some files were not shown because too many files changed in this diff