客户管理套餐去除生效和失效日期

This commit is contained in:
liuminghui
2026-10-29 11:37:31 +08:00
parent fc21b08318
commit 59eb4b23cc
3 changed files with 14 additions and 78 deletions
@@ -73,14 +73,6 @@ public class BmsCustomerPriceSetServiceImpl implements IBmsCustomerPriceSetServi
{
throw new ServiceException("仅生效中的套餐允许绑定,当前套餐状态不可用");
}
if (bind.getPrBegindate() == null)
{
throw new ServiceException("绑定生效日期不能为空");
}
if (bind.getPrEnddate() != null && bind.getPrBegindate().after(bind.getPrEnddate()))
{
throw new ServiceException("失效日期不能早于生效日期");
}
if (bind.getBindPriority() == null || bind.getBindPriority() < 1)
{
bind.setBindPriority(1);
@@ -105,6 +97,15 @@ public class BmsCustomerPriceSetServiceImpl implements IBmsCustomerPriceSetServi
if (existing != null)
{
bind.setCustomerPricesetId(existing.getCustomerPricesetId());
// 弹框已不再采集生效/失效日期,未传入时保留库中原值
if (bind.getPrBegindate() == null)
{
bind.setPrBegindate(existing.getPrBegindate());
}
if (bind.getPrEnddate() == null)
{
bind.setPrEnddate(existing.getPrEnddate());
}
rows = bindMapper.updateBind(bind);
}
else
@@ -144,14 +145,6 @@ public class BmsCustomerPriceSetServiceImpl implements IBmsCustomerPriceSetServi
{
throw new ServiceException("仅生效中的套餐允许绑定,当前套餐状态不可用");
}
if (req.getPrBegindate() == null)
{
throw new ServiceException("绑定生效日期不能为空");
}
if (req.getPrEnddate() != null && req.getPrBegindate().after(req.getPrEnddate()))
{
throw new ServiceException("失效日期不能早于生效日期");
}
Integer priority = (req.getBindPriority() == null || req.getBindPriority() < 1) ? 1 : req.getBindPriority();
boolean overwrite = Boolean.TRUE.equals(req.getOverwriteExisting());