From 1e37ca795d09a5e0b9a7f9acaf8fe4e49de62efe Mon Sep 17 00:00:00 2001 From: codeliu <1873441552@qq.com> Date: Fri, 22 Mar 2024 15:50:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=AF=E4=BB=98=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E4=B8=BB=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/order/StoreOrderCreateRepository.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index ea8ede45..ac18f171 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -1091,6 +1091,14 @@ class StoreOrderCreateRepository extends StoreOrderRepository } $user_address = isset($address) ? ($address['province'] . $address['city'] . $address['district'] . $address['street'] . $address['detail']) : ''; //整理订单数据 + $payPrice_order = $merchantCart['order']['pay_price']; + $couponPrice_order = bcadd($merchantCart['order']['coupon_price'], $merchantCart['order']['platform_coupon_price'], 2); + if($remarkMoney){ + $payPrice_order = $remarkMoney;//输入得金额 + $couponPrice_order = $merchantCart['order']['pay_price'] -$payPrice_order; + } + + $_order = [ 'cartInfo' => $merchantCart, 'activity_type' => $orderInfo['order_type'], @@ -1113,7 +1121,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository 'total_postage' => $merchantCart['order']['postage_price'], 'pay_postage' => $merchantCart['order']['postage_price'], 'svip_discount' => $merchantCart['order']['svip_discount'], - 'pay_price' => $merchantCart['order']['pay_price'], + 'pay_price' =>$payPrice_order, 'integral' => $merchantCart['order']['total_integral'], 'integral_price' => $merchantCart['order']['total_integral_price'], 'give_integral' => $merchantCart['order']['total_give_integral'], @@ -1122,7 +1130,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository 'order_extend' => count($order_extend) ? json_encode($order_extend, JSON_UNESCAPED_UNICODE) : '', 'coupon_id' => implode(',', $merchantCart['order']['useCouponIds']), 'mark' => $mark[$merchantCart['mer_id']] ?? '', - 'coupon_price' => bcadd($merchantCart['order']['coupon_price'], $merchantCart['order']['platform_coupon_price'], 2), + 'coupon_price' => $couponPrice_order, 'platform_coupon_price' => $merchantCart['order']['platform_coupon_price'], 'pay_type' => $pay_type, 'refund_switch' => $merchantCart['order']['order_refund_switch'],