From b7a90c576ac6b482c68ad6d0c2777831f9127b4a Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期二, 19 五月 2020 16:48:41 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/PreviewInfoServiceImpl.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/PreviewInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/PreviewInfoServiceImpl.java index 69fe8da..3d914b5 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/PreviewInfoServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/PreviewInfoServiceImpl.java @@ -150,7 +150,11 @@ Comparator<Extract> cm = new Comparator<Extract>() { @Override public int compare(Extract o1, Extract o2) { - return (int) (o2.getReceiveTime().getTime() - o1.getReceiveTime().getTime()); + if (o2.getReceiveTime().getTime() > o1.getReceiveTime().getTime()) { + return 1; + } else { + return -1; + } } }; Collections.sort(list, cm); -- Gitblit v1.8.0