提示修改

This commit is contained in:
Tankaikai
2025-04-07 16:34:46 +08:00
parent cf35e36fbc
commit 7f289535a2

View File

@@ -89,7 +89,7 @@ public class ShopProductSpecServiceImpl extends ServiceImpl<ShopProdSpecMapper,
.eq(ShopProdSpec::getLevel, dto.getLevel())
.eq(ShopProdSpec::getShopId, shopId));
if (exists) {
throw new CzgException("商品规格已存在");
throw new CzgException(StrUtil.format("模板/规格名称【{}】已存在", dto.getName()));
}
ShopProdSpec entity = BeanUtil.copyProperties(dto, ShopProdSpec.class);
if (GlobalConstant.TREE_ROOT.equals(entity.getPid())) {
@@ -123,7 +123,7 @@ public class ShopProductSpecServiceImpl extends ServiceImpl<ShopProdSpecMapper,
.eq(ShopProdSpec::getShopId, shopId)
.ne(ShopProdSpec::getId, dto.getId()));
if (exists) {
throw new CzgException("商品规格已存在");
throw new CzgException(StrUtil.format("模板/规格名称【{}】已存在", dto.getName()));
}
ShopProdSpec old = super.getById(dto.getId());
ShopProdSpec entity = BeanUtil.copyProperties(dto, ShopProdSpec.class);