From e716d5dab238ac32be577017443ce449ddd8f0f3 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Wed, 31 Jan 2024 13:44:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E8=B1=86=E8=B1=86?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E6=8A=B5=E6=89=A3=E6=94=AF=E6=8C=81=E4=B8=8D?= =?UTF-8?q?=E8=B6=B3=E6=8A=B5=E6=89=A3=E9=87=91=E9=A2=9D=E6=97=B6=E6=9C=89?= =?UTF-8?q?=E5=A4=9A=E5=B0=91=E7=A7=AF=E5=88=86=E6=8A=B5=E6=89=A3=E5=A4=9A?= =?UTF-8?q?=E5=B0=91=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repositories/store/order/StoreOrderCreateRepository.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index a12fdfd..48f3cf8 100644 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -820,6 +820,10 @@ class StoreOrderCreateRepository extends StoreOrderRepository } // 实际抵扣金额 * 购买数量 $productIntegralPrice = bcmul($productIntegralPrice, $cart['cart_num'], 2); + // 判断:如果实际抵扣金额 超过持有积分,则实际抵扣金额=持有积分 2024-1-31 + $productIntegralPrice = $productIntegralPrice > $hold_legumes_integral ? $hold_legumes_integral : $productIntegralPrice; + + // 判断:当前商品是否可以参与积分抵扣 $isParticipation = $merchantCart['order']['true_price'] > 0 && $cart['product_type'] == 0 && $integralFlag && $productIntegralPrice > 0; if($isParticipation) $is_has_integral_use = 1;// 是否存在积分使用情况 只要存在一个则存在