From 2f4337fdba44524beebebdfe597804b8fb7bf930 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 27 May 2021 16:29:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=90=A5=E7=AB=AF=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E8=8D=89=E7=A8=BF=E7=AE=B1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=AE=BE=E7=BD=AE=E6=8C=89=E8=8D=89=E7=A8=BF=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E9=97=B4=E9=99=8D=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/CodeServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java index a45dc77644..89e72048cf 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java @@ -779,6 +779,15 @@ public class CodeServiceImpl implements CodeService { dto.setCreateTime(DateUtils.formatTimestamp(temp.getCreateTime(), DateUtils.DATE_TIME_PATTERN)); resultList.add(dto); }); + //按时间降序 + if (resultList.size() > NumConstant.ZERO) { + Collections.sort(resultList, new Comparator() { + @Override + public int compare(TemplateDraftListResultDTO o1, TemplateDraftListResultDTO o2) { + return o2.getCreateTime().compareTo(o1.getCreateTime()); + } + }); + } return resultList; }