修复无法支付问题

This commit is contained in:
2025-04-01 13:00:13 +08:00
parent df3ae32eb7
commit aecfea75f2

View File

@@ -112,11 +112,13 @@ public class OrderPayController extends BaseController {
final BigDecimal batteryRent = goods.getBatteryRent();
// 按新的续费价格
orderPay.setTotalPrice(batteryRent);
if (one != null) {
final long between = DateUtil.between(new Date(), one.getExpirationTime(), DateUnit.DAY, false);
if(between < 0){
if (between < 0) {
// 有逾期的订单不能享受折扣
orderPay.setTotalPrice(rent);
}
}
return success(orderPay);
}