From 935e0480f6d05140db21408d0368105accebbbca Mon Sep 17 00:00:00 2001 From: Cui Zhi Feng <7426394+wuxixiaocui@user.noreply.gitee.com> Date: 星期二, 03 九月 2024 09:26:31 +0800 Subject: [PATCH] 积分 成长值计算 订单金额 --- src/main/java/com/mzl/flower/service/payment/OrderService.java | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/mzl/flower/service/payment/OrderService.java b/src/main/java/com/mzl/flower/service/payment/OrderService.java index ca0a23a..a332165 100644 --- a/src/main/java/com/mzl/flower/service/payment/OrderService.java +++ b/src/main/java/com/mzl/flower/service/payment/OrderService.java @@ -43,6 +43,7 @@ import com.mzl.flower.service.flower.FlowerService; import com.mzl.flower.service.menber.MemberGrowthRecordService; import com.mzl.flower.service.point.CustomerPointService; +import com.mzl.flower.service.point.PointGoodsService; import com.mzl.flower.service.system.CodeService; import com.mzl.flower.service.system.WeChatService; import com.mzl.flower.service.transport.TransportService; @@ -146,6 +147,9 @@ @Autowired private CustomerPointService customerPointService; + + @Autowired + private PointGoodsService pointGoodsService; public void changeFlower2Cart(CartSaveDTO dto) { String userId = SecurityUtils.getUserId(); @@ -503,7 +507,12 @@ } private void usePointGoods(String orderId, List<Long> goodsRecordIdList){ - //TODO 使用积分商品兑换券 + //使用积分商品兑换券 + if(goodsRecordIdList != null && goodsRecordIdList.size() > 0){ + for(Long grId : goodsRecordIdList){ + pointGoodsService.useExchangeGoods(grId, orderId); + } + } } /** @@ -949,6 +958,9 @@ if(checkList != null && checkList.size() > 0){ for(OrderItemCheck c : checkList){ + if(Constants.CHECK_TYPE.replace.name().equals(c.getType())){ + continue; + } totalAmount = totalAmount.subtract(getAmount(c.getDeductAmount())); } } -- Gitblit v1.9.3