@@ -71,7 +71,7 @@ class CrontabController extends BaseController{
try {
//开启事务
DB::beginTransaction();
- $time = 60*5;//60 秒
+ $time = 60*60*24;//60 秒
//处理指定时间内的赛事
StMatchModel::HandleMatch($time);
//提交事务
@@ -35,8 +35,8 @@ class StZqMatch extends Model
*/
public static function HandleMatch($time = 60,$time_sec = 100){
//拼接查询条件
- $time_unx_max = time() - $time;//查询最大时间 时间戳 5分钟前
- $time_unx_min = $time_unx_max - $time;//查询最小时间 时间戳 十分钟前
+ $time_unx_max = time() - $time;//查询最大时间 时间戳 24小时前
+ $time_unx_min = $time_unx_max - 600;//查询最小时间 时间戳 十分钟前
$where = [
['match_date','=',date('Y-m-d',$time_unx_min)],