语法规范问题

This commit is contained in:
clunt 2022-03-21 09:39:34 +08:00
parent ac5505b260
commit bb09235bf6
1 changed files with 6 additions and 2 deletions

View File

@ -57,14 +57,18 @@ public class GoodsCategoryServiceImpl implements GoodsCategoryService {
@Override
public boolean checkGoodsCategoryNameUnique(GoodsCategory goodsCategory) {
GoodsCategory category = goodsCategoryMapper.selectByGoodsCategoryName(goodsCategory.getGoodsCategoryName());
if (category == null) return false;
if (category == null){
return false;
}
return category.getGoodsCategoryId().equals(goodsCategory.getGoodsCategoryId());
}
@Override
public boolean checkGoodsCategoryCodeUnique(GoodsCategory goodsCategory) {
GoodsCategory category = goodsCategoryMapper.selectByGoodsCategoryCode(goodsCategory.getGoodsCategoryCode());
if (category == null) return false;
if (category == null){
return false;
}
return category.getGoodsCategoryId().equals(goodsCategory.getGoodsCategoryId());
}
}