shish 2 年 前
コミット
8d84a8976a
1 ファイル変更9 行追加1 行削除
  1. 9 1
      app-ghs/controllers/OrderController.php

+ 9 - 1
app-ghs/controllers/OrderController.php

@@ -826,7 +826,7 @@ class OrderController extends BaseController
             $priceMap = CustomClass::$levelPriceKeyMap;
             $addPriceMap = CustomClass::$levelAddPriceKeyMap;
             $level = $custom['level'] ?? 1;
-            foreach ($productList as $currentProduct) {
+            foreach ($productList as $currentKey => $currentProduct) {
                 $currentPrice = $currentProduct['price'] ?? 0;
                 $currentId = $currentProduct['productId'] ?? 0;
                 $systemInfo = $itemInfo[$currentId] ?? [];
@@ -839,12 +839,20 @@ class OrderController extends BaseController
                         'kdPrice' => $currentPrice,
                     ];
                 }
+                //帮开预订单没有价格
+                if ($book == 1) {
+                    $productList[$currentKey]['price'] = 0;
+                }
             }
             if (!empty($diff)) {
                 util::success(['diff' => $diff, 'respondType' => 'priceError']);
             }
         }
 
+        if ($book == 1) {
+            $post['onlinePay'] = 2;
+            $post['payWay'] = 0;
+        }
 
         //4秒内不允许重复开单
         $staffId = $this->shopAdminId ?? 0;