From 8b58c71282b9247bc3cbcee600e5a7eb11ecd364 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Fri, 21 Jun 2024 17:18:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=B0=E9=87=91=E6=94=B6?= =?UTF-8?q?=E9=93=B6=E7=BB=93=E7=AE=97=E6=96=B9=E5=BC=8F=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E7=8E=B0=E9=87=91=E6=94=B6=E9=93=B6=E7=9A=84=E5=86=BB=E7=BB=93?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/order/OrderLogic.php | 5 ++++- app/common/logic/PayNotifyLogic.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index cd25a0c76..8c1aea2c4 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -129,11 +129,14 @@ class OrderLogic extends BaseLogic self::$store_price = bcadd(self::$store_price, $cart_select[$k]['store_price'], 2);//门店零售价格 // self::$profit = bcadd(self::$profit, $cart_select[$k]['profit'], 2); } - if ($user && $user['user_ship'] == 1) { + //加支付方式限制 + $pay_type = isset($params['pay_type'])?$params['pay_type']:0; + if ($user && $user['user_ship'] == 1 && $pay_type !=17) { $pay_price = self::$pay_price; }else{ $pay_price =bcsub(self::$pay_price, self::$activity_price, 2); //减去活动优惠金额 } + if($pay_price < 500){ throw new Exception('金额低于500'); } diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index c7e0a9580..9d083d17d 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -355,7 +355,7 @@ class PayNotifyLogic extends BaseLogic } } } - elseif ($user['user_ship'] == 1){ + elseif ($user['user_ship'] == 1 && $order['pay_type'] != PayEnum::CASH_PAY){ $vipFrozenAmount = self::dealFrozenPrice($order['id']); //为1的时候要去减活动价 // $final_price = bcsub($order['pay_price'],$order['deduction_price'],2);