mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
fix(系统设置): 修复批量添加用户组的问题
--bug=1007859 --user=刘瑞斌 【系统设置】批量添加用户组问题汇总 https://www.tapd.cn/55049933/s/1070964
This commit is contained in:
parent
8e22dbe625
commit
a29e9eca20
@ -42,7 +42,7 @@ public class GroupController {
|
||||
}
|
||||
|
||||
@GetMapping("/get/all")
|
||||
public List<Group> getAllGroup() {
|
||||
public List<GroupDTO> getAllGroup() {
|
||||
return groupService.getAllGroup();
|
||||
}
|
||||
|
||||
|
@ -80,8 +80,8 @@ public class GroupService {
|
||||
|
||||
public Pager<List<GroupDTO>> getGroupList(EditGroupRequest request) {
|
||||
SessionUser user = SessionUtils.getUser();
|
||||
List<UserGroupDTO> userGroup = extUserGroupMapper.getUserGroup(Objects.requireNonNull(user).getId() , request.getProjectId());
|
||||
List<String> groupTypeList = userGroup.stream().map(UserGroupDTO::getType).collect(Collectors.toList());
|
||||
List<UserGroupDTO> userGroup = extUserGroupMapper.getUserGroup(Objects.requireNonNull(user).getId(), request.getProjectId());
|
||||
List<String> groupTypeList = userGroup.stream().map(UserGroupDTO::getType).distinct().collect(Collectors.toList());
|
||||
return getGroups(groupTypeList, request);
|
||||
}
|
||||
|
||||
@ -319,8 +319,11 @@ public class GroupService {
|
||||
return extUserGroupMapper.getProjectMemberGroups(projectId, userId);
|
||||
}
|
||||
|
||||
public List<Group> getAllGroup() {
|
||||
return groupMapper.selectByExample(new GroupExample());
|
||||
public List<GroupDTO> getAllGroup() {
|
||||
List<String> types = map.get(UserGroupType.SYSTEM);
|
||||
EditGroupRequest request = new EditGroupRequest();
|
||||
request.setTypes(types);
|
||||
return extGroupMapper.getGroupList(request);
|
||||
}
|
||||
|
||||
public List<?> getResource(String type, String groupId) {
|
||||
@ -346,7 +349,9 @@ public class GroupService {
|
||||
criteria.andIdEqualTo(workspaceId);
|
||||
List<Workspace> workspaces = workspaceMapper.selectByExample(workspaceExample);
|
||||
List<String> list = workspaces.stream().map(Workspace::getId).collect(Collectors.toList());
|
||||
pc.andWorkspaceIdIn(list);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
pc.andWorkspaceIdIn(list);
|
||||
}
|
||||
}
|
||||
return projectMapper.selectByExample(projectExample);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user