增加构建通知

This commit is contained in:
dengqichen 2025-11-18 14:53:07 +08:00
parent 7a3bfac44e
commit 7c6275c03a
2 changed files with 17 additions and 3 deletions

View File

@ -30,4 +30,7 @@ public class ApplicationQuery extends BaseQuery {
@QueryField(field = "languageType") @QueryField(field = "languageType")
private String languageType; private String languageType;
@QueryField(field = "applicationCategoryId")
private Long applicationCategoryId;
} }

View File

@ -398,8 +398,19 @@ public class DeployServiceImpl implements IDeployService {
? teamApps.stream().collect(groupingBy(TeamApplication::getEnvironmentId)) ? teamApps.stream().collect(groupingBy(TeamApplication::getEnvironmentId))
: Collections.emptyMap(); : Collections.emptyMap();
// 遍历所有团队配置的环境有应用就显示应用没应用就显示空列表 // 获取当前团队配置的环境ID列表
for (Environment env : envMap.values()) { Set<Long> currentTeamEnvIds = teamEnvConfigMap.values().stream()
.filter(config -> config.getTeamId().equals(teamId))
.map(TeamEnvironmentConfig::getEnvironmentId)
.collect(Collectors.toSet());
// 只遍历当前团队配置的环境
for (Long envId : currentTeamEnvIds) {
Environment env = envMap.get(envId);
if (env == null) {
continue; // 环境不存在跳过
}
// 获取该环境的应用列表没有则为空列表 // 获取该环境的应用列表没有则为空列表
List<TeamApplication> envApps = appsByEnv.getOrDefault(env.getId(), Collections.emptyList()); List<TeamApplication> envApps = appsByEnv.getOrDefault(env.getId(), Collections.emptyList());