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()); // 支付时间