update 部门等级字段

This commit is contained in:
2023-10-31 15:25:02 +08:00
parent cb4e3dc5d6
commit 0e62e4c660

View File

@@ -191,6 +191,10 @@ public class SysDeptServiceImpl implements SysDeptService {
throw new ServiceException("部门停用,不允许新增");
}
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
// 更新deptLevel字段
if (StringUtils.isNotBlank(info.getDeptLevel())) {
dept.setDeptLevel(String.valueOf(Integer.parseInt(info.getDeptLevel()) + 1));
}
return deptMapper.insertDept(dept);
}