|
@ -80,7 +80,7 @@ public class NewsCategoryController { |
|
|
//效验数据
|
|
|
//效验数据
|
|
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|
|
if(newsCategoryService.checkIsExist(dto.getId())){ |
|
|
if(newsCategoryService.checkIsExist(dto.getId())){ |
|
|
return new Result().error("该类别下存在新闻不允许删除"); |
|
|
return new Result().error("该类别下存在新闻不允许修改"); |
|
|
} |
|
|
} |
|
|
if(newsCategoryService.checkCodeCategory(dto.getCategoryCode(),dto.getId())>0){ |
|
|
if(newsCategoryService.checkCodeCategory(dto.getCategoryCode(),dto.getId())>0){ |
|
|
return new Result().error("类别编码已存在"); |
|
|
return new Result().error("类别编码已存在"); |
|
|