!286 fix & improve

Merge pull request !286 from OceansDeep/pg
This commit is contained in:
OceansDeep 2023-05-17 06:17:41 +00:00 committed by Gitee
commit 048ca0e64a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -172,7 +172,7 @@ public class PromotionPriceUtil {
}
/**
* 特殊情况处理如参与多个促销活动部分商品在其他促销计算后的金额不足以满足与当前参与的促销活动的优惠金额
* 特殊情况处理如参与多个促销活动部分商品在其他促销计算后的金额不足以满足与当前参与的促销活动的优惠金额只计算使用优惠券不足的情况
*
* @param skuVOList 获取购物车信息
* @param skuPromotionDetail 参与活动的商品以及商品总金额
@ -202,7 +202,7 @@ public class PromotionPriceUtil {
double point = CurrencyUtil.div(k.getPriceDetailDTO().getGoodsPrice(), totalPrice, 4);
//商品优惠金额
Double skuDiscountPrice = CurrencyUtil.mul(discountPrice, point);
return skuDiscountPrice > k.getPriceDetailDTO().getCouponPrice();
return k.getPriceDetailDTO().getCouponPrice() > 0 && skuDiscountPrice > k.getPriceDetailDTO().getCouponPrice();
}
return false;
}).collect(Collectors.toList());