Authored by hugufei

去除0元助力商品的显示限制

... ... @@ -28,7 +28,6 @@ public class BaseSceneService {
paramMap.put(SearchRequestParams.PARAM_SEARCH_ATTRIBUTE_NOT, "2");// 非赠品
paramMap.put(SearchRequestParams.PARAM_SEARCH_NEEDSMALLSORT, "1");// 品类聚合时带上小分类
paramMap.put(SearchRequestParams.PARAM_SEARCH_AGG_WITH_PARAM_BRAND, "Y");// 聚合时使用参数中自带的参数
paramMap.put(SearchRequestParams.PARAM_SEARCH_CONTAIN_ZEROHELP, "N");// 不支持0元助力
// 关键词反转码
String keyword = SearchKeyWordUtils.getParamKeyword(paramMap, SearchRequestParams.PARAM_SEARCH_QUERY);// 转码
if (!StringUtils.isBlank(keyword)) {
... ... @@ -52,7 +51,6 @@ public class BaseSceneService {
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISLIMITEDBUY, "N");// 不支持限购
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE, "N");// 不支持定金预售
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISLIMITTIMEADVANCE, "N");// 不支持定金促销
paramMap.put(SearchRequestParams.PARAM_SEARCH_CONTAIN_ZEROHELP, "N");// 不支持0元助力
}
protected int getPage(Map<String, String> paramMap) {
... ...
... ... @@ -111,7 +111,7 @@ public class SearchRequestParams {
public static final String PARAM_SEARCH_IS_GLOBAL = "is_global"; // 是否只看全球购【y/n】
public static final String PARAM_SEARCH_CONTAIN_SECKILL = "contain_seckill"; // 是否包含秒杀[y]
public static final String PARAM_SEARCH_CONTAIN_FOBBIDEN = "contain_fobbiden"; // 是否包含秒杀[y]
public static final String PARAM_SEARCH_CONTAIN_ZEROHELP = "contain_zerohelp"; // 是否包含0元助力[y]
//public static final String PARAM_SEARCH_CONTAIN_ZEROHELP = "contain_zerohelp"; // 是否包含0元助力[y]
public static final String PARAM_SEARCH_USER_VIP_LEVEL = "userVipLevel";// 用户VIP等级
//not 参数
... ...
... ... @@ -335,11 +335,6 @@ public class SearchQueryHelper {
boolFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isSeckill, "Y"));
}
// 如果contain_zerohelp!=Y,则过滤掉0元助力商品
if (!MapUtils.getString(paramMap, SearchRequestParams.PARAM_SEARCH_CONTAIN_ZEROHELP, "N").equalsIgnoreCase("Y")) {
boolFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isZeroHelp, "Y"));
}
// 如果contain_fobbiden!=Y,则过滤屏蔽的商品
if (!MapUtils.getString(paramMap, SearchRequestParams.PARAM_SEARCH_CONTAIN_FOBBIDEN, "N").equalsIgnoreCase("Y")) {
boolFilter.mustNot(QueryBuilders.termQuery(ProductIndexEsField.isFobbiden, 1));
... ...
... ... @@ -55,7 +55,6 @@ public class MiniappFuzzyPageSceneService extends AbstractPageSceneService {
paramMap.put(SearchRequestParams.PARAM_SEARCH_CONTAIN_GLOBAL, "N");// 不支持全球购
paramMap.put(SearchRequestParams.PARAM_SEARCH_CONTAIN_UFO, "N");// 不支持UFO
paramMap.put(SearchRequestParams.PARAM_SEARCH_BUNDLETYPE, "0");// 不支持套餐
paramMap.put(SearchRequestParams.PARAM_SEARCH_CONTAIN_ZEROHELP, "N");// 不支持0元助力
}
... ...
... ... @@ -2,7 +2,10 @@ package com.yoho.search.service.scene.pages;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yoho.search.base.utils.*;
import com.yoho.search.base.utils.DateUtil;
import com.yoho.search.base.utils.ISearchConstants;
import com.yoho.search.base.utils.ProductIndexEsField;
import com.yoho.search.base.utils.SearchPageIdDefine;
import com.yoho.search.common.SearchCommonService;
import com.yoho.search.common.SearchRequestParams;
import com.yoho.search.common.utils.SearchApiResultUtils;
... ... @@ -177,7 +180,6 @@ public class ZeroHelpProductPageSceneService extends AbstractPageSceneService {
@Override
public void addParamsToParamMap(Map<String, String> paramMap) {
paramMap.put(SearchRequestParams.PARAM_SEARCH_CONTAIN_ZEROHELP, "Y");// 0元助力
paramMap.put(SearchRequestParams.PARAM_SEARCH_STATUS, "1");// 上架
paramMap.put(SearchRequestParams.PARAM_SEARCH_STOCKNUM, "1");// 有库存
paramMap.put(SearchRequestParams.PARAM_SEARCH_CONTAIN_FOBBIDEN, "Y");// 可以显示屏蔽商品
... ...