diff --git a/waynboot-common/src/main/java/com/wayn/common/core/domain/vo/SearchVO.java b/waynboot-common/src/main/java/com/wayn/common/core/domain/vo/SearchVO.java index ba8655d..e82fb8b 100644 --- a/waynboot-common/src/main/java/com/wayn/common/core/domain/vo/SearchVO.java +++ b/waynboot-common/src/main/java/com/wayn/common/core/domain/vo/SearchVO.java @@ -15,9 +15,13 @@ public class SearchVO { private Integer brandId; private Boolean isNew; - + private Boolean isHot; + private Boolean filterNew; + + private Boolean filterHot; + private Boolean isSales; private Boolean isPrice; diff --git a/waynboot-mobile-api/src/main/java/com/wayn/mobile/api/controller/SearchController.java b/waynboot-mobile-api/src/main/java/com/wayn/mobile/api/controller/SearchController.java index 58f5c8b..a7a11bb 100644 --- a/waynboot-mobile-api/src/main/java/com/wayn/mobile/api/controller/SearchController.java +++ b/waynboot-mobile-api/src/main/java/com/wayn/mobile/api/controller/SearchController.java @@ -93,7 +93,9 @@ public class SearchController extends BaseController { } // 按热门商品 if (isHot) { - searchSourceBuilder.sort(new FieldSortBuilder("isHot").order(SortOrder.DESC)); + // searchSourceBuilder.sort(new FieldSortBuilder("isHot").order(SortOrder.DESC)); + MatchQueryBuilder filterQuery1 = QueryBuilders.matchQuery("isHot", true); + searchSourceBuilder.postFilter(filterQuery1); } // 按新品 if (isNew) {