|
|
@@ -204,23 +204,26 @@ public class RemoteUserServiceImpl implements RemoteUserService {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
|
|
|
+ List<Long> list = new ArrayList<>();
|
|
|
+ list.add(id);
|
|
|
List<KwsRoleResDto> kwsRoleResDtos = remoteBaseService.queryRoleInfoByUserId(id);
|
|
|
if (CollectionUtils.isEmpty(kwsRoleResDtos)) {
|
|
|
- return Collections.emptyList();
|
|
|
+ return list;
|
|
|
}
|
|
|
|
|
|
List<KwsAuthority> kwsAuthorities = remoteBaseService.queryAuthorityByRoles(kwsRoleResDtos.stream().map(KwsRoleResDto::getId).toList());
|
|
|
if (CollectionUtils.isEmpty(kwsAuthorities)) {
|
|
|
- return Collections.emptyList();
|
|
|
+ return list;
|
|
|
}
|
|
|
|
|
|
List<Long> deptIds = kwsAuthorities.stream().map(KwsAuthority::getDeptId).toList();
|
|
|
List<KwsUser> kwsUsers = remoteBaseService.queryUserByDeptIds(deptIds);
|
|
|
if(CollectionUtils.isEmpty(kwsUsers)) {
|
|
|
- return Collections.emptyList();
|
|
|
+ return list;
|
|
|
}
|
|
|
|
|
|
- return kwsUsers.stream().filter(item -> item.getIsMain().equals(Global.NO)).map(KwsUser::getId).distinct().toList();
|
|
|
+ list.addAll(kwsUsers.stream().filter(item -> item.getIsMain().equals(Global.NO) && !item.getId().equals(id)).map(KwsUser::getId).distinct().toList());
|
|
|
+ return list;
|
|
|
}
|
|
|
|
|
|
|