JAVA List根据某一字段去重

List<ApproveInfoVO> list=voList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ApproveInfoVO::getAppTime))), ArrayList::new));

 

posted @ 2021-08-31 14:44  哎丫丫呀喂  阅读(125)  评论(0编辑  收藏  举报