|
|
@@ -13,17 +13,17 @@ class SportsSoccer extends BaseModel {
|
|
|
|
|
|
function getinfo($list = 10, $page, $where = '',$orwhere = '')
|
|
|
{
|
|
|
-// $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']);
|
|
|
-// \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']);
|
|
|
-// }
|
|
|
-// }
|
|
|
+ $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']);
|
|
|
+ \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']);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
$where[] = array('st_zq_league.name_chinese','<>','');
|
|
|
|
|
|
@@ -75,7 +75,7 @@ class SportsSoccer extends BaseModel {
|
|
|
}
|
|
|
|
|
|
//赛事结果处理状态查询
|
|
|
- $result = \App\Models\Comendnotice::where('game_code','zq')->get();
|
|
|
+ //$result = \App\Models\Comendnotice::where('game_code','zq')->get();
|
|
|
|
|
|
for($i=0;$i<count($data);$i++){
|
|
|
|
|
|
@@ -108,25 +108,25 @@ class SportsSoccer extends BaseModel {
|
|
|
}
|
|
|
|
|
|
//赛事结果状态
|
|
|
- $data[$i]->result_status = -1;
|
|
|
- $data[$i]->result_id = -1;
|
|
|
- if(!empty($result)){
|
|
|
- for($j=0;$j<count($result);$j++){
|
|
|
- if($data[$i]->match_id == $result[$j]->match_id){
|
|
|
- $data[$i]->result_status = $result[$j]->status;
|
|
|
- $data[$i]->result_id = $result[$j]->id;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if($data[$i]->result_status != -1){
|
|
|
- if($data[$i]->result_status == 0){
|
|
|
- $data[$i]->result = '<a class="layui-btn layui-btn-sm dealwith" lay-event="detail" pid="id" uri="/admin/SportsSoccer/dealwith/?id=" href="javascript:dealwith(\'/admin/SportsSoccer/dealwith/?id='.$data[$i]->result_id.'\');" style="background-color: #FF5722;"> 处理 </a>';
|
|
|
- }else{
|
|
|
- $data[$i]->result = '<a class="layui-btn layui-btn-sm dealwith" lay-event="detail" pid="id" uri="" href="javascript:void(0)" style="background-color: #FFAF60;"> 已处理 </a>';
|
|
|
- }
|
|
|
- }else{
|
|
|
- $data[$i]->result = '<a class="layui-btn layui-btn-sm audit" lay-event="detail" pid="id" uri="" href="javascript:void(0)" style="background-color: grey;"> 处理 </a>';
|
|
|
- }
|
|
|
+// $data[$i]->result_status = -1;
|
|
|
+// $data[$i]->result_id = -1;
|
|
|
+// if(!empty($result)){
|
|
|
+// for($j=0;$j<count($result);$j++){
|
|
|
+// if($data[$i]->match_id == $result[$j]->match_id){
|
|
|
+// $data[$i]->result_status = $result[$j]->status;
|
|
|
+// $data[$i]->result_id = $result[$j]->id;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if($data[$i]->result_status != -1){
|
|
|
+// if($data[$i]->result_status == 0){
|
|
|
+// $data[$i]->result = '<a class="layui-btn layui-btn-sm dealwith" lay-event="detail" pid="id" uri="/admin/SportsSoccer/dealwith/?id=" href="javascript:dealwith(\'/admin/SportsSoccer/dealwith/?id='.$data[$i]->result_id.'\');" style="background-color: #FF5722;"> 处理 </a>';
|
|
|
+// }else{
|
|
|
+// $data[$i]->result = '<a class="layui-btn layui-btn-sm dealwith" lay-event="detail" pid="id" uri="" href="javascript:void(0)" style="background-color: #FFAF60;"> 已处理 </a>';
|
|
|
+// }
|
|
|
+// }else{
|
|
|
+// $data[$i]->result = '<a class="layui-btn layui-btn-sm audit" lay-event="detail" pid="id" uri="" href="javascript:void(0)" style="background-color: grey;"> 处理 </a>';
|
|
|
+// }
|
|
|
}
|
|
|
return $data->toArray();
|
|
|
}
|