|
|
@ -425,13 +425,14 @@ public class EnvironmentServiceImpl extends BaseServiceImpl implements Environme |
|
|
|
private Map<String, Object> checkUsedEnvironmentWorkerGroupRelation(Set<String> deleteKeySet,String environmentName, Long environmentCode) { |
|
|
|
private Map<String, Object> checkUsedEnvironmentWorkerGroupRelation(Set<String> deleteKeySet,String environmentName, Long environmentCode) { |
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
for (String workerGroup : deleteKeySet) { |
|
|
|
for (String workerGroup : deleteKeySet) { |
|
|
|
TaskDefinition taskDefinition = taskDefinitionMapper |
|
|
|
List<TaskDefinition> taskDefinitionList = taskDefinitionMapper |
|
|
|
.selectOne(new QueryWrapper<TaskDefinition>().lambda() |
|
|
|
.selectList(new QueryWrapper<TaskDefinition>().lambda() |
|
|
|
.eq(TaskDefinition::getEnvironmentCode,environmentCode) |
|
|
|
.eq(TaskDefinition::getEnvironmentCode,environmentCode) |
|
|
|
.eq(TaskDefinition::getWorkerGroup,workerGroup)); |
|
|
|
.eq(TaskDefinition::getWorkerGroup,workerGroup)); |
|
|
|
|
|
|
|
|
|
|
|
if (Objects.nonNull(taskDefinition)) { |
|
|
|
if (Objects.nonNull(taskDefinitionList) && taskDefinitionList.size() != 0) { |
|
|
|
putMsg(result, Status.UPDATE_ENVIRONMENT_WORKER_GROUP_RELATION_ERROR,workerGroup,environmentName,taskDefinition.getName()); |
|
|
|
Set<String> collect = taskDefinitionList.stream().map(TaskDefinition::getName).collect(Collectors.toSet()); |
|
|
|
|
|
|
|
putMsg(result, Status.UPDATE_ENVIRONMENT_WORKER_GROUP_RELATION_ERROR,workerGroup,environmentName, collect); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|