Explorar o código

后台赛事列表

Jonlin %!s(int64=6) %!d(string=hai) anos
pai
achega
aeed3bb14e

+ 1 - 1
app/Models/SportsBase.php

@@ -13,7 +13,7 @@ class SportsBase extends BaseModel {
 
     function getinfo($list = 10, $page, $where = '',$orwhere = '')
     {
-        $bqmatch = $this->where('status','<','2')->get();
+        $bqmatch = $this->where('status','<','2')->where('match_date','<=',date("Y-m-d",time()))->get();
         for($b=0;$b<count($bqmatch);$b++){
             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']);

+ 1 - 1
app/Models/SportsBasket.php

@@ -13,7 +13,7 @@ class SportsBasket extends BaseModel {
 
     function getinfo($list = 10, $page, $where = '',$orwhere = '')
     {
-        $lqmatch = $this->where('status','<','2')->get();
+        $lqmatch = $this->where('status','<','2')->where('match_date','<=',date("Y-m-d",time()))->get();
         for($b=0;$b<count($lqmatch);$b++){
             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']);

+ 1 - 1
app/Models/SportsSoccer.php

@@ -13,7 +13,7 @@ class SportsSoccer extends BaseModel {
 
     function getinfo($list = 10, $page, $where = '',$orwhere = '')
     {
-        $zqmatch = $this->where('status','<','2')->get();
+        $zqmatch = $this->where('status','<','2')->where('match_date','<=',date("Y-m-d",time()))->get();
         for($b=0;$b<count($zqmatch);$b++){
             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']);

+ 1 - 1
app/Models/SportsTennis.php

@@ -13,7 +13,7 @@ class SportsTennis extends BaseModel {
 
     function getinfo($list = 10, $page, $where = '',$orwhere = '')
     {
-        $wqmatch = $this->where('status','<','2')->get();
+        $wqmatch = $this->where('status','<','2')->where('match_date','<=',date("Y-m-d",time()))->get();
         for($b=0;$b<count($wqmatch);$b++){
             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']);