소스 검색

异常处理

彭俊 6 년 전
부모
커밋
f98fcbf69d
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      app/Http/Controllers/Api/CrontabController.php
  2. 2 2
      app/Http/Model/StZqMatch.php

+ 1 - 1
app/Http/Controllers/Api/CrontabController.php

@@ -71,7 +71,7 @@ class CrontabController extends BaseController{
         try {
             //开启事务
             DB::beginTransaction();
-            $time = 60*5;//60 秒
+            $time = 60*60*24;//60 秒
             //处理指定时间内的赛事
             StMatchModel::HandleMatch($time);
             //提交事务

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

@@ -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)],