| | |
| | | package com.ruoyi.project.system.service.impl;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.stream.Collectors;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.core.text.Convert;
|
| | | import com.ruoyi.common.exception.ServiceException;
|
| | |
| | | import com.ruoyi.project.system.mapper.SysDeptMapper;
|
| | | import com.ruoyi.project.system.mapper.SysRoleMapper;
|
| | | import com.ruoyi.project.system.service.ISysDeptService;
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.Iterator;
|
| | | import java.util.List;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | /**
|
| | | * 部门管理 服务实现
|
| | |
| | | * @author ruoyi
|
| | | */
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SysDeptServiceImpl implements ISysDeptService
|
| | | {
|
| | | @Autowired
|
| | | private SysDeptMapper deptMapper;
|
| | | |
| | | @Autowired
|
| | | private SysRoleMapper roleMapper;
|
| | | private final SysDeptMapper deptMapper;
|
| | | private final SysRoleMapper roleMapper;
|
| | |
|
| | | /**
|
| | | * 查询部门管理数据
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 查询顶层部门id
|
| | | * @param deptId
|
| | | * @return
|
| | | */
|
| | | @Override
|
| | | public Long maxLevelDeptId(Long deptId) {
|
| | | return deptMapper.maxLevelDeptId(deptId);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 递归列表
|
| | | */
|
| | | private void recursionFn(List<SysDept> list, SysDept t)
|