shish 7 сар өмнө
parent
commit
07447f1970

+ 24 - 27
app-ghs/controllers/OrderController.php

@@ -1361,33 +1361,30 @@ class OrderController extends BaseController
                 //跑腿订单生产者创建订单
                 // TODO
                 if ($order->payStatus == 1 && $sendType == dict::getDict('sendType', 'thirdSend') && $post['callErrand'] == 1) { // $post 中有 pickupTime,则说明是要立即发跑腿 或者  callErrand == 1
-                    $payWay = $post['payWay'];
-                    if($hasPay != dict::getDict('hasPay', 'unPay')){
-                        $platform = $post['deliveryPlatform'];
-                        $deliveryPrice = $post['deliveryPrice'];
-                        $deliveryDistance = $post['deliveryDistance'];
-                        $deliveryBracketContent = $post['deliveryBracketContent'];
-                        $pickupTime = $post['pickupTime'];
-                        $allParams = $post['deliveryAllParams'];
-
-                        $data = [
-                            'orderId' => $saleId,
-                            'shopId' => $this->shopId,
-                            'mainId' => $this->mainId,
-                            'platform' => $platform,
-                            'ip' => Yii::$app->request->userIP,
-                            'deliveryPrice' => $deliveryPrice,
-                            'deliveryDistance' => $deliveryDistance,
-                            'deliveryBracketContent' => $deliveryBracketContent,
-                            'pickupTime' => $pickupTime,
-                            'allParmas' => $allParams,
-                            // ----------
-                            'weight' => $post['weight'] ?? 1,
-                            'remark' => $post['deliveryRemark'] ?? '',
-                            'price' => $order->actPrice,
-                        ];
-                        GhsDeliveryOrderClass::askCreateOrder($data);
-                    }
+                    $platform = $post['deliveryPlatform'];
+                    $deliveryPrice = $post['deliveryPrice'];
+                    $deliveryDistance = $post['deliveryDistance'];
+                    $deliveryBracketContent = $post['deliveryBracketContent'];
+                    $pickupTime = $post['pickupTime'];
+                    $allParams = $post['deliveryAllParams'];
+
+                    $data = [
+                        'orderId' => $saleId,
+                        'shopId' => $this->shopId,
+                        'mainId' => $this->mainId,
+                        'platform' => $platform,
+                        'ip' => Yii::$app->request->userIP,
+                        'deliveryPrice' => $deliveryPrice,
+                        'deliveryDistance' => $deliveryDistance,
+                        'deliveryBracketContent' => $deliveryBracketContent,
+                        'pickupTime' => $pickupTime,
+                        'allParmas' => $allParams,
+                        // ----------
+                        'weight' => $post['weight'] ?? 1,
+                        'remark' => $post['deliveryRemark'] ?? '',
+                        'price' => $order->actPrice,
+                    ];
+                    GhsDeliveryOrderClass::askCreateOrder($data);
                 }
             }
             util::success($return);

+ 23 - 26
app-hd/controllers/OrderController.php

@@ -815,32 +815,29 @@ class OrderController extends BaseController
             //跑腿订单生产者创建订单 // TODO
             $sendType = $post['sendType'] ?? 0;
             if($order->payStatus == 1 && $sendType == dict::getDict('sendType', 'thirdSend') && $post['callErrand'] == 1){ // $post 中有 pickupTime,则说明是要立即发跑腿
-                $payWay = $post['payWay'];
-                if($hasPay != dict::getDict('hasPay', 'unPay')){
-                    $platform = $post['deliveryPlatform'];
-                    $deliveryPrice = $post['deliveryPrice'];
-                    $deliveryDistance = $post['deliveryDistance'];
-                    $deliveryBracketContent = $post['deliveryBracketContent'];
-                    $pickupTime = $post['pickupTime'];
-                    $allParams = $post['deliveryAllParams'];
-                    $data = [
-                        'orderId' => $order->id,
-                        'mainId' => $this->mainId,
-                        'shopId' => $this->shopId,
-                        'platform' => $platform,
-                        'ip' => Yii::$app->request->userIP,
-                        'deliveryPrice' => $deliveryPrice,
-                        'deliveryDistance' => $deliveryDistance,
-                        'deliveryBracketContent' => $deliveryBracketContent,
-                        'pickupTime' => $pickupTime,
-                        'allParams' => $allParams,
-                        //-----------------------
-                        'weight' => $post['weight'] ?? 1, // TODO
-                        'remark' => $post['deliveryRemark'] ?? '',
-                        'price' => $order->actPrice,
-                    ];
-                    HdDeliveryOrderClass::askCreateOrder($data);
-                }
+                $platform = $post['deliveryPlatform'];
+                $deliveryPrice = $post['deliveryPrice'];
+                $deliveryDistance = $post['deliveryDistance'];
+                $deliveryBracketContent = $post['deliveryBracketContent'];
+                $pickupTime = $post['pickupTime'];
+                $allParams = $post['deliveryAllParams'];
+                $data = [
+                    'orderId' => $order->id,
+                    'mainId' => $this->mainId,
+                    'shopId' => $this->shopId,
+                    'platform' => $platform,
+                    'ip' => Yii::$app->request->userIP,
+                    'deliveryPrice' => $deliveryPrice,
+                    'deliveryDistance' => $deliveryDistance,
+                    'deliveryBracketContent' => $deliveryBracketContent,
+                    'pickupTime' => $pickupTime,
+                    'allParams' => $allParams,
+                    //-----------------------
+                    'weight' => $post['weight'] ?? 1, // TODO
+                    'remark' => $post['deliveryRemark'] ?? '',
+                    'price' => $order->actPrice,
+                ];
+                HdDeliveryOrderClass::askCreateOrder($data);
             }
 
             util::success($return);