From af108614439ff248dfd5592493441d4d51ffd72c Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Fri, 18 Aug 2023 14:56:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BD=AC=E5=94=AE=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E9=80=81=E8=B4=A7=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/order/StoreOrderCreateRepository.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index 7105ed46..a7241ee9 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -113,6 +113,8 @@ class StoreOrderCreateRepository extends StoreOrderRepository if (!$community) { throw new ValidateException('转售商品数据异常'); } + $deliverMethod = Db::name('resale')->where('community_id', $communityIdArray[0] ?? 0)->value('deliver_method'); + $deliverMethodArray = explode(',', $deliverMethod); } unset($merchantCart, $cart); $order_price = 0; @@ -135,6 +137,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository $order_svip_discount = 0; // 循环计算每个店铺的订单数据 foreach ($merchantCartList as &$merchantCart) { + if ($order_type == 98) { + $merchantCart['delivery_way'] = $deliverMethodArray ?? []; + } $postageRule = []; $total_price = 0; $total_num = 0; @@ -164,6 +169,10 @@ class StoreOrderCreateRepository extends StoreOrderRepository $product_cart = []; foreach ($merchantCart['list'] as $k => $cart) { + //处理转售送货方式 + if ($order_type == 98) { + $merchantCart['list'][$k]['product']['delivery_way'] = $cart['product']['delivery_way'] = $deliverMethod ?? ''; + } //获取订单类型, 活动商品单次只能购买一个 if ($cart['product']['delivery_way']) { $delivery_way = explode(',', $cart['product']['delivery_way']);