dev-discount
胡锐 3 years ago
parent 121de813d9
commit 9b6e8f8290
  1. 3
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  2. 3
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  3. 2
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.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));

@ -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));

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

Loading…
Cancel
Save