dever 3 年之前
父节点
当前提交
ca6e117eae
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      app/shop/lib/Cron.php

+ 1 - 2
app/shop/lib/Cron.php

@@ -63,7 +63,6 @@ class Cron
         # 获取超过5分钟未支付的订单
         $time = time();
         $where['status'] = 1;
-        $where['notice'] = 1;
         $where['cdate'] = $time - 300;
         $order = Dever::db('shop/sell_order')->getDataByTime($where);
 
@@ -72,7 +71,7 @@ class Cron
             foreach ($order as $k => $v) {
                 if ($time - $v['cdate'] >= 900) {
                     Dever::db('shop/sell_order')->update(array('where_id' => $v['id'], 'status' => 11, 'notice' => 2));
-                } else {
+                } elseif ($v['notice'] == 1) {
                     Dever::db('shop/sell_order')->update(array('where_id' => $v['id'], 'notice' => 2));
                     $msg = "您有一笔待付款订单,请及时付款。\r\n订单15分钟内未付款自动取消~";
                     $shop = Dever::db('shop/info')->one($v['shop_id']);