|
@@ -274,25 +274,26 @@ public class AnalysisCommonServiceImpl {
|
|
return knowledgeCompanyVo;
|
|
return knowledgeCompanyVo;
|
|
}).collect(Collectors.toList());
|
|
}).collect(Collectors.toList());
|
|
//排序
|
|
//排序
|
|
- String sort = queryData.getParams().get("sort");
|
|
|
|
|
|
+ String sort = queryData.getSortField();
|
|
if (sort != null) {
|
|
if (sort != null) {
|
|
|
|
+ sort = sort + queryData.getSortOrder();
|
|
switch (sort) {
|
|
switch (sort) {
|
|
- case "totalDesc":
|
|
|
|
|
|
+ case "totaldesc":
|
|
result = result.stream().sorted((t1, t2) -> t2.getTotal().compareTo(t1.getTotal())).collect(Collectors.toList());
|
|
result = result.stream().sorted((t1, t2) -> t2.getTotal().compareTo(t1.getTotal())).collect(Collectors.toList());
|
|
break;
|
|
break;
|
|
- case "totalAsc":
|
|
|
|
|
|
+ case "totalasc":
|
|
result = result.stream().sorted(Comparator.comparing(KnowledgeCompanyVo::getTotal)).collect(Collectors.toList());
|
|
result = result.stream().sorted(Comparator.comparing(KnowledgeCompanyVo::getTotal)).collect(Collectors.toList());
|
|
break;
|
|
break;
|
|
- case "archiveDesc":
|
|
|
|
|
|
+ case "archivedesc":
|
|
result = result.stream().sorted((t1, t2) -> t2.getArchive().compareTo(t1.getArchive())).collect(Collectors.toList());
|
|
result = result.stream().sorted((t1, t2) -> t2.getArchive().compareTo(t1.getArchive())).collect(Collectors.toList());
|
|
break;
|
|
break;
|
|
- case "archiveAsc":
|
|
|
|
|
|
+ case "archiveasc":
|
|
result = result.stream().sorted(Comparator.comparing(KnowledgeCompanyVo::getArchive)).collect(Collectors.toList());
|
|
result = result.stream().sorted(Comparator.comparing(KnowledgeCompanyVo::getArchive)).collect(Collectors.toList());
|
|
break;
|
|
break;
|
|
- case "wikiDesc":
|
|
|
|
|
|
+ case "wikidesc":
|
|
result = result.stream().sorted((t1, t2) -> t2.getWiki().compareTo(t1.getWiki())).collect(Collectors.toList());
|
|
result = result.stream().sorted((t1, t2) -> t2.getWiki().compareTo(t1.getWiki())).collect(Collectors.toList());
|
|
break;
|
|
break;
|
|
- case "wikiAsc":
|
|
|
|
|
|
+ case "wikiasc":
|
|
result = result.stream().sorted(Comparator.comparing(KnowledgeCompanyVo::getWiki)).collect(Collectors.toList());
|
|
result = result.stream().sorted(Comparator.comparing(KnowledgeCompanyVo::getWiki)).collect(Collectors.toList());
|
|
break;
|
|
break;
|
|
}
|
|
}
|