优化:豆豆积分抵扣支持不足抵扣金额时有多少积分抵扣多少金额
This commit is contained in:
parent
b5c164a2b7
commit
e716d5dab2
|
|
@ -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;// 是否存在积分使用情况 只要存在一个则存在
|
||||
|
|
|
|||
Loading…
Reference in New Issue