修改部门顶级节点报错问题

pull/311/MERGE
RuoYi 2021-07-30 10:18:37 +08:00
parent 27277b51d7
commit eed4caa44f
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ public class SysDeptServiceImpl implements ISysDeptService
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
}
int result = deptMapper.updateDept(dept);
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()))
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors()))
{
// 如果该部门是启用状态,则启用该部门的所有上级部门
updateParentDeptStatusNormal(dept);