From 39de61cb9872684a09d3b695db17a9871ea20530 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 11 Sep 2023 10:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A7=94=E6=89=98=E5=95=86?= =?UTF-8?q?=E5=93=81=E4=B8=8B=E5=8D=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/order/StoreOrderCreateRepository.php | 2 +- .../repositories/store/order/StoreOrderRepository.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index 433c12f1..946bfd57 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -172,7 +172,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository $product_cart = []; foreach ($merchantCart['list'] as $k => $cart) { - if ($order_type == 98 || $order_type == 99) { + if ($order_type == 98) { $merchantCart['list'][$k]['product']['delivery_way'] = $cart['product']['delivery_way'] = $deliverMethod ?? ''; } //获取订单类型, 活动商品单次只能购买一个 diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 4361c724..0fcd0c67 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -253,10 +253,10 @@ class StoreOrderRepository extends BaseRepository //更新委托订单处理 if ($order->activity_type == 99) { $cartIdArray = explode(',', $order->cart_id); - $cartList = Db::name('store_cart')->whereIn('cart_id', $cartIdArray)->select(); - foreach($cartList as $cart) { - if (!empty($cart['source_id'])) { - Db::name('community')->whereIn('community_id', $cart['source_id'])->update(['entrust_order_id' => $order->order_id ?? 0]); + $ecartList = Db::name('store_cart')->whereIn('cart_id', $cartIdArray)->select(); + foreach($ecartList as $ecart) { + if (!empty($ecart['source_id'])) { + Db::name('community')->where('community_id', $ecart['source_id'])->update(['entrust_order_id' => $order->order_id ?? 0]); } } }