refactor(系统设置): 组织用户组查询成员列表排除已删除的用户
This commit is contained in:
parent
a49eca779d
commit
c4e14dc24e
|
@ -98,13 +98,13 @@ public class OrganizationUserRoleService extends BaseUserRoleService {
|
|||
User user = userMap.get(k);
|
||||
if (user != null) {
|
||||
BeanUtils.copyBean(userExtend, user);
|
||||
v.forEach(roleItem -> {
|
||||
if (StringUtils.equals(roleItem, roleId)) {
|
||||
userExtend.setCheckRoleFlag(true);
|
||||
}
|
||||
});
|
||||
userExtends.add(userExtend);
|
||||
}
|
||||
v.forEach(roleItem -> {
|
||||
if (StringUtils.equals(roleItem, roleId)) {
|
||||
userExtend.setCheckRoleFlag(true);
|
||||
}
|
||||
});
|
||||
userExtends.add(userExtend);
|
||||
});
|
||||
}
|
||||
return userExtends;
|
||||
|
|
|
@ -86,7 +86,7 @@ public class OrganizationUserRoleControllerTests extends BaseTest {
|
|||
OrganizationUserRoleEditRequest request = new OrganizationUserRoleEditRequest();
|
||||
request.setName("default-org-role-5");
|
||||
request.setScopeId("default-organization-2");
|
||||
MvcResult addResult = this.responsePost(ORGANIZATION_USER_ROLE_ADD, request);
|
||||
this.requestPost(ORGANIZATION_USER_ROLE_ADD, request);
|
||||
// 验证是否添加成功
|
||||
String organizationId = "default-organization-2";
|
||||
MvcResult mvcResult = this.responseGet(ORGANIZATION_USER_ROLE_LIST + "/" + organizationId);
|
||||
|
|
|
@ -13,5 +13,7 @@ INSERT INTO user_role_permission (id, role_id, permission_id) VALUE
|
|||
(uuid(), 'default-org-role-id-3', 'ORGANIZATION_USER_ROLE:READ');
|
||||
INSERT INTO user_role_relation (id, user_id, role_id, source_id, create_time, create_user) VALUE
|
||||
(UUID(), 'default-admin-user', 'default-org-role-id-3', 'default-organization-2', UNIX_TIMESTAMP() * 1000, 'admin');
|
||||
INSERT INTO user_role_relation (id, user_id, role_id, source_id, create_time, create_user) VALUE
|
||||
(UUID(), 'default-admin-user', 'default-org-role-id-4', 'default-organization-2', UNIX_TIMESTAMP() * 1000, 'admin');
|
||||
INSERT INTO user_role_relation (id, user_id, role_id, source_id, create_time, create_user) VALUE
|
||||
(UUID(), 'default-admin-user-x', 'default-org-role-id-4', 'default-organization-2', UNIX_TIMESTAMP() * 1000, 'admin');
|
Loading…
Reference in New Issue