Collections.sort(fileRecordDOList, Comparator.comparing(FileRecordDO::getOperateTime).reversed());
reversed()逆序排序,从大到小..比较的是list中存储对象FileRecordDO的operateTime属性.
对于string这种已经重写compareTo的对象逆序排序
Collections.sort(result, Collections.reverseOrder())