List idDtos = idDtoList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
new TreeSet<>(Comparator.comparing(IdDto::getId))), ArrayList::new));
list去重
最新推荐文章于 2023-04-18 11:49:42 发布
List idDtos = idDtoList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
new TreeSet<>(Comparator.comparing(IdDto::getId))), ArrayList::new));