1、jdk8集合对象多属性去重
ListdistinctStudentFile = monthStudentExamFiles.stream().sorted(Comparator.comparing(MonthStudentExamFile::getCreateTime).reversed()).collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getExamId() + ";" + o.getStudentId()))), ArrayList::new)); studentFileMap = distinctStudentFile.stream().collect(Collectors.groupingBy(MonthStudentExamFile::getQuestionId, Collectors.toList()));



