|
|
@@ -695,16 +695,28 @@ public class AdminUserServiceImpl implements AdminUserService {
|
|
|
});
|
|
|
return resultUsers.get();
|
|
|
}
|
|
|
- if (CollUtil.isEmpty(reqVO.getDeptIds())) {
|
|
|
+ List<Long> reqDeptIds = reqVO.getDeptIds();
|
|
|
+ if (CollUtil.isEmpty(reqDeptIds)) {
|
|
|
throw exception(DEPT_NOT_FOUND);
|
|
|
}
|
|
|
+ Long randomDeptId = reqDeptIds.get(0);
|
|
|
DeptListReqVO deptListReqVO = new DeptListReqVO();
|
|
|
deptListReqVO.setDeptIds(reqVO.getDeptIds());
|
|
|
- List<Long> deptIds = deptService.selectedDepts(deptListReqVO);
|
|
|
+ List<Long> deptIds = new ArrayList<>();
|
|
|
+ // 查询 瑞都下的所有 部门
|
|
|
+ Set<Long> childDeptIds = deptService.getChildDeptIdListFromCache(163l);
|
|
|
+ childDeptIds.add(163l);
|
|
|
+ if (childDeptIds.contains(randomDeptId)) {
|
|
|
+ // 瑞都下的部门 队伍
|
|
|
+ deptIds = new ArrayList<>(childDeptIds);
|
|
|
+ } else {
|
|
|
+ deptIds = deptService.selectedDepts(deptListReqVO);
|
|
|
+ }
|
|
|
if (CollUtil.isNotEmpty(deptIds)) {
|
|
|
// 查询部门下所有人员
|
|
|
+ List<Long> finalDeptIds = deptIds;
|
|
|
DataPermissionUtils.executeIgnore(() -> {
|
|
|
- List<AdminUserDO> users = userMapper.selectSimpleList(deptIds);
|
|
|
+ List<AdminUserDO> users = userMapper.selectSimpleList(finalDeptIds);
|
|
|
if (CollUtil.isNotEmpty(users)) {
|
|
|
resultUsers.set(users);
|
|
|
}
|