去重

posRecordList.stream()
.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(f -> f.getTransactionNo()+f.getStore()+f.getLineNum()))), ArrayList::new));

posted @ 2022-06-27 21:10  Arborblog  阅读(32)  评论(0编辑  收藏  举报