Ver código fonte

完成取货

shish 8 meses atrás
pai
commit
6107a7255a
1 arquivos alterados com 9 adições e 0 exclusões
  1. 9 0
      app-hd/controllers/OrderController.php

+ 9 - 0
app-hd/controllers/OrderController.php

@@ -783,6 +783,15 @@ class OrderController extends BaseController
                 }
                 }
             }
             }
 
 
+            $getGoods = $post['getGoods'] ?? 0;
+            if ($getGoods == 1) {
+                //到店自取订单,并且是待取货状态,则自动完成取货
+                if ($order->sendType == 1 && $order->status == 2) {
+                    $order->status = 4;
+                    $order->save();
+                }
+            }
+
             $transaction->commit();
             $transaction->commit();
 
 
             if ($order->fromType == 3 || $order->fromType == 4) {
             if ($order->fromType == 3 || $order->fromType == 4) {