|
|
|
@ -204,18 +204,16 @@ public class PluginSearchManager implements AlphaFineSearchProvider {
|
|
|
|
|
if (!Collections.isEmpty(jsonObjects)) { |
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat(TIME_FORMAT); |
|
|
|
|
try { |
|
|
|
|
jsonObjects.sort(Comparator.comparingLong(new ToLongFunction<Map>() { |
|
|
|
|
@Override |
|
|
|
|
public long applyAsLong(Map value) { |
|
|
|
|
long time = 0L; |
|
|
|
|
jsonObjects.sort((v1, v2) -> { |
|
|
|
|
try { |
|
|
|
|
time = format.parse((String) value.get(UPLOAD_TIME)).getTime(); |
|
|
|
|
long t1 = format.parse((String) v1.get(UPLOAD_TIME)).getTime(); |
|
|
|
|
long t2 = format.parse((String) v2.get(UPLOAD_TIME)).getTime(); |
|
|
|
|
return Long.compare(t2, t1); |
|
|
|
|
} catch (ParseException e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e, e.getMessage()); |
|
|
|
|
} |
|
|
|
|
return time; |
|
|
|
|
} |
|
|
|
|
}).reversed()); |
|
|
|
|
return 0; |
|
|
|
|
}); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e, e.getMessage()); |
|
|
|
|
} |
|
|
|
|