Merge branch 'wn_ufo_jianding' into 0920
Showing
3 changed files
with
22 additions
and
3 deletions
@@ -158,7 +158,6 @@ public class SearchRequestParams { | @@ -158,7 +158,6 @@ public class SearchRequestParams { | ||
158 | public static final String SHOPS_PARAM_STATUS = "status"; | 158 | public static final String SHOPS_PARAM_STATUS = "status"; |
159 | 159 | ||
160 | 160 | ||
161 | - | ||
162 | //ImageRepertory index param | 161 | //ImageRepertory index param |
163 | public static final String IMAGEREPERTORY_PARAM_ID = "id"; | 162 | public static final String IMAGEREPERTORY_PARAM_ID = "id"; |
164 | public static final String IMAGEREPERTORY_PARAM_ITEMID = "itemId"; | 163 | public static final String IMAGEREPERTORY_PARAM_ITEMID = "itemId"; |
@@ -185,6 +184,7 @@ public class SearchRequestParams { | @@ -185,6 +184,7 @@ public class SearchRequestParams { | ||
185 | public static final String UFOPRODUCTINDEX_PARAM_MIDSORT = "midSort"; | 184 | public static final String UFOPRODUCTINDEX_PARAM_MIDSORT = "midSort"; |
186 | public static final String UFOPRODUCTINDEX_PARAM_GENDER = "gender"; | 185 | public static final String UFOPRODUCTINDEX_PARAM_GENDER = "gender"; |
187 | public static final String UFOPRODUCTINDEX_PARAM_BRAND = "brand"; | 186 | public static final String UFOPRODUCTINDEX_PARAM_BRAND = "brand"; |
187 | + public static final String UFOPRODUCTINDEX_PARAM_NOT_BRAND = "not_brand"; | ||
188 | public static final String UFOPRODUCTINDEX_PARAM_SERIES = "series"; | 188 | public static final String UFOPRODUCTINDEX_PARAM_SERIES = "series"; |
189 | public static final String UFOPRODUCTINDEX_PARAM_SIZE = "size"; | 189 | public static final String UFOPRODUCTINDEX_PARAM_SIZE = "size"; |
190 | public static final String UFOPRODUCTINDEX_PARAM_COLOR = "color"; | 190 | public static final String UFOPRODUCTINDEX_PARAM_COLOR = "color"; |
@@ -202,5 +202,8 @@ public class SearchRequestParams { | @@ -202,5 +202,8 @@ public class SearchRequestParams { | ||
202 | public static final String UFO_PARAM_RANK_TYPE = "rankType"; | 202 | public static final String UFO_PARAM_RANK_TYPE = "rankType"; |
203 | // ufo发售日历 商品类型 | 203 | // ufo发售日历 商品类型 |
204 | public static final String UFO_PARAM_SEARCH_SALE_CALENDAR_PRODUCT_TYPE = "product_type"; | 204 | public static final String UFO_PARAM_SEARCH_SALE_CALENDAR_PRODUCT_TYPE = "product_type"; |
205 | - | 205 | + // ufo过滤独家商品 ufo鉴定服务用 |
206 | + public static final String UFO_PARAM_SEARCH_IS_FILTER_LIMIT_SALE = "isFilterLimitSale"; | ||
207 | + | ||
208 | + | ||
206 | } | 209 | } |
@@ -202,6 +202,17 @@ public class SearchCommonHelper { | @@ -202,6 +202,17 @@ public class SearchCommonHelper { | ||
202 | } | 202 | } |
203 | 203 | ||
204 | /** | 204 | /** |
205 | + * 判断UFO搜索是否需要包含独家商品 | ||
206 | + */ | ||
207 | + public boolean filterUfoLimitSale(Map<String, String> paramMap) { | ||
208 | + if (paramMap.containsKey(SearchRequestParams.UFO_PARAM_SEARCH_IS_FILTER_LIMIT_SALE) && "Y".equals(paramMap.get(SearchRequestParams.UFO_PARAM_SEARCH_IS_FILTER_LIMIT_SALE))) { | ||
209 | + return true; | ||
210 | + } | ||
211 | + return false; | ||
212 | + } | ||
213 | + | ||
214 | + | ||
215 | + /** | ||
205 | * 当前查询的关键字是否是skn | 216 | * 当前查询的关键字是否是skn |
206 | * | 217 | * |
207 | * @param keyword | 218 | * @param keyword |
@@ -423,7 +434,6 @@ public class SearchCommonHelper { | @@ -423,7 +434,6 @@ public class SearchCommonHelper { | ||
423 | /** | 434 | /** |
424 | * 获取参数中的销售类目参数-仅支持一个 | 435 | * 获取参数中的销售类目参数-仅支持一个 |
425 | * | 436 | * |
426 | - * | ||
427 | * @param paramMap | 437 | * @param paramMap |
428 | * @return | 438 | * @return |
429 | */ | 439 | */ |
@@ -67,6 +67,7 @@ public class UfoSearchQueryHelper extends BaseService { | @@ -67,6 +67,7 @@ public class UfoSearchQueryHelper extends BaseService { | ||
67 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_MIDSORT, UfoProductIndexEsField.midSortId); | 67 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_MIDSORT, UfoProductIndexEsField.midSortId); |
68 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_GENDER, UfoProductIndexEsField.gender); | 68 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_GENDER, UfoProductIndexEsField.gender); |
69 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_BRAND, UfoProductIndexEsField.brandId); | 69 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_BRAND, UfoProductIndexEsField.brandId); |
70 | + this.addMustNotIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_NOT_BRAND, UfoProductIndexEsField.brandId); | ||
70 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_SERIES, UfoProductIndexEsField.seriesId); | 71 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_SERIES, UfoProductIndexEsField.seriesId); |
71 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_SIZE, UfoProductIndexEsField.sizeIds); | 72 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_SIZE, UfoProductIndexEsField.sizeIds); |
72 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_COLOR, UfoProductIndexEsField.colorIds); | 73 | this.addMustIntTermsQuery(boolFilter, paramMap, SearchRequestParams.UFOPRODUCTINDEX_PARAM_COLOR, UfoProductIndexEsField.colorIds); |
@@ -77,6 +78,11 @@ public class UfoSearchQueryHelper extends BaseService { | @@ -77,6 +78,11 @@ public class UfoSearchQueryHelper extends BaseService { | ||
77 | boolFilter.mustNot(QueryBuilders.termQuery(UfoProductIndexEsField.isYoho, "Y")); | 78 | boolFilter.mustNot(QueryBuilders.termQuery(UfoProductIndexEsField.isYoho, "Y")); |
78 | } | 79 | } |
79 | 80 | ||
81 | + //是否要过滤独家商品 | ||
82 | + if (searchCommonHelper.filterUfoLimitSale(paramMap)) { | ||
83 | + boolFilter.mustNot(QueryBuilders.termQuery(UfoProductIndexEsField.isLimitSale, "Y")); | ||
84 | + } | ||
85 | + | ||
80 | //硬过滤[有货无库存的商品,delStatus会设置为1] | 86 | //硬过滤[有货无库存的商品,delStatus会设置为1] |
81 | boolFilter.must(QueryBuilders.termQuery(UfoProductIndexEsField.delStatus, 0)); | 87 | boolFilter.must(QueryBuilders.termQuery(UfoProductIndexEsField.delStatus, 0)); |
82 | boolFilter.must(QueryBuilders.termQuery(UfoProductIndexEsField.shelveStatus, 1)); | 88 | boolFilter.must(QueryBuilders.termQuery(UfoProductIndexEsField.shelveStatus, 1)); |
-
Please register or login to post a comment