shish hace 8 meses
padre
commit
6107a7255a
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  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();
 
             if ($order->fromType == 3 || $order->fromType == 4) {