mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 如果电单车订单耗电量为 0,进行退款
This commit is contained in:
@@ -625,8 +625,13 @@ public class DelayMerchantProgramLogic extends AbstractProgramLogic {
|
||||
// 计算实际消费, 保留两位小数
|
||||
orderAmount = consumedEnergy.multiply(price).setScale(2, RoundingMode.UP);
|
||||
} else {
|
||||
// 其他金额都是按次收费, 不退款
|
||||
orderAmount = orderBasicInfo.getPayAmount();
|
||||
// 2025.07.28如果耗电量为 0,也进行退款
|
||||
if (consumedEnergy.compareTo(BigDecimal.ZERO) == 0) {
|
||||
orderAmount = BigDecimal.ZERO;
|
||||
}else {
|
||||
// 其他金额、并且耗电量不为 0 ,都是按次收费, 不退款
|
||||
orderAmount = orderBasicInfo.getPayAmount();
|
||||
}
|
||||
}
|
||||
|
||||
// 退款金额 = 支付金额 - 优惠后总消费金额
|
||||
|
||||
Reference in New Issue
Block a user