提交 92b2054a authored 作者: gongwenjie's avatar gongwenjie

合并分支 'gwj' 到 'master'

Gwj 查看合并请求 !44
流水线 #65 已取消 于阶段
......@@ -308,6 +308,7 @@ public class UserServiceImpl implements IUserService {
if(all!=null){
for (User user : all) {
List<String> departmentIds = user.getDepartmentIds();
if(departmentIds!=null){
for (String departId : departmentIds) {
if(departmentList.contains(departId)){
......@@ -319,6 +320,28 @@ public class UserServiceImpl implements IUserService {
}
}
for (User user : users) {
List<UserRole> userRoles = userRoleDao.findAllByUserId(user.getId());
List<String> roleIds = new ArrayList<>();
if(userRoles!=null){
for (UserRole userRole : userRoles) {
roleIds.add(userRole.getRoleId());
}
}
List<Role> roles = roleDao.findAllByIdIn(roleIds);
if(roles!=null){
for (Role role : roles) {
List<RoleAuthority> roleAuthorities = roleAuthorityDao.findAllByRoleId(role.getId());
List<String> authorityIds = new ArrayList<>();
for (RoleAuthority roleAuthority : roleAuthorities) {
authorityIds.add(roleAuthority.getAuthorityId());
}
List<Authority> authorities = authorityDao.findAllByIdIn(authorityIds);
role.setAuthorities(authorities);
}
}
user.setRoles(roles);
}
return users;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论