Commit 044590c79dfa12fc6d5e23682d1834d1466f83bd
1 parent
dc2ff214aa
Exists in
master
and in
6 other branches
bbbbbb
Showing 1 changed file with 3 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/CollectionUtils.java
View file @
044590c
... | ... | @@ -248,7 +248,9 @@ |
248 | 248 | if(CollectionUtils.isNotEmpty(list) && StringUtils.isNotEmpty(key)) { |
249 | 249 | Collections.sort(list, new Comparator<Map<String, Object>>() { |
250 | 250 | public int compare(Map<String, Object> o1, Map<String, Object> o2) { |
251 | - return new Long(DateUtil.parseYMD((String) o1.get(key)).getTime() - DateUtil.parseYMD((String) o2.get(key)).getTime()).intValue(); | |
251 | + long num1 = DateUtil.parseYMD((String) o1.get(key)).getTime(); | |
252 | + long num2 = DateUtil.parseYMD((String) o2.get(key)).getTime(); | |
253 | + return num1 == num2 ? 0 : num1 > num2 ? 1 : -1; | |
252 | 254 | } |
253 | 255 | }); |
254 | 256 | } |