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;// 是否存在积分使用情况 只要存在一个则存在