|
|
@@ -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']);
|
|
|
}
|
|
|
}
|
|
|
|