Authored by unknown

优惠券列表默认不支持 【限定、秒杀、预售、定金预售、套餐】

... ... @@ -40,6 +40,8 @@ public class SearchRequestParams {
public static final String PARAM_SEARCH_ISLIMITEDBUY = "isLimitbuy"; // 查询是否限购
public static final String PARAM_SEARCH_ISADVANCE = "isAdvance"; // 查询是否预售
public static final String PARAM_SEARCH_ISDESPOSITADVANCE = "isDepositAdvance"; // 查询是否定金预售
public static final String PARAM_SEARCH_BUNDLETYPE = "bundleType"; // 售卖类型
public static final String PARAM_SEARCH_SPECIALOFFER = "specialoffer"; // ◆是否为促销品
public static final String PARAM_SEARCH_ISSALES = "sales"; // ◆查询是否销售(有货不销售)
... ...
... ... @@ -214,6 +214,11 @@ public class SearchServiceHelper {
int[] storeShowStatuss = ConvertUtils.stringToIntArray(paramMap.get(SearchRequestParams.PARAM_SEARCH_STORESHOWSTATUS), ",");
boolFilter.must(QueryBuilders.termsQuery(ProductIndexEsField.storeShowStatus, storeShowStatuss));
}
// 套餐
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_BUNDLETYPE)) {
int[] bundleTypes = ConvertUtils.stringToIntArray(paramMap.get(SearchRequestParams.PARAM_SEARCH_BUNDLETYPE), ",");
boolFilter.must(QueryBuilders.termsQuery(ProductIndexEsField.bundleType, bundleTypes));
}
// //////////////////////////////////////////不支持多个参数///////////////////////////////////////////////////////////
// 是否特价
... ...
... ... @@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
import com.yoho.search.base.utils.SearchPageIdDefine;
import com.yoho.search.common.utils.SearchApiResultUtils;
import com.yoho.search.models.SearchApiResult;
import com.yoho.search.service.base.SearchRequestParams;
import com.yoho.search.service.scene.common.AbstractSceneService;
import com.yoho.search.service.scene.common.SceneProductListService;
import com.yoho.search.service.scene.common.SceneSelectionsService;
... ... @@ -32,8 +33,14 @@ public class CouponSceneService extends AbstractSceneService {
@Override
public void addParamsToParamMap(Map<String, String> paramMap) {
super.addDefaultParamsToParamMap(paramMap);
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISLIMITED, "N");// 不支持限定
paramMap.put(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL, "N");// 不支持秒杀
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISADVANCE, "N");// 不支持预售
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE, "N");// 不支持定金预售
paramMap.put(SearchRequestParams.PARAM_SEARCH_BUNDLETYPE, "0");// 不支持套餐
// paramMap.put(SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE,"N");//不支持定金促销
}
@Override
public SearchApiResult productList(Map<String, String> paramMap) {
try {
... ...