mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
更新注释
This commit is contained in:
@@ -734,16 +734,16 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
||||
}
|
||||
|
||||
// 计算优惠了多少钱
|
||||
// 电费折扣金额
|
||||
// 电费折扣金额 = 优惠前电费 - 优惠后电费
|
||||
electricityAmountDiscount = originalTotalElectricityAmount.subtract(afterDiscountElectricityAmount);
|
||||
// 服务费折扣金额
|
||||
// 服务费折扣金额 = 优惠前服务费 - 优惠后服务费
|
||||
serviceAmountDiscount = originalTotalServiceAmount.subtract(afterDiscountServiceAmount);
|
||||
}
|
||||
|
||||
/*
|
||||
更新 数据
|
||||
*/
|
||||
// 订单折扣金额
|
||||
// 订单折扣金额 = 电费折扣金额 + 服务费折扣金额
|
||||
BigDecimal discountAmount = electricityAmountDiscount.add(serviceAmountDiscount);
|
||||
orderBasicInfo.setDiscountAmount(discountAmount);
|
||||
|
||||
@@ -761,9 +761,9 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
||||
// 更新退款金额 = 支付金额 - 优惠后总消费金额
|
||||
BigDecimal refundAmount = orderBasicInfo.getPayAmount().subtract(totalConsumeAmount).setScale(2, RoundingMode.DOWN);
|
||||
orderBasicInfo.setRefundAmount(refundAmount);
|
||||
// 电费折扣金额
|
||||
// 电费折扣金额(电费便宜了多少钱)
|
||||
orderDetail.setDiscountElectricityAmount(electricityAmountDiscount);
|
||||
// 服务费折扣金额
|
||||
// 服务费折扣金额(服务费便宜了多少钱)
|
||||
orderDetail.setDiscountServiceAmount(serviceAmountDiscount);
|
||||
logger.info("计算订单折扣, orderCode:{}, memberId:{}, 订单折扣金额:{}, 电费折扣金额:{}, 服务费折扣金额:{}, 优惠后总消费金额:{}",
|
||||
orderBasicInfo.getOrderCode(), memberId, discountAmount, electricityAmountDiscount, serviceAmountDiscount, totalConsumeAmount);
|
||||
|
||||
Reference in New Issue
Block a user