Java8 stream list集合根据多个字段去重
直接上代码
ArrayList<AppEstateShare> collect2 = appEstateShares.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getSharedName() + ";" + o.getSharedPhone()))), ArrayList::new));```