Commit 190c75f4ac67b8c92c124f5e35488e35955d25f5
1 parent
222aa33f
【代码优化】商城:完善满减送的计算逻辑
Showing
3 changed files
with
7 additions
and
2 deletions
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/reward/RewardActivityServiceImpl.java
| ... | ... | @@ -234,7 +234,7 @@ public class RewardActivityServiceImpl implements RewardActivityService { |
| 234 | 234 | activityDTO.getRules().forEach(rule -> { |
| 235 | 235 | String description = ""; |
| 236 | 236 | if (PromotionConditionTypeEnum.PRICE.getType().equals(activityDTO.getConditionType())) { |
| 237 | - description += StrUtil.format("满 {} 元", rule.getLimit()); | |
| 237 | + description += StrUtil.format("满 {} 元", MoneyUtils.fenToYuanStr(rule.getLimit())); | |
| 238 | 238 | } else { |
| 239 | 239 | description += StrUtil.format("满 {} 件", rule.getLimit()); |
| 240 | 240 | } | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/AppTradeOrderController.http
| ... | ... | @@ -62,3 +62,8 @@ tenant-id: {{appTenentId}} |
| 62 | 62 | GET {{appApi}}/trade/order/get-express-track-list?id=70 |
| 63 | 63 | Authorization: Bearer {{appToken}} |
| 64 | 64 | tenant-id: {{appTenentId}} |
| 65 | + | |
| 66 | +### /trade-order/settlement-product 获得商品结算信息 | |
| 67 | +GET {{appApi}}/trade/order/settlement-product?spuIds=633 | |
| 68 | +Authorization: Bearer {{appToken}} | |
| 69 | +tenant-id: {{appTenentId}} | |
| 65 | 70 | \ No newline at end of file | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/TradePriceServiceImpl.java
| ... | ... | @@ -125,7 +125,7 @@ public class TradePriceServiceImpl implements TradePriceService { |
| 125 | 125 | TradePriceCalculateRespBO.OrderItem orderItem = new TradePriceCalculateRespBO.OrderItem() |
| 126 | 126 | .setPayPrice(sku.getPrice()).setCount(1); |
| 127 | 127 | // 计算限时折扣的优惠价格 |
| 128 | - DiscountProductRespDTO discountProduct = skuIdAndDiscountMap.get(orderItem.getSkuId()); | |
| 128 | + DiscountProductRespDTO discountProduct = skuIdAndDiscountMap.get(sku.getId()); | |
| 129 | 129 | Integer discountPrice = discountActivityPriceCalculator.calculateActivityPrice(discountProduct, orderItem); |
| 130 | 130 | // 计算 VIP 优惠金额 |
| 131 | 131 | Integer vipPrice = discountActivityPriceCalculator.calculateVipPrice(level, orderItem); | ... | ... |