dever 3 lat temu
rodzic
commit
b228f937a9
2 zmienionych plików z 9 dodań i 2 usunięć
  1. 2 1
      app/mshop/src/Data.php
  2. 7 1
      app/shop/lib/Sell.php

+ 2 - 1
app/mshop/src/Data.php

@@ -60,6 +60,7 @@ class Data extends Core
     public function notice()
     {
         $order_id = Dever::input('order_id');
+        $ps_order_num = Dever::input('ps_order_num');
 
         $info = Dever::db('shop/sell_order')->find(array('id' => $order_id));
 
@@ -121,7 +122,7 @@ class Data extends Core
                 }
             }
             if ($info['method'] == 2) {
-                Dever::load('shop/lib/sell')->updatePs($info, 2);
+                Dever::load('shop/lib/sell')->updatePs($info, 2, $ps_order_num);
             }
 
             

+ 7 - 1
app/shop/lib/Sell.php

@@ -897,7 +897,7 @@ class Sell
     }
 
     # 添加配送信息
-    public function updatePs($order, $status = 1)
+    public function updatePs($order, $status = 1, $order_num = false)
     {
         $where['order_id'] = $order['id'];
         $data = Dever::db('shop/sell_order_ps')->find($where);
@@ -911,6 +911,9 @@ class Sell
             if ($status == 2) {
                 $insert['qu_date'] = time();
             }
+            if ($order_num) {
+                $insert['order_num'] = $order_num;
+            }
         
             Dever::db('shop/sell_order_ps')->insert($insert);
         } else {
@@ -923,6 +926,9 @@ class Sell
             if ($status == 3) {
                 $update['qs_date'] = time();
             }
+            if ($order_num) {
+                $update['order_num'] = $order_num;
+            }
             Dever::db('shop/sell_order_ps')->update($update);
         }
     }