mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-25 16:51:52 +08:00
【代码优化】商城:完善满减送的计算逻辑
This commit is contained in:
parent
222aa33f3e
commit
190c75f4ac
@ -234,7 +234,7 @@ public class RewardActivityServiceImpl implements RewardActivityService {
|
||||
activityDTO.getRules().forEach(rule -> {
|
||||
String description = "";
|
||||
if (PromotionConditionTypeEnum.PRICE.getType().equals(activityDTO.getConditionType())) {
|
||||
description += StrUtil.format("满 {} 元", rule.getLimit());
|
||||
description += StrUtil.format("满 {} 元", MoneyUtils.fenToYuanStr(rule.getLimit()));
|
||||
} else {
|
||||
description += StrUtil.format("满 {} 件", rule.getLimit());
|
||||
}
|
||||
|
@ -62,3 +62,8 @@ tenant-id: {{appTenentId}}
|
||||
GET {{appApi}}/trade/order/get-express-track-list?id=70
|
||||
Authorization: Bearer {{appToken}}
|
||||
tenant-id: {{appTenentId}}
|
||||
|
||||
### /trade-order/settlement-product 获得商品结算信息
|
||||
GET {{appApi}}/trade/order/settlement-product?spuIds=633
|
||||
Authorization: Bearer {{appToken}}
|
||||
tenant-id: {{appTenentId}}
|
@ -125,7 +125,7 @@ public class TradePriceServiceImpl implements TradePriceService {
|
||||
TradePriceCalculateRespBO.OrderItem orderItem = new TradePriceCalculateRespBO.OrderItem()
|
||||
.setPayPrice(sku.getPrice()).setCount(1);
|
||||
// 计算限时折扣的优惠价格
|
||||
DiscountProductRespDTO discountProduct = skuIdAndDiscountMap.get(orderItem.getSkuId());
|
||||
DiscountProductRespDTO discountProduct = skuIdAndDiscountMap.get(sku.getId());
|
||||
Integer discountPrice = discountActivityPriceCalculator.calculateActivityPrice(discountProduct, orderItem);
|
||||
// 计算 VIP 优惠金额
|
||||
Integer vipPrice = discountActivityPriceCalculator.calculateVipPrice(level, orderItem);
|
||||
|
Loading…
Reference in New Issue
Block a user