productList.stream().collect(Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ProductDTO::getCreateTime).reversed())), ArrayList::new));
对象集合根据某个属性去重并排序
最新推荐文章于 2024-08-16 15:37:37 发布