mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
如果结算金额为0,减去优惠金额后为负数,还设置为0
This commit is contained in:
@@ -895,6 +895,10 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
||||
|
||||
// 更新结算金额 结算金额 = 消费金额 - 虚拟金额 - 优惠金额
|
||||
BigDecimal newSettleAmount = orderBasicInfo.getSettleAmount().subtract(discountAmount);
|
||||
if (newSettleAmount.compareTo(BigDecimal.ZERO) < 0) {
|
||||
// 如果结算金额为0,减去优惠金额后为负数,还设置为0
|
||||
newSettleAmount = BigDecimal.ZERO;
|
||||
}
|
||||
orderBasicInfo.setSettleAmount(newSettleAmount);
|
||||
|
||||
// 优惠后总消费金额 = 折扣后电费 + 折扣后服务费
|
||||
|
||||
Reference in New Issue
Block a user