From 84efa97ed06a1f8ff42e8a0e71bbf01a594a183d Mon Sep 17 00:00:00 2001 From: "DESKTOP-GMUNQ1B\\Administrator" <604446095@qq.com> Date: Fri, 6 Dec 2024 16:44:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=B6=E9=93=B6=E5=8F=B0?= =?UTF-8?q?=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/order/OrderLogic.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index c0c953e2..88fafce7 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -882,12 +882,16 @@ class OrderLogic extends BaseLogic } //开启活动或用户身份为 商户、酒店、食堂 展示成本价(即商户价) //目前已修改为 商品分组报价,根据用户组展示对应的价格 + if ($offActivity == 1) { + $price = $product['cost']; + } else { $price = $product['price']; //单门店活动判断 - if ($storeId == getenv('ACTIVITY_STORE_ID')) { - $storeBranchPrice = StoreBranchProduct::where('store_id', getenv('ACTIVITY_STORE_ID'))->where('product_id', $product['id'])->value('price'); - if ($storeBranchPrice) { - $price = $storeBranchPrice; + if ($storeId == getenv('ACTIVITY_STORE_ID')) { + $storeBranchPrice = StoreBranchProduct::where('store_id', getenv('ACTIVITY_STORE_ID'))->where('product_id', $product['id'])->value('price'); + if ($storeBranchPrice) { + $price = $storeBranchPrice; + } } } if ($offActivity == 0 && $product['top_cate_id'] == 15189 && $user && $user['user_ship'] == 5) {