songxingwei %!s(int64=2) %!d(string=hai) anos
pai
achega
fdc7326c2e
Modificáronse 1 ficheiros con 5 adicións e 5 borrados
  1. 5 5
      application/api/controller/Timedtask.php

+ 5 - 5
application/api/controller/Timedtask.php

@@ -119,13 +119,13 @@ class Timedtask
             if ($now_hour==16 && $min>30){
                 die();
             }
-            $all = Db::name('system_day')->where('date',date('Y-m-d'))->value('now_value');
+            $all = Db::name('system_day')->where('date',date('Y-m-d'))->value('all_value');
             if ($all>0){
                 $now_time = date('Y-m-d 07:00:00');
                 $end_time = date('Y-m-d 10:00:00');
-                $now_time1 = date('Y-m-d H:i:s');
+                $now_time1 = date('Y-m-d 14:00:00');
                 $end_time1 = date('Y-m-d 16:30:00');
-                $strto = (strtotime($end_time1)-strtotime($now_time1));
+                $strto = (strtotime($end_time)-strtotime($now_time))+(strtotime($end_time1)-strtotime($now_time1));
                 $num = ceil($all/($strto/5));
                 $num_array =array();
                 for ($i=$num-2;$i<=$num+2;$i++){
@@ -174,9 +174,9 @@ class Timedtask
             if ($all>0){
                 $now_time = date('Y-m-d 07:00:00');
                 $end_time = date('Y-m-d 10:00:00');
-                $now_time1 = date('Y-m-d H:i:s');
+                $now_time1 = date('Y-m-d 14:00:00');
                 $end_time1 = date('Y-m-d 16:30:00');
-                $strto = (strtotime($end_time1)-strtotime($now_time1));
+                $strto = (strtotime($end_time)-strtotime($now_time))+(strtotime($end_time1)-strtotime($now_time1));
                 $num = ceil($all/($strto/5));
                 echo $num;die;
                 $num_array =array();