需求:lambda根据多个条件对list进行排序,并且根据对象内的某个属性值来去重
resList = resList.stream()
.sorted(Comparator.comparing(ResCenterAuditDTO::getCreateTime).reversed())
.sorted(Comparator.comparing(ResCenterAuditDTO::getMatchRate).reversed())
.collect(Collectors
.collectingAndThen(Collectors
.toCollection(() -> new TreeSet<>(Comparator
.comparing(ResCenterAuditDTO::getAuditId))), ArrayList::new)
);