浏览代码

fix order_timeout_cancel

stanley-king 7 年之前
父节点
当前提交
e4928bda91
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      crontab/control/minutes.php

+ 5 - 3
crontab/control/minutes.php

@@ -13,12 +13,14 @@ class minutesControl extends BaseCronControl
 {
     public function indexOp()
     {
-        Log::record(__FUNCTION__,Log::DEBUG);
+        Log::record(__FUNCTION__ . " start",Log::DEBUG);
         //未付款订单超期自动关闭
-        //$this->_order_timeout_cancel();
+        $this->_order_timeout_cancel();
         $this->_cron_common();
         $this->_web_index_update();
         $this->_cron_mail_send();
+        Log::record(__FUNCTION__ . " end",Log::DEBUG);
+
     }
 
     /**
@@ -33,7 +35,7 @@ class minutesControl extends BaseCronControl
         $logic_order = Logic('order');
         $condition = array();
         $condition['order_state'] = ORDER_STATE_NEW;
-        $condition['add_time'] = array('lt',time() - ORDER_AUTO_CANCEL_DAY * self::EXE_TIMES);
+        $condition['add_time'] = array('lt',time() - ORDER_AUTO_CANCEL_DAY * 86400);
 
         //分批,每批处理100个订单,最多处理5W个订单
         for ($i = 0; $i < 500; $i++)