Map<String, Long> collect = list.stream().collect(Collectors.groupingBy(r -> r.getId(), Collectors.counting()));
for (Map.Entry<String, Long> entry : collect.entrySet()) {
String k = entry.getKey();
Long v = entry.getValue();
if (v > 1) {
System.out.println(k + " ID重复");
}
}