日志打印
This commit is contained in:
parent
c1f45abcb1
commit
fc51063872
|
|
@ -319,8 +319,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
BigDecimalDTO packAmount = new BigDecimalDTO(BigDecimal.ZERO);
|
||||
processOrderDetails2(orderDetails, prodCouponMap, prodCouponAmount, totalAmount, packAmount, param.isAllPack(), param.getUserAllPack(), param.isVipPrice());
|
||||
//总商品支付金额 不包含打包费 用来计算后续
|
||||
log.info("支付前置,商品金额{} 商品优惠券金额{} 总金额{}", totalAmount, prodCouponAmount, totalAmount.getPrice().add(orderInfo.getPackFee()));
|
||||
if (prodCouponAmount.getPrice().compareTo(param.getProductCouponDiscountAmount()) != 0) {
|
||||
log.info("支付计算金额不正确:商品券抵扣金额为:{},传递为:{}", prodCouponAmount.getPrice(), param.getProductCouponDiscountAmount());
|
||||
throw new ValidateException("生成支付订单失败,商品优惠券优惠金额不正确");
|
||||
}
|
||||
orderInfo.setOriginAmount(totalAmount.getPrice().add(packAmount.getPrice()).add(orderInfo.getSeatAmount()));
|
||||
|
|
@ -352,16 +352,15 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
// throw new ValidateException("生成支付订单失败,积分抵扣金额不正确");
|
||||
// }
|
||||
// }
|
||||
log.info("支付前置2,订单金额{} ", newTotalAmount);
|
||||
newTotalAmount = newTotalAmount.subtract(param.getPointsDiscountAmount());
|
||||
log.info("支付前置3,订单金额{} ", newTotalAmount);
|
||||
//抹零
|
||||
newTotalAmount = newTotalAmount.subtract(param.getRoundAmount());
|
||||
log.info("支付前置4,订单金额{} ", newTotalAmount);
|
||||
//校验最终金额(订单金额 (扣除各类折扣)+打包费 餐位费)
|
||||
newTotalAmount = newTotalAmount.add(packAmount.getPrice()).add(orderInfo.getSeatAmount());
|
||||
log.info("支付前置5,订单金额{} ", newTotalAmount);
|
||||
if (newTotalAmount.compareTo(param.getOrderAmount()) != 0) {
|
||||
log.info("支付计算金额不正确,订单Id:{},最终计算金额为:{},打包费:{},餐位费:{},商品券金额:{},满减券金额:{},积分抵扣金额:{},抹零金额:{}",
|
||||
orderInfo.getId(), newTotalAmount, packAmount.getPrice(), orderInfo.getSeatAmount(), param.getProductCouponDiscountAmount(),
|
||||
discountAmount.getPrice(), param.getPointsDiscountAmount(), param.getRoundAmount());
|
||||
throw new ValidateException("生成支付订单失败,订单金额不正确");
|
||||
}
|
||||
orderInfo.setPackFee(packAmount.getPrice());
|
||||
|
|
|
|||
Loading…
Reference in New Issue