Java8 list根据一个字段去重(记录)
list = list.stream().collect(
Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(InformationDetailVo::getCategoryId))), ArrayList::new));
list = list.stream().collect(
Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(InformationDetailVo::getCategoryId))), ArrayList::new));