|
@@ -126,6 +126,13 @@ public class HceCategoryServiceImpl extends AbstractCrudService<HceCategoryMappe
|
|
if(list.size() > 0){
|
|
if(list.size() > 0){
|
|
throw new BusinessException("该栏目存在栏目内容不可删除");
|
|
throw new BusinessException("该栏目存在栏目内容不可删除");
|
|
}
|
|
}
|
|
|
|
+ LambdaQueryWrapper<HceCategory> queryWrapper1 = Wrappers.lambdaQuery();
|
|
|
|
+ queryWrapper1.eq(HceCategory::getPid,id)
|
|
|
|
+ .eq(HceCategory::getStatus,1);
|
|
|
|
+ List<HceCategory> list1 = this.list(queryWrapper1);
|
|
|
|
+ if(list1.size()>0){
|
|
|
|
+ throw new BusinessException("该栏目存在子栏目不可删除");
|
|
|
|
+ }
|
|
this.removeById(id);
|
|
this.removeById(id);
|
|
|
|
|
|
}
|
|
}
|