Browse Source

追加推送 调整写入初始赛事结果

彭俊 6 years ago
parent
commit
74abf18840

+ 2 - 2
app/Http/Model/StBqResult.php

@@ -18,7 +18,7 @@ class StBqResult extends Model
     public static function BQresult($model){
         //获取赛事表15天内所有非 未开始赛事
         $matchData = $model['model_match']::select('id','home_team','guest_team','lg_id','status','tag','match_time')
-            ->where([['status','>',0],['match_date','>',date('Y-m-d', strtotime("-15 day"))]])
+            ->where([['ctime','>',date('Y-m-d H:m:i', strtotime("-7 day"))]])
             ->get()
             ->toarray();
 
@@ -26,7 +26,7 @@ class StBqResult extends Model
         if(empty($matchData)) return Response::success();
         //获取赛事结果表 所有当月
         $matchData_r = $model['model_result']::select('match_id')
-            ->where([['status','>',0],['update_time','>',date('Y-m-d', strtotime("-15 day"))]])
+            ->where([['ctime','>',date('Y-m-d H:m:i', strtotime("-7 day"))]])
             ->get()
             ->toarray();
 

+ 2 - 2
app/Http/Model/StLqResult.php

@@ -18,7 +18,7 @@ class StLqResult extends Model
     public static function LQresult($model){
         //获取赛事表15天内所有非 未开始赛事
         $matchData = $model['model_match']::select('id','home_team','guest_team','lg_id','status','tag','match_time')
-            ->where([['status','>',0],['match_date','>',date('Y-m-d', strtotime("-15 day"))]])
+            ->where([['ctime','>',date('Y-m-d H:m:i', strtotime("-7 day"))]])
             ->get()
             ->toarray();
 
@@ -26,7 +26,7 @@ class StLqResult extends Model
         if(empty($matchData)) return Response::success();
         //获取赛事结果表 15天内
         $matchData_r = $model['model_result']::select('match_id')
-            ->where([['status','>',0],['update_time','>',date('Y-m-d', strtotime("-15 day"))]])
+            ->where([['ctime','>',date('Y-m-d H:m:i', strtotime("-7 day"))]])
             ->get()
             ->toarray();
         //结果表无数据,直接插入

+ 2 - 2
app/Http/Model/StWqResult.php

@@ -18,7 +18,7 @@ class StWqResult extends Model
     public static function WQresult($model){
         //获取赛事表15天内所有非 未开始赛事
         $matchData = $model['model_match']::select('id','home_team','guest_team','lg_id','status','tag','match_time')
-            ->where([['status','>',0],['match_date','>',date('Y-m-d', strtotime("-15 day"))]])
+            ->where([['ctime','>',date('Y-m-d H:m:i', strtotime("-7 day"))]])
             ->get()
             ->toarray();
 
@@ -26,7 +26,7 @@ class StWqResult extends Model
         if(empty($matchData)) return Response::success();
         //获取赛事结果表 所有当月
         $matchData_r = $model['model_result']::select('match_id')
-            ->where([['status','>',0],['update_time','>',date('Y-m-d', strtotime("-15 day"))]])
+            ->where([['ctime','>',date('Y-m-d H:m:i', strtotime("-7 day"))]])
             ->get()
             ->toarray();
 

+ 2 - 2
app/Http/Model/StZqResult.php

@@ -17,7 +17,7 @@ class StZqResult extends Model
     public static function ZQresult($model){
         //获取赛事表15天内所有非 未开始赛事
         $matchData = $model['model_match']::select('id','home_team','guest_team','lg_id','status','tag','match_time')
-            ->where([['status','>',0],['match_date','>',date('Y-m-d', strtotime("-15 day"))]])
+            ->where([['ctime','>',date('Y-m-d H:m:i', strtotime("-7 day"))]])
             ->get()
             ->toarray();
 
@@ -25,7 +25,7 @@ class StZqResult extends Model
         if(empty($matchData)) return Response::success();
         //获取赛事结果表 所有当月
         $matchData_r = $model['model_result']::select('match_id')
-            ->where([['status','>',0],['update_time','>',date('Y-m-d', strtotime("-15 day"))]])
+            ->where([['ctime','>',date('Y-m-d H:m:i', strtotime("-7 day"))]])
             ->get()
             ->toarray();