Browse Source

REPORT-86430 AlphaFine插件中心tab页显示内容有误

release/11.0
Yann 2 years ago
parent
commit
5d9446e341
  1. 8
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java

8
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java

@ -203,14 +203,12 @@ public class PluginSearchManager implements AlphaFineSearchProvider {
List<PluginModel> pluginModels = new ArrayList<>(); List<PluginModel> pluginModels = new ArrayList<>();
String version = "v" + ProductConstants.MAIN_VERSION; String version = "v" + ProductConstants.MAIN_VERSION;
if (!Collections.isEmpty(jsonObjects)) { if (!Collections.isEmpty(jsonObjects)) {
jsonObjects = jsonObjects.stream() pluginModels = jsonObjects.stream()
.filter(o -> ((Integer) o.get(version)) == 1) .filter(o -> ((Integer) o.get(version)) == 1)
.sorted(Comparator.comparingLong(PluginSearchManager::parseTime).reversed()) .sorted((Map map1, Map map2) -> Long.compare(parseTime(map2), parseTime(map1)))
.limit(DEFAULT_LIST_SIZE) .limit(DEFAULT_LIST_SIZE)
.map(jsonObject -> getPluginModel(new JSONObject(jsonObject), false))
.collect(Collectors.toList()); .collect(Collectors.toList());
for (Map jsonObject : jsonObjects) {
pluginModels.add(getPluginModel(new JSONObject(jsonObject), false));
}
} }
return pluginModels; return pluginModels;
} }

Loading…
Cancel
Save