| | |
| | | * @author ruoyi |
| | | */ |
| | | @Service |
| | | public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept> implements ISysDeptService { |
| | | public class SysDeptServiceImpl extends ServicePlusImpl<SysDeptMapper, SysDept, SysDept> implements ISysDeptService { |
| | | |
| | | @Autowired |
| | | private SysRoleMapper roleMapper; |
| | |
| | | updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); |
| | | } |
| | | int result = baseMapper.updateById(dept); |
| | | if (UserConstants.DEPT_NORMAL.equals(dept.getStatus())) { |
| | | if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StrUtil.isNotEmpty(dept.getAncestors()) |
| | | && !StrUtil.equals("0", dept.getAncestors())) { |
| | | // 如果该部门是启用状态,则启用该部门的所有上级部门 |
| | | updateParentDeptStatusNormal(dept); |
| | | } |