Jonlin 6 жил өмнө
parent
commit
ca533f5ed0

+ 31 - 31
app/Models/SportsBase.php

@@ -49,49 +49,49 @@ class SportsBase extends BaseModel {
         
         $where[] = array('st_bq_league.name_chinese','<>','');
 
-        $source = \App\Models\Setinfo::where('id','1000')->first();
-        if($source->infocontent != '混合数据'){
-            $where[] = array('st_bq_local_match.source', '=', $source->infocontent);
-            $where[] = array('st_bq_local_league.source', '=', $source->infocontent);
-        }
+//        $source = \App\Models\Setinfo::where('id','1000')->first();
+//        if($source->infocontent != '混合数据'){
+//            $where[] = array('st_bq_local_match.source', '=', $source->infocontent);
+//            $where[] = array('st_bq_local_league.source', '=', $source->infocontent);
+//        }
+//
+//        if (is_array ($where) && count ($where) > 0) {
+//            $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.id')
+//                ->join('st_bq_local_match','st_bq_competition.id','=','st_bq_local_match.match_id')
+//                ->join('st_bq_local_league','st_bq_league.id','=','st_bq_local_league.lg_id')
+//                ->select('st_bq_competition.id','st_bq_local_match.match_id','st_bq_local_league.lg_id','st_bq_league.name_chinese','st_bq_league.last_time','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
+//                ->orderby('st_bq_competition.match_date','desc')
+//                ->orderby('st_bq_competition.match_time','desc')
+//                ->where($where)
+//                ->orwhere($orwhere)
+//                ->paginate ($list);
+//        } else {
+//            $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.id')
+//                ->join('st_bq_local_match','st_bq_competition.id','=','st_bq_local_match.match_id')
+//                ->join('st_bq_local_league','st_bq_league.id','=','st_bq_local_league.lg_id')
+//                ->select('st_bq_competition.id','st_bq_local_match.match_id','st_bq_local_league.lg_id','st_bq_league.name_chinese','st_bq_league.last_time','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
+//                ->orderby('st_bq_competition.match_date','desc')
+//                ->orderby('st_bq_competition.match_time','desc')
+//                ->paginate ($list);
+//        }
+
+
 
         if (is_array ($where) && count ($where) > 0) {
-            $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.id')
-                ->join('st_bq_local_match','st_bq_competition.id','=','st_bq_local_match.match_id')
-                ->join('st_bq_local_league','st_bq_league.id','=','st_bq_local_league.lg_id')
-                ->select('st_bq_competition.id','st_bq_local_match.match_id','st_bq_local_league.lg_id','st_bq_league.name_chinese','st_bq_league.last_time','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
+            $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.lg_id')
+                ->select('st_bq_competition.id','st_bq_competition.match_id','st_bq_competition.lg_id','st_bq_league.name_chinese','st_bq_league.last_time','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
                 ->orderby('st_bq_competition.match_date','desc')
                 ->orderby('st_bq_competition.match_time','desc')
                 ->where($where)
                 ->orwhere($orwhere)
                 ->paginate ($list);
         } else {
-            $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.id')
-                ->join('st_bq_local_match','st_bq_competition.id','=','st_bq_local_match.match_id')
-                ->join('st_bq_local_league','st_bq_league.id','=','st_bq_local_league.lg_id')
-                ->select('st_bq_competition.id','st_bq_local_match.match_id','st_bq_local_league.lg_id','st_bq_league.name_chinese','st_bq_league.last_time','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
+            $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.lg_id')
+                ->select('st_bq_competition.id','st_bq_competition.match_id','st_bq_competition.lg_id','st_bq_league.name_chinese','st_bq_league.last_time','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
                 ->orderby('st_bq_competition.match_date','desc')
                 ->orderby('st_bq_competition.match_time','desc')
                 ->paginate ($list);
         }
-
-
-
-//        if (is_array ($where) && count ($where) > 0) {
-//            $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.lg_id')
-//                ->select('st_bq_competition.id','st_bq_competition.match_id','st_bq_competition.lg_id','st_bq_league.name_chinese','st_bq_league.last_time','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
-//                ->orderby('st_bq_competition.match_date','desc')
-//                ->orderby('st_bq_competition.match_time','desc')
-//                ->where($where)
-//                ->orwhere($orwhere)
-//                ->paginate ($list);
-//        } else {
-//            $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.lg_id')
-//                ->select('st_bq_competition.id','st_bq_competition.match_id','st_bq_competition.lg_id','st_bq_league.name_chinese','st_bq_league.last_time','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
-//                ->orderby('st_bq_competition.match_date','desc')
-//                ->orderby('st_bq_competition.match_time','desc')
-//                ->paginate ($list);
-//        }
         if (!$data < 0) {
             return -2021052003; //
         }

+ 31 - 31
app/Models/SportsBasket.php

@@ -49,49 +49,49 @@ class SportsBasket extends BaseModel {
 
         $where[] = array('st_lq_league.name_chinese','<>','');
 
-        $source = \App\Models\Setinfo::where('id','1000')->first();
-        if($source->infocontent != '混合数据'){
-            $where[] = array('st_lq_local_match.source', '=', $source->infocontent);
-            $where[] = array('st_lq_local_league.source', '=', $source->infocontent);
-        }
+//        $source = \App\Models\Setinfo::where('id','1000')->first();
+//        if($source->infocontent != '混合数据'){
+//            $where[] = array('st_lq_local_match.source', '=', $source->infocontent);
+//            $where[] = array('st_lq_local_league.source', '=', $source->infocontent);
+//        }
+//
+//        if (is_array ($where) && count ($where) > 0) {
+//            $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.id')
+//                ->join('st_lq_local_match','st_lq_competition.id','=','st_lq_local_match.match_id')
+//                ->join('st_lq_local_league','st_lq_league.id','=','st_lq_local_league.lg_id')
+//                ->select('st_lq_competition.id','st_lq_local_match.match_id','st_lq_local_league.lg_id','st_lq_league.name_chinese','st_lq_league.last_time','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
+//                ->orderby('st_lq_competition.match_date','desc')
+//                ->orderby('st_lq_competition.match_time','desc')
+//                ->where($where)
+//                ->orwhere($orwhere)
+//                ->paginate ($list);
+//        } else {
+//            $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.id')
+//                ->join('st_lq_local_match','st_lq_competition.id','=','st_lq_local_match.match_id')
+//                ->join('st_lq_local_league','st_lq_league.id','=','st_lq_local_league.lg_id')
+//                ->select('st_lq_competition.id','st_lq_local_match.match_id','st_lq_local_league.lg_id','st_lq_league.name_chinese','st_lq_league.last_time','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
+//                ->orderby('st_lq_competition.match_date','desc')
+//                ->orderby('st_lq_competition.match_time','desc')
+//                ->paginate ($list);
+//        }
+
+
 
         if (is_array ($where) && count ($where) > 0) {
-            $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.id')
-                ->join('st_lq_local_match','st_lq_competition.id','=','st_lq_local_match.match_id')
-                ->join('st_lq_local_league','st_lq_league.id','=','st_lq_local_league.lg_id')
-                ->select('st_lq_competition.id','st_lq_local_match.match_id','st_lq_local_league.lg_id','st_lq_league.name_chinese','st_lq_league.last_time','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
+            $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.lg_id')
+                ->select('st_lq_competition.id','st_lq_competition.match_id','st_lq_competition.lg_id','st_lq_league.name_chinese','st_lq_league.last_time','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
                 ->orderby('st_lq_competition.match_date','desc')
                 ->orderby('st_lq_competition.match_time','desc')
                 ->where($where)
                 ->orwhere($orwhere)
                 ->paginate ($list);
         } else {
-            $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.id')
-                ->join('st_lq_local_match','st_lq_competition.id','=','st_lq_local_match.match_id')
-                ->join('st_lq_local_league','st_lq_league.id','=','st_lq_local_league.lg_id')
-                ->select('st_lq_competition.id','st_lq_local_match.match_id','st_lq_local_league.lg_id','st_lq_league.name_chinese','st_lq_league.last_time','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
+            $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.lg_id')
+                ->select('st_lq_competition.id','st_lq_competition.match_id','st_lq_competition.lg_id','st_lq_league.name_chinese','st_lq_league.last_time','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
                 ->orderby('st_lq_competition.match_date','desc')
                 ->orderby('st_lq_competition.match_time','desc')
                 ->paginate ($list);
         }
-
-
-
-//        if (is_array ($where) && count ($where) > 0) {
-//            $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.lg_id')
-//                ->select('st_lq_competition.id','st_lq_competition.match_id','st_lq_competition.lg_id','st_lq_league.name_chinese','st_lq_league.last_time','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
-//                ->orderby('st_lq_competition.match_date','desc')
-//                ->orderby('st_lq_competition.match_time','desc')
-//                ->where($where)
-//                ->orwhere($orwhere)
-//                ->paginate ($list);
-//        } else {
-//            $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.lg_id')
-//                ->select('st_lq_competition.id','st_lq_competition.match_id','st_lq_competition.lg_id','st_lq_league.name_chinese','st_lq_league.last_time','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
-//                ->orderby('st_lq_competition.match_date','desc')
-//                ->orderby('st_lq_competition.match_time','desc')
-//                ->paginate ($list);
-//        }
         if (!$data < 0) {
             return -2021052003; //
         }

+ 31 - 31
app/Models/SportsTennis.php

@@ -49,49 +49,49 @@ class SportsTennis extends BaseModel {
         
         $where[] = array('st_wq_league.name_chinese','<>','');
 
-        $source = \App\Models\Setinfo::where('id','1000')->first();
-        if($source->infocontent != '混合数据'){
-            $where[] = array('st_wq_local_match.source', '=', $source->infocontent);
-            $where[] = array('st_wq_local_league.source', '=', $source->infocontent);
-        }
+//        $source = \App\Models\Setinfo::where('id','1000')->first();
+//        if($source->infocontent != '混合数据'){
+//            $where[] = array('st_wq_local_match.source', '=', $source->infocontent);
+//            $where[] = array('st_wq_local_league.source', '=', $source->infocontent);
+//        }
+//
+//        if (is_array ($where) && count ($where) > 0) {
+//            $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.id')
+//                ->join('st_wq_local_match','st_wq_competition.id','=','st_wq_local_match.match_id')
+//                ->join('st_wq_local_league','st_wq_league.id','=','st_wq_local_league.lg_id')
+//                ->select('st_wq_competition.id','st_wq_local_match.match_id','st_wq_local_league.lg_id','st_wq_league.name_chinese','st_wq_league.last_time','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
+//                ->orderby('st_wq_competition.match_date','desc')
+//                ->orderby('st_wq_competition.match_time','desc')
+//                ->where($where)
+//                ->orwhere($orwhere)
+//                ->paginate ($list);
+//        } else {
+//            $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.id')
+//                ->join('st_wq_local_match','st_wq_competition.id','=','st_wq_local_match.match_id')
+//                ->join('st_wq_local_league','st_wq_league.id','=','st_wq_local_league.lg_id')
+//                ->select('st_wq_competition.id','st_wq_local_match.match_id','st_wq_local_league.lg_id','st_wq_league.name_chinese','st_wq_league.last_time','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
+//                ->orderby('st_wq_competition.match_date','desc')
+//                ->orderby('st_wq_competition.match_time','desc')
+//                ->paginate ($list);
+//        }
+
+
 
         if (is_array ($where) && count ($where) > 0) {
-            $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.id')
-                ->join('st_wq_local_match','st_wq_competition.id','=','st_wq_local_match.match_id')
-                ->join('st_wq_local_league','st_wq_league.id','=','st_wq_local_league.lg_id')
-                ->select('st_wq_competition.id','st_wq_local_match.match_id','st_wq_local_league.lg_id','st_wq_league.name_chinese','st_wq_league.last_time','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
+            $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.lg_id')
+                ->select('st_wq_competition.id','st_wq_competition.match_id','st_wq_competition.lg_id','st_wq_league.name_chinese','st_wq_league.last_time','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
                 ->orderby('st_wq_competition.match_date','desc')
                 ->orderby('st_wq_competition.match_time','desc')
                 ->where($where)
                 ->orwhere($orwhere)
                 ->paginate ($list);
         } else {
-            $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.id')
-                ->join('st_wq_local_match','st_wq_competition.id','=','st_wq_local_match.match_id')
-                ->join('st_wq_local_league','st_wq_league.id','=','st_wq_local_league.lg_id')
-                ->select('st_wq_competition.id','st_wq_local_match.match_id','st_wq_local_league.lg_id','st_wq_league.name_chinese','st_wq_league.last_time','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
+            $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.lg_id')
+                ->select('st_wq_competition.id','st_wq_competition.match_id','st_wq_competition.lg_id','st_wq_league.name_chinese','st_wq_league.last_time','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
                 ->orderby('st_wq_competition.match_date','desc')
                 ->orderby('st_wq_competition.match_time','desc')
                 ->paginate ($list);
         }
-
-
-
-//        if (is_array ($where) && count ($where) > 0) {
-//            $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.lg_id')
-//                ->select('st_wq_competition.id','st_wq_competition.match_id','st_wq_competition.lg_id','st_wq_league.name_chinese','st_wq_league.last_time','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
-//                ->orderby('st_wq_competition.match_date','desc')
-//                ->orderby('st_wq_competition.match_time','desc')
-//                ->where($where)
-//                ->orwhere($orwhere)
-//                ->paginate ($list);
-//        } else {
-//            $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.lg_id')
-//                ->select('st_wq_competition.id','st_wq_competition.match_id','st_wq_competition.lg_id','st_wq_league.name_chinese','st_wq_league.last_time','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
-//                ->orderby('st_wq_competition.match_date','desc')
-//                ->orderby('st_wq_competition.match_time','desc')
-//                ->paginate ($list);
-//        }
         if (!$data < 0) {
             return -2021052003; //
         }