if (CollectionUtils.isNotEmpty(flowIn.getPodResourceIdSet())) {\n alarmNotificationRules = alarmNotificationRules.stream()\n .filter(alarmNotificationRule -> {\n List<Map<String, List>> poolResourceIdList = jsonMapper.fromJson(alarmNotificationRule.getPoolResourceId(), List.class);\n List<List> allValues = poolResourceIdList.stream()\n .map(Map::values) // 获取所有value\n .flatMap(Collection::stream) // 扁平化为一个流\n .collect(Collectors.toList()); // 转为List<List>\n \n return allValues.stream()\n .anyMatch(valueList -> CollectionUtils.containsAny(valueList, flowIn.getPodResourceIdSet()));\n })\n .collect(Collectors.toList());\n}


原文地址: https://www.cveoy.top/t/topic/p854 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录