组名称列表问题

This commit is contained in:
SGK\17962 2025-11-26 09:07:18 +08:00
parent 06a35caa92
commit 91b9572974
3 changed files with 11 additions and 7 deletions

View File

@ -80,7 +80,7 @@ public class GroupConfigController {
@LoginRequired
@GetMapping("/all/group-name/list")
public List<String> getAllGroupNameList() {
public List<GroupConfigResponseVO> getAllGroupNameList() {
return groupConfigService.getAllGroupNameList();
}

View File

@ -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);

View File

@ -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