Jonlin 6 år sedan
förälder
incheckning
6b1cd6138e
4 ändrade filer med 32 tillägg och 120 borttagningar
  1. 8 30
      app/Models/SportsBase.php
  2. 8 30
      app/Models/SportsBasket.php
  3. 8 30
      app/Models/SportsSoccer.php
  4. 8 30
      app/Models/SportsTennis.php

+ 8 - 30
app/Models/SportsBase.php

@@ -13,37 +13,15 @@ class SportsBase extends BaseModel {
 
     function getinfo($list = 10, $page, $where = '',$orwhere = '')
     {
-        $bqmatch = $this->get();
+        $bqmatch = $this->where('status','<','2')->get();
         for($b=0;$b<count($bqmatch);$b++){
-            if($bqmatch[$b]->status == 0 || $bqmatch[$b]->status == 1){
-                if($bqmatch[$b]->match_date < date("Y-m-d",time()) && strtotime($bqmatch[$b]->match_time.' '.$bqmatch[$b]->match_time)+10800 < time()){
-                    \App\Models\SportsBase::where('match_id',$bqmatch[$b]->match_id)->update(['status'=>'2']);
-                    \App\Models\Stbqresultrecord::where('match_id',$bqmatch[$b]->match_id)->update(['status'=>'2']);
-//                    $comendnotice = \App\Model\Comendnotice::where('match_id',$bqmatch[$b]->match_id)->first();
-//                    if(empty($comendnotice)){
-//                        $db = new \App\Model\Comendnotice();
-//                        $db->status = 0;
-//                        $db->game_code = 'bq';
-//                        $db->match_id = $bqmatch[$b]->match_id;
-//                        $db->done_time = date("Y-m-d h:i:s", time());
-//                        $db->ctime = date("Y-m-d h:i:s", time());
-//                        $db->save();
-//                    }
-                }
-                if($bqmatch[$b]->match_date == date("Y-m-d",time()) && strtotime($bqmatch[$b]->match_date.' '.$bqmatch[$b]->match_time)+10800 < time()){
-                    \App\Models\SportsBase::where('match_id',$bqmatch[$b]->match_id)->update(['status'=>'2']);
-                    \App\Models\Stbqresultrecord::where('match_id',$bqmatch[$b]->match_id)->update(['status'=>'2']);
-//                    $comendnotice = \App\Model\Comendnotice::where('match_id',$bqmatch[$b]->match_id)->first();
-//                    if(empty($comendnotice)){
-//                        $db = new \App\Model\Comendnotice();
-//                        $db->status = 0;
-//                        $db->game_code = 'bq';
-//                        $db->match_id = $bqmatch[$b]->match_id;
-//                        $db->done_time = date("Y-m-d h:i:s", time());
-//                        $db->ctime = date("Y-m-d h:i:s", time());
-//                        $db->save();
-//                    }
-                }
+            if($bqmatch[$b]->match_date < date("Y-m-d",time()) && strtotime($bqmatch[$b]->match_time.' '.$bqmatch[$b]->match_time)+10800 < time()){
+                \App\Models\SportsBase::where('match_id',$bqmatch[$b]->match_id)->update(['status'=>'2']);
+                \App\Models\Stbqresultrecord::where('match_id',$bqmatch[$b]->match_id)->update(['status'=>'2']);
+            }
+            if($bqmatch[$b]->match_date == date("Y-m-d",time()) && strtotime($bqmatch[$b]->match_date.' '.$bqmatch[$b]->match_time)+10800 < time()){
+                \App\Models\SportsBase::where('match_id',$bqmatch[$b]->match_id)->update(['status'=>'2']);
+                \App\Models\Stbqresultrecord::where('match_id',$bqmatch[$b]->match_id)->update(['status'=>'2']);
             }
         }
         

+ 8 - 30
app/Models/SportsBasket.php

@@ -13,37 +13,15 @@ class SportsBasket extends BaseModel {
 
     function getinfo($list = 10, $page, $where = '',$orwhere = '')
     {
-        $lqmatch = $this->get();
+        $lqmatch = $this->where('status','<','2')->get();
         for($b=0;$b<count($lqmatch);$b++){
-            if($lqmatch[$b]->status == 0 || $lqmatch[$b]->status == 1){
-                if($lqmatch[$b]->match_date < date("Y-m-d",time()) && strtotime($lqmatch[$b]->match_time.' '.$lqmatch[$b]->match_time)+4200 < time()){
-                    \App\Models\SportsBasket::where('id',$lqmatch[$b]->id)->update(['status'=>'2']);
-                    \App\Models\Stlqresultrecord::where('match_id',$lqmatch[$b]->match_id)->update(['status'=>'2']);
-//                    $comendnotice = \App\Model\Comendnotice::where('match_id',$lqmatch[$b]->match_id)->first();
-//                    if(empty($comendnotice)){
-//                        $db = new \App\Model\Comendnotice();
-//                        $db->status = 0;
-//                        $db->game_code = 'lq';
-//                        $db->match_id = $lqmatch[$b]->match_id;
-//                        $db->done_time = date("Y-m-d h:i:s", time());
-//                        $db->ctime = date("Y-m-d h:i:s", time());
-//                        $db->save();
-//                    }
-                }
-                if($lqmatch[$b]->match_date == date("Y-m-d",time()) && strtotime($lqmatch[$b]->match_date.' '.$lqmatch[$b]->match_time)+4200 < time()){
-                    \App\Models\SportsBasket::where('id',$lqmatch[$b]->id)->update(['status'=>'2']);
-                    \App\Models\Stlqresultrecord::where('match_id',$lqmatch[$b]->match_id)->update(['status'=>'2']);
-//                    $comendnotice = \App\Model\Comendnotice::where('match_id',$lqmatch[$b]->match_id)->first();
-//                    if(empty($comendnotice)){
-//                        $db = new \App\Model\Comendnotice();
-//                        $db->status = 0;
-//                        $db->game_code = 'lq';
-//                        $db->match_id = $lqmatch[$b]->match_id;
-//                        $db->done_time = date("Y-m-d h:i:s", time());
-//                        $db->ctime = date("Y-m-d h:i:s", time());
-//                        $db->save();
-//                    }
-                }
+            if($lqmatch[$b]->match_date < date("Y-m-d",time()) && strtotime($lqmatch[$b]->match_time.' '.$lqmatch[$b]->match_time)+4200 < time()){
+                \App\Models\SportsBasket::where('id',$lqmatch[$b]->id)->update(['status'=>'2']);
+                \App\Models\Stlqresultrecord::where('match_id',$lqmatch[$b]->match_id)->update(['status'=>'2']);
+            }
+            if($lqmatch[$b]->match_date == date("Y-m-d",time()) && strtotime($lqmatch[$b]->match_date.' '.$lqmatch[$b]->match_time)+4200 < time()){
+                \App\Models\SportsBasket::where('id',$lqmatch[$b]->id)->update(['status'=>'2']);
+                \App\Models\Stlqresultrecord::where('match_id',$lqmatch[$b]->match_id)->update(['status'=>'2']);
             }
         }
 

+ 8 - 30
app/Models/SportsSoccer.php

@@ -13,37 +13,15 @@ class SportsSoccer extends BaseModel {
 
     function getinfo($list = 10, $page, $where = '',$orwhere = '')
     {
-        $zqmatch = $this->get();
+        $zqmatch = $this->where('status','<','2')->get();
         for($b=0;$b<count($zqmatch);$b++){
-            if($zqmatch[$b]->status == 0 || $zqmatch[$b]->status == 1){
-                if($zqmatch[$b]->match_date < date("Y-m-d",time()) && strtotime($zqmatch[$b]->match_time.' '.$zqmatch[$b]->match_time)+7200 < time()){
-                    \App\Models\SportsSoccer::where('id',$zqmatch[$b]->id)->update(['status'=>'2']);
-                    \App\Models\Stzqresultrecord::where('match_id',$zqmatch[$b]->match_id)->update(['status'=>'2']);
-//                    $comendnotice = \App\Model\Comendnotice::where('match_id',$zqmatch[$b]->match_id)->first();
-//                    if(empty($comendnotice)){
-//                        $db = new \App\Model\Comendnotice();
-//                        $db->status = 0;
-//                        $db->game_code = 'zq';
-//                        $db->match_id = $zqmatch[$b]->match_id;
-//                        $db->done_time = date("Y-m-d h:i:s", time());
-//                        $db->ctime = date("Y-m-d h:i:s", time());
-//                        $db->save();
-//                    }
-                }
-                if($zqmatch[$b]->match_date == date("Y-m-d",time()) && strtotime($zqmatch[$b]->match_date.' '.$zqmatch[$b]->match_time)+7200 < time()){
-                    \App\Models\SportsSoccer::where('id',$zqmatch[$b]->id)->update(['status'=>'2']);
-                    \App\Models\Stzqresultrecord::where('match_id',$zqmatch[$b]->match_id)->update(['status'=>'2']);
-//                    $comendnotice = \App\Model\Comendnotice::where('match_id',$zqmatch[$b]->match_id)->first();
-//                    if(empty($comendnotice)){
-//                        $db = new \App\Model\Comendnotice();
-//                        $db->status = 0;
-//                        $db->game_code = 'zq';
-//                        $db->match_id = $zqmatch[$b]->match_id;
-//                        $db->done_time = date("Y-m-d h:i:s", time());
-//                        $db->ctime = date("Y-m-d h:i:s", time());
-//                        $db->save();
-//                    }
-                }
+            if($zqmatch[$b]->match_date < date("Y-m-d",time()) && strtotime($zqmatch[$b]->match_time.' '.$zqmatch[$b]->match_time)+7200 < time()){
+                \App\Models\SportsSoccer::where('id',$zqmatch[$b]->id)->update(['status'=>'2']);
+                \App\Models\Stzqresultrecord::where('match_id',$zqmatch[$b]->match_id)->update(['status'=>'2']);
+            }
+            if($zqmatch[$b]->match_date == date("Y-m-d",time()) && strtotime($zqmatch[$b]->match_date.' '.$zqmatch[$b]->match_time)+7200 < time()){
+                \App\Models\SportsSoccer::where('id',$zqmatch[$b]->id)->update(['status'=>'2']);
+                \App\Models\Stzqresultrecord::where('match_id',$zqmatch[$b]->match_id)->update(['status'=>'2']);
             }
         }
         

+ 8 - 30
app/Models/SportsTennis.php

@@ -13,37 +13,15 @@ class SportsTennis extends BaseModel {
 
     function getinfo($list = 10, $page, $where = '',$orwhere = '')
     {
-        $wqmatch = $this->get();
+        $wqmatch = $this->where('status','<','2')->get();
         for($b=0;$b<count($wqmatch);$b++){
-            if($wqmatch[$b]->status == 0 || $wqmatch[$b]->status == 1){
-                if($wqmatch[$b]->match_date < date("Y-m-d",time()) && strtotime($wqmatch[$b]->match_time.' '.$wqmatch[$b]->match_time)+10800 < time()){
-                    \App\Models\SportsTennis::where('match_id',$wqmatch[$b]->match_id)->update(['status'=>'2']);
-                    \App\Models\Stwqresultrecord::where('match_id',$wqmatch[$b]->match_id)->update(['status'=>'2']);
-//                    $comendnotice = \App\Model\Comendnotice::where('match_id',$wqmatch[$b]->match_id)->first();
-//                    if(empty($comendnotice)){
-//                        $db = new \App\Model\Comendnotice();
-//                        $db->status = 0;
-//                        $db->game_code = 'wq';
-//                        $db->match_id = $wqmatch[$b]->match_id;
-//                        $db->done_time = date("Y-m-d h:i:s", time());
-//                        $db->ctime = date("Y-m-d h:i:s", time());
-//                        $db->save();
-//                    }
-                }
-                if($wqmatch[$b]->match_date == date("Y-m-d",time()) && strtotime($wqmatch[$b]->match_date.' '.$wqmatch[$b]->match_time)+10800 < time()){
-                    \App\Models\SportsTennis::where('match_id',$wqmatch[$b]->match_id)->update(['status'=>'2']);
-                    \App\Models\Stwqresultrecord::where('match_id',$wqmatch[$b]->match_id)->update(['status'=>'2']);
-//                    $comendnotice = \App\Model\Comendnotice::where('match_id',$wqmatch[$b]->match_id)->first();
-//                    if(empty($comendnotice)){
-//                        $db = new \App\Model\Comendnotice();
-//                        $db->status = 0;
-//                        $db->game_code = 'wq';
-//                        $db->match_id = $wqmatch[$b]->match_id;
-//                        $db->done_time = date("Y-m-d h:i:s", time());
-//                        $db->ctime = date("Y-m-d h:i:s", time());
-//                        $db->save();
-//                    }
-                }
+            if($wqmatch[$b]->match_date < date("Y-m-d",time()) && strtotime($wqmatch[$b]->match_time.' '.$wqmatch[$b]->match_time)+10800 < time()){
+                \App\Models\SportsTennis::where('match_id',$wqmatch[$b]->match_id)->update(['status'=>'2']);
+                \App\Models\Stwqresultrecord::where('match_id',$wqmatch[$b]->match_id)->update(['status'=>'2']);
+            }
+            if($wqmatch[$b]->match_date == date("Y-m-d",time()) && strtotime($wqmatch[$b]->match_date.' '.$wqmatch[$b]->match_time)+10800 < time()){
+                \App\Models\SportsTennis::where('match_id',$wqmatch[$b]->match_id)->update(['status'=>'2']);
+                \App\Models\Stwqresultrecord::where('match_id',$wqmatch[$b]->match_id)->update(['status'=>'2']);
             }
         }