组名称列表问题
This commit is contained in:
parent
06a35caa92
commit
91b9572974
@ -80,7 +80,7 @@ public class GroupConfigController {
|
||||
|
||||
@LoginRequired
|
||||
@GetMapping("/all/group-name/list")
|
||||
public List<String> getAllGroupNameList() {
|
||||
public List<GroupConfigResponseVO> getAllGroupNameList() {
|
||||
return groupConfigService.getAllGroupNameList();
|
||||
}
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ public interface GroupConfigService {
|
||||
|
||||
List<GroupConfigResponseVO> getAllGroupConfigList(final List<String> namespaceId);
|
||||
|
||||
List<String> getAllGroupNameList();
|
||||
List<GroupConfigResponseVO> getAllGroupNameList();
|
||||
|
||||
List<String> getOnlinePods(String groupName);
|
||||
|
||||
|
||||
@ -254,7 +254,7 @@ public class GroupConfigServiceImpl implements GroupConfigService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAllGroupNameList() {
|
||||
public List<GroupConfigResponseVO> getAllGroupNameList() {
|
||||
|
||||
UserSessionVO userSessionVO = UserSessionUtils.currentUserSession();
|
||||
if (userSessionVO.isUser()) {
|
||||
@ -265,17 +265,21 @@ public class GroupConfigServiceImpl implements GroupConfigService {
|
||||
}
|
||||
List<GroupConfig> groupConfigs = groupConfigAccess.list(
|
||||
new LambdaQueryWrapper<GroupConfig>()
|
||||
.select(GroupConfig::getGroupNameCn,GroupConfig::getGroupName)
|
||||
.in(CollUtil.isNotEmpty(groupNames), GroupConfig::getGroupName, groupNames)
|
||||
.eq(GroupConfig::getNamespaceId, userSessionVO.getNamespaceId()));
|
||||
return StreamUtils.toList(groupConfigs, GroupConfig::getGroupNameCn);
|
||||
List<GroupConfigResponseVO> groupConfigResponses = GroupConfigResponseVOConverter.INSTANCE.convertList(
|
||||
groupConfigs);
|
||||
return groupConfigResponses;
|
||||
}
|
||||
|
||||
ConfigAccess<GroupConfig> groupConfigAccess = accessTemplate.getGroupConfigAccess();
|
||||
List<GroupConfig> groupConfigs = groupConfigAccess.list(new LambdaQueryWrapper<GroupConfig>()
|
||||
.eq(GroupConfig::getNamespaceId, userSessionVO.getNamespaceId())
|
||||
.select(GroupConfig::getGroupNameCn));
|
||||
//TODO ?
|
||||
return StreamUtils.toList(groupConfigs, GroupConfig::getGroupNameCn);
|
||||
.select(GroupConfig::getGroupNameCn,GroupConfig::getGroupName));
|
||||
List<GroupConfigResponseVO> groupConfigResponses = GroupConfigResponseVOConverter.INSTANCE.convertList(
|
||||
groupConfigs);
|
||||
return groupConfigResponses;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user