去重集合List<<Map<String, Object>>
public static List<Map<String, Object>> duplicateKey(List<Map<String, Object>> list) {
if (ObjectUtil.isNotEmpty(list)) {
list = list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(
() -> new TreeSet<>(Comparator.comparing(itemMap -> itemMap.get("key").toString()))), ArrayList::new));
}
return list;
}