From 9b6e8f829015be0fde91c36337f2ac695de321a0 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 14 Dec 2021 23:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4diam?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/cweb/controller/HighOrderController.java | 3 +-- .../java/com/cweb/controller/OutRechargeOrderController.java | 3 +-- .../main/java/com/hai/service/impl/HighOrderServiceImpl.java | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index 76b425c3..a1e89c86 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -345,8 +345,7 @@ public class HighOrderController { // 卡卷类型 1:满减 2:抵扣 3:折扣 if (highDiscountUserRel.getHighDiscount().getDiscountType() == 3) { - // 折扣除100 - BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice().divide(new BigDecimal("10")); + BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice(); // 订单总额 * 折扣 BigDecimal payPrice = highOrder.getTotalPrice().multiply(discountPrice); highOrder.setDeductionPrice(highOrder.getTotalPrice().subtract(payPrice)); diff --git a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java index 3028651a..847159f4 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java @@ -186,8 +186,7 @@ public class OutRechargeOrderController { // 卡卷类型 1:满减 2:抵扣 3:折扣 if (highDiscountUserRel.getHighDiscount().getDiscountType() == 3) { - // 折扣除100 - BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice().divide(new BigDecimal("10")); + BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice(); // 订单总额 * 折扣 BigDecimal payPrice = outRechargeOrder.getOrderPrice().multiply(discountPrice); outRechargeOrder.setDeductionPrice(outRechargeOrder.getOrderPrice().subtract(payPrice)); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java index 98456083..a0d2571d 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java @@ -210,7 +210,7 @@ public class HighOrderServiceImpl implements HighOrderService { HighUser highUser = highUserService.findByUserId(highOrder.getMemId()); // 金币 1:100 - Integer goldNum = new BigDecimal(highOrder.getTotalPrice().toString()).multiply(new BigDecimal("100")).intValue(); + Integer goldNum = new BigDecimal(highOrder.getPayPrice().toString()).multiply(new BigDecimal("100")).intValue(); highUserService.goldHandle(userId, goldNum, 2, 2, highOrder.getId()); highOrder.setPayTime(new Date()); // 支付时间