dever 3 vuotta sitten
vanhempi
commit
7dc35a27f2
2 muutettua tiedostoa jossa 12 lisäystä ja 2 poistoa
  1. 9 1
      app/shop/database/sell_order.php
  2. 3 1
      app/shop/lib/Cron.php

+ 9 - 1
app/shop/database/sell_order.php

@@ -337,6 +337,15 @@ return array
             'list'      => true,
         ),
 
+        'notice'        => array
+        (
+            'type'      => 'tinyint-1',
+            'name'      => '是否发送通知',
+            'default'   => '1',
+            'desc'      => '是否发送通知',
+            'match'     => 'is_numeric',
+        ),
+
         'fdate'     => array
         (
             'type'      => 'int-11',
@@ -461,7 +470,6 @@ return array
                 'cdate' => array('yes', '>='),
                 'status' => 'yes',
                 'notice' => 'yes',
-                'note' => 'yes',
                 'state' => 1,
             ),
             'type' => 'all',

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

@@ -63,6 +63,7 @@ class Cron
         # 获取超过5分钟未支付的订单
         $time = time();
         $where['status'] = 1;
+        $where['notice'] = 1;
         $where['cdate'] = $time + 300;
         $order = Dever::db('shop/sell_order')->getDataByTime($where);
 
@@ -70,8 +71,9 @@ class Cron
             $config = Dever::db('shop/sell_order')->config;
             foreach ($order as $k => $v) {
                 if ($time - $v['cdate'] >= 900) {
-                    Dever::db('shop/sell_order')->update(array('where_id' => $v['id'], 'status' => 11));
+                    Dever::db('shop/sell_order')->update(array('where_id' => $v['id'], 'status' => 11, 'notice' => 2));
                 } else {
+                    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']);
                     $msg_param['type'] = 1;//消息类型1是订单消息