Merge branch 'pre' into dev

dev-discount
胡锐 3 years ago
commit 4709bbfe98
  1. 3
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  2. 2
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -187,8 +187,7 @@ public class OutRechargeOrderController {
// 卡卷类型 1:满减 2:抵扣 3:折扣 // 卡卷类型 1:满减 2:抵扣 3:折扣
if (highDiscountUserRel.getHighDiscount().getDiscountType() == 3) { if (highDiscountUserRel.getHighDiscount().getDiscountType() == 3) {
// 折扣除100 BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice();
BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice().divide(new BigDecimal("10"));
// 订单总额 * 折扣 // 订单总额 * 折扣
BigDecimal payPrice = outRechargeOrder.getOrderPrice().multiply(discountPrice); BigDecimal payPrice = outRechargeOrder.getOrderPrice().multiply(discountPrice);
outRechargeOrder.setDeductionPrice(outRechargeOrder.getOrderPrice().subtract(payPrice)); outRechargeOrder.setDeductionPrice(outRechargeOrder.getOrderPrice().subtract(payPrice));

@ -210,7 +210,7 @@ public class HighOrderServiceImpl implements HighOrderService {
HighUser highUser = highUserService.findByUserId(highOrder.getMemId()); HighUser highUser = highUserService.findByUserId(highOrder.getMemId());
// 金币 1:100 // 金币 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()); highUserService.goldHandle(userId, goldNum, 2, 2, highOrder.getId());
highOrder.setPayTime(new Date()); // 支付时间 highOrder.setPayTime(new Date()); // 支付时间

Loading…
Cancel
Save