【功能修复】MALL:优惠劵的折扣计算不正确
This commit is contained in:
parent
ad22a9d516
commit
3d9ec1966f
|
@ -90,7 +90,7 @@ public class TradeCouponPriceCalculator implements TradePriceCalculator {
|
|||
if (PromotionDiscountTypeEnum.PRICE.getType().equals(coupon.getDiscountType())) { // 减价
|
||||
return coupon.getDiscountPrice();
|
||||
} else if (PromotionDiscountTypeEnum.PERCENT.getType().equals(coupon.getDiscountType())) { // 打折
|
||||
int couponPrice = totalPayPrice * coupon.getDiscountPercent() / 100;
|
||||
int couponPrice = totalPayPrice - (totalPayPrice * coupon.getDiscountPercent() / 100);
|
||||
return coupon.getDiscountLimitPrice() == null ? couponPrice
|
||||
: Math.min(couponPrice, coupon.getDiscountLimitPrice()); // 优惠上限
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue