mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-12-27 10:35:59 +08:00
fix 修复 工作流类别 顶节点父级可以被修改导致无法加载的问题
This commit is contained in:
@@ -206,6 +206,9 @@ public class FlwCategoryServiceImpl implements IFlwCategoryService, CategoryServ
|
|||||||
if (ObjectUtil.isNull(oldCategory)) {
|
if (ObjectUtil.isNull(oldCategory)) {
|
||||||
throw new ServiceException("流程分类不存在,无法修改");
|
throw new ServiceException("流程分类不存在,无法修改");
|
||||||
}
|
}
|
||||||
|
if (oldCategory.getParentId() == 0L && category.getParentId() != 0L) {
|
||||||
|
throw new ServiceException("不允许修改顶级分类的父级节点");
|
||||||
|
}
|
||||||
if (!oldCategory.getParentId().equals(category.getParentId())) {
|
if (!oldCategory.getParentId().equals(category.getParentId())) {
|
||||||
FlowCategory newParentCategory = baseMapper.selectById(category.getParentId());
|
FlowCategory newParentCategory = baseMapper.selectById(category.getParentId());
|
||||||
if (ObjectUtil.isNotNull(newParentCategory)) {
|
if (ObjectUtil.isNotNull(newParentCategory)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user