Merge remote-tracking branch 'origin/prod'
This commit is contained in:
@@ -89,7 +89,7 @@ public class ShopProductSpecServiceImpl extends ServiceImpl<ShopProdSpecMapper,
|
|||||||
.eq(ShopProdSpec::getLevel, dto.getLevel())
|
.eq(ShopProdSpec::getLevel, dto.getLevel())
|
||||||
.eq(ShopProdSpec::getShopId, shopId));
|
.eq(ShopProdSpec::getShopId, shopId));
|
||||||
if (exists) {
|
if (exists) {
|
||||||
throw new CzgException("商品规格已存在");
|
throw new CzgException(StrUtil.format("模板/规格名称【{}】已存在", dto.getName()));
|
||||||
}
|
}
|
||||||
ShopProdSpec entity = BeanUtil.copyProperties(dto, ShopProdSpec.class);
|
ShopProdSpec entity = BeanUtil.copyProperties(dto, ShopProdSpec.class);
|
||||||
if (GlobalConstant.TREE_ROOT.equals(entity.getPid())) {
|
if (GlobalConstant.TREE_ROOT.equals(entity.getPid())) {
|
||||||
@@ -123,7 +123,7 @@ public class ShopProductSpecServiceImpl extends ServiceImpl<ShopProdSpecMapper,
|
|||||||
.eq(ShopProdSpec::getShopId, shopId)
|
.eq(ShopProdSpec::getShopId, shopId)
|
||||||
.ne(ShopProdSpec::getId, dto.getId()));
|
.ne(ShopProdSpec::getId, dto.getId()));
|
||||||
if (exists) {
|
if (exists) {
|
||||||
throw new CzgException("商品规格已存在");
|
throw new CzgException(StrUtil.format("模板/规格名称【{}】已存在", dto.getName()));
|
||||||
}
|
}
|
||||||
ShopProdSpec old = super.getById(dto.getId());
|
ShopProdSpec old = super.getById(dto.getId());
|
||||||
ShopProdSpec entity = BeanUtil.copyProperties(dto, ShopProdSpec.class);
|
ShopProdSpec entity = BeanUtil.copyProperties(dto, ShopProdSpec.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user