增加日志
This commit is contained in:
parent
58f357a054
commit
99f9f8b4e3
|
|
@ -208,6 +208,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
|||
@Override
|
||||
public OrderInfo checkOrderPay(CheckOrderPay param) {
|
||||
OrderInfo orderInfo = getById(param.getOrderId());
|
||||
log.info("订单信息:{},优惠信息:{}", JSONObject.toJSONString(orderInfo), JSONObject.toJSONString(param));
|
||||
if (!orderInfo.getStatus().equals(OrderStatusEnums.UNPAID.getCode())) {
|
||||
throw new ValidateException("生成支付订单失败,订单不可支付");
|
||||
}
|
||||
|
|
@ -280,11 +281,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(orderInfo.getPackFee()).add(orderInfo.getSeatAmount());
|
||||
log.info("支付前置5,订单金额{} ", newTotalAmount);
|
||||
if (newTotalAmount.compareTo(param.getOrderAmount()) != 0) {
|
||||
throw new ValidateException("生成支付订单失败,订单金额不正确");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue