商品单位-仓库管理

This commit is contained in:
sxu 2025-05-27 09:06:05 +08:00
parent 0d4f3db67f
commit 349bc91fc2
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ public class SupermarketMaterialTypeServiceImpl implements ISupermarketMaterialT
try {
SupermarketMaterialType checkResult = supermarketMaterialTypeMapper.selectSupermarketMaterialTypeByMaterialTypeName(supermarketMaterialType);
if (Objects.nonNull(checkResult)) {
throw new ServiceException("超市商品类别名已存在");
throw new ServiceException("超市商品类别名已存在");
}
return supermarketMaterialTypeMapper.insertSupermarketMaterialType(supermarketMaterialType);
} catch (Exception e) {
@ -84,7 +84,7 @@ public class SupermarketMaterialTypeServiceImpl implements ISupermarketMaterialT
List<String> otherSupermarketMaterialTypeList = allSupermarketMaterialTypeList.stream().filter(item -> !item.getMaterialTypeId().equals(supermarketMaterialType.getMaterialTypeId()))
.map(SupermarketMaterialType::getMaterialTypeName).collect(Collectors.toList());
if (otherSupermarketMaterialTypeList.contains(supermarketMaterialType.getMaterialTypeName())) {
throw new ServiceException("超市商品类别名已存在");
throw new ServiceException("超市商品类别名已存在");
}
return supermarketMaterialTypeMapper.updateSupermarketMaterialType(supermarketMaterialType);
} catch (Exception e) {