|
|
|
@ -426,8 +426,7 @@ public class HighOrderController { |
|
|
|
|
|
|
|
|
|
highOrder.setMerchId(request.getHeader("mchId")); |
|
|
|
|
highOrder.setTotalPrice(totalPrice); |
|
|
|
|
highOrder.setPayPrice(totalActualPrice.subtract(integralDeductionPrice)); |
|
|
|
|
highOrder.setDeductionPrice(highOrder.getTotalPrice().subtract(totalActualPrice)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 是否使用了优惠券
|
|
|
|
|
if (highDiscountUserRel != null) { |
|
|
|
@ -464,7 +463,7 @@ public class HighOrderController { |
|
|
|
|
|
|
|
|
|
highOrder.setDeductionPrice(highDiscountUserRel.getHighDiscount().getDiscountPrice()); |
|
|
|
|
// 如果总额小于0
|
|
|
|
|
if (payPrice.compareTo(new BigDecimal("0")) == -1) { |
|
|
|
|
if (payPrice.compareTo(new BigDecimal("0")) < 0) { |
|
|
|
|
highOrder.setPayPrice(new BigDecimal("0")); |
|
|
|
|
} else { |
|
|
|
|
highOrder.setPayPrice(payPrice); |
|
|
|
@ -496,6 +495,10 @@ public class HighOrderController { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (highOrder.getPayPrice() == null) { |
|
|
|
|
highOrder.setPayPrice(totalActualPrice); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
highOrder.setOrderNo("HF" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5)); |
|
|
|
|
highOrder.setMemId(userInfoModel.getHighUser().getId()); |
|
|
|
|
highOrder.setMemName(userInfoModel.getHighUser().getName()); |
|
|
|
@ -504,6 +507,8 @@ public class HighOrderController { |
|
|
|
|
highOrder.setOrderStatus(1); |
|
|
|
|
highOrder.setPrintStatus(false); |
|
|
|
|
highOrder.setPrintNum(0); |
|
|
|
|
highOrder.setPayPrice(highOrder.getPayPrice().subtract(integralDeductionPrice)); |
|
|
|
|
highOrder.setDeductionPrice(highOrder.getTotalPrice().subtract(highOrder.getPayPrice())); |
|
|
|
|
|
|
|
|
|
highOrderService.insertOrder(highOrder); |
|
|
|
|
|
|
|
|
|