临时失效时间必填

This commit is contained in:
luojiaquan
2026-09-28 15:18:22 +08:00
parent d3493f2bc5
commit 1083c2876f
3 changed files with 12 additions and 12 deletions
@@ -53,7 +53,7 @@ public class CustomerCreditApply extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd")
private Date effectiveDate;
/** 临时额度失效日期(空=长期) */
/** 额度失效日期(信用/临时均必填,到期次日自动清零) */
@JsonFormat(pattern = "yyyy-MM-dd")
private Date expireDate;
@@ -411,7 +411,7 @@ public class CustomerMoneyServiceImpl implements ICustomerMoneyService
}
after = after.setScale(MONEY_SCALE, RoundingMode.HALF_UP);
// 3. 有效期处理:信用/临时同口径——不允许预约未来生效;信用额度失效日期必填,临时额度空=长期
// 3. 有效期处理:信用/临时同口径——不允许预约未来生效;失效日期均必填(validateAdjustCommand 已强校验)
Date effectiveDate = null;
Date expireDate = null;
LocalDate today = LocalDate.now();
@@ -724,10 +724,10 @@ public class CustomerMoneyServiceImpl implements ICustomerMoneyService
throw new ServiceException("额度未发生变化,无需调整");
}
if (!isTemp && cmd.getExpireDate() == null)
if (cmd.getExpireDate() == null)
{
// 信用额度必须设置失效日期(到期自动清零);临时额度不填=长期
throw new ServiceException("请选择信用额度失效日期");
// 信用额度、临时(额外)额度都必须设置失效日期(到期次日自动清零)
throw new ServiceException(isTemp ? "请选择临时额度失效日期" : "请选择信用额度失效日期");
}
LocalDate today = LocalDate.now();
LocalDate eff = cmd.getEffectiveDate() != null ? toLocalDate(cmd.getEffectiveDate()) : today;