H5 前端:商品详情页,接入促销活动
This commit is contained in:
@@ -244,7 +244,7 @@ public class CartServiceImpl implements CartService {
|
||||
return presentPrice >= 0 ? presentPrice : sku.getPrice(); // 如果计算优惠价格小于 0 ,则说明无法使用优惠。
|
||||
}
|
||||
if (PreferentialTypeEnum.DISCOUNT.getValue().equals(item.getPreferentialType())) { // 打折
|
||||
return sku.getPrice() * item.getPreferentialValue() / 100;
|
||||
return sku.getPrice() * item.getPreferentialValue() / 10;
|
||||
}
|
||||
throw new IllegalArgumentException(String.format("折扣活动(%s) 的优惠类型不正确", timeLimitedDiscount.toString()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user