新增套餐基本信息编辑功能,包括更新套餐名称和备注,支持客户筛选和绑定客户显示。

This commit is contained in:
wuweihua
2026-11-02 11:52:08 +08:00
parent 1b1b934d87
commit e93f0c0233
9 changed files with 170 additions and 27 deletions
@@ -34,8 +34,12 @@ public class PrcPriceSet extends BaseEntity
private Integer productCount;
private Integer customerCount;
/** List display: bound customer code/name summary (not a DB column). */
private String boundCustomers;
private Boolean expired;
private String keyword;
/** Query only: filter packages by bound customer id. */
private Long customerId;
private String submitFlag;
/** current version on create/edit save */
private PrcPriceSetVersion version;
@@ -21,6 +21,9 @@ public interface PrcPriceSetMapper
public int updatePrcPriceSet(PrcPriceSet set);
/** Update name / note only (does not touch set_type / discount / status). */
public int updateBasicInfo(PrcPriceSet set);
public int updatePrcPriceSetStatus(PrcPriceSet set);
public int deletePrcPriceSetByIds(Long[] priceSetIds);
@@ -26,6 +26,9 @@ public interface IPrcPriceSetService
public int updatePrcPriceSet(PrcPriceSet set);
/** Update package name and note only; allowed for effect / draft / stopped. */
public int updateBasicInfo(PrcPriceSet set);
public int deletePrcPriceSetByIds(Long[] priceSetIds);
public int submit(Long priceSetId, String updateBy);
@@ -258,6 +258,30 @@ public class PrcPriceSetServiceImpl implements IPrcPriceSetService
return setMapper.updatePrcPriceSet(set);
}
@Override
public int updateBasicInfo(PrcPriceSet set)
{
if (set == null || set.getPriceSetId() == null)
{
throw new ServiceException(MessageUtils.message("price.set.notExists"));
}
PrcPriceSet db = requireSet(set.getPriceSetId());
if (STATUS_AUDIT.equals(db.getStatus()))
{
throw new ServiceException(MessageUtils.message("price.set.edit.audit"));
}
if (StringUtils.isEmpty(set.getPriceSetName()))
{
throw new ServiceException(MessageUtils.message("price.set.name.empty"));
}
set.setPriceSetName(set.getPriceSetName().trim());
if (setMapper.countByName(set) > 0)
{
throw new ServiceException(MessageUtils.message("price.set.name.exists"));
}
return setMapper.updateBasicInfo(set);
}
@Override
@Transactional
public int deletePrcPriceSetByIds(Long[] priceSetIds)