Skip to content

Commit

Permalink
Merge pull request #30 from opensourceways/feature/composite
Browse files Browse the repository at this point in the history
openeuler官网案例展示顺序调整
  • Loading branch information
ZWJason authored Feb 10, 2025
2 parents 4c2056e + 0d25487 commit ca4835e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,15 @@ public Map<String, Object> advancedSearch(Map<String, String> search, String cat
sourceBuilder.from(startIndex).size(pageSize);
sourceBuilder.query(boolQueryBuilder);

sourceBuilder.sort("date", SortOrder.DESC);
if ("showcase".equals(category)) {
if (search.containsKey("industry")) {
sourceBuilder.sort("typeOrder", SortOrder.DESC);
} else {
sourceBuilder.sort("allOrder", SortOrder.DESC);
}
} else {
sourceBuilder.sort("date", SortOrder.DESC);
}

request.source(sourceBuilder);

Expand Down

0 comments on commit ca4835e

Please sign in to comment.