list=list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()->new TreeSet<>(Comparator.comparing(YdSellRecordShow::getUserInfoId))),ArrayList::new));
List 根据某一属性去重
最新推荐文章于 2024-06-24 19:50:07 发布
list=list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()->new TreeSet<>(Comparator.comparing(YdSellRecordShow::getUserInfoId))),ArrayList::new));