Authored by unknown

优惠券列表不支持定金预售和定金促销

... ... @@ -40,6 +40,7 @@ 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_ISLIMITTIMEADVANCE = "isLimitTimeAdvance"; // 查询是否定金促销
public static final String PARAM_SEARCH_BUNDLETYPE = "bundleType"; // 售卖类型
... ...
... ... @@ -273,6 +273,10 @@ public class SearchServiceHelper {
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE)) {
boolFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isDepositAdvance, paramMap.get(SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE)));
}
// 是否定金促销
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_ISLIMITTIMEADVANCE)) {
boolFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isLimitTimeAdvance, paramMap.get(SearchRequestParams.PARAM_SEARCH_ISLIMITTIMEADVANCE)));
}
// 是否新品
if (this.checkParamNotFiltered(paramMap, filterParamName, SearchRequestParams.PARAM_SEARCH_ISNEW)) {
boolFilter.must(QueryBuilders.termQuery(ProductIndexEsField.isnew, paramMap.get(SearchRequestParams.PARAM_SEARCH_ISNEW)));
... ... @@ -450,15 +454,14 @@ public class SearchServiceHelper {
// 活动模板相关的过滤条件
BoolQueryBuilder activitiesTermsBuilder = searchCommonHelper.getActivitiesTermsBuilder(paramMap);
if (activitiesTermsBuilder != null) {
boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.activities, activitiesTermsBuilder,ScoreMode.None));
boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.activities, activitiesTermsBuilder, ScoreMode.None));
}
//自定义标签
BoolQueryBuilder customizeTagsTermsBuilder = searchCommonHelper.getCustomizeTagBuilder(paramMap);
if (customizeTagsTermsBuilder != null) {
boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.customizeTags, customizeTagsTermsBuilder,ScoreMode.None));
}
// 自定义标签
BoolQueryBuilder customizeTagsTermsBuilder = searchCommonHelper.getCustomizeTagBuilder(paramMap);
if (customizeTagsTermsBuilder != null) {
boolFilter.must(QueryBuilders.nestedQuery(ProductIndexEsField.customizeTags, customizeTagsTermsBuilder, ScoreMode.None));
}
// 如果contain_seckill!=Y,则过滤掉秒杀商品
if (!paramMap.containsKey(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL) || !"Y".equals(paramMap.get(SearchRequestParams.PARAM_SEARCH_CONTAIN_SECKILL))) {
... ... @@ -490,8 +493,6 @@ public class SearchServiceHelper {
boolFilter.mustNot(QueryBuilders.termsQuery(ProductIndexEsField.shopId, paramMap.get(SearchRequestParams.PARAM_SEARCH_NOT_SHOP_ID).split(",")));
}
// // 通用的过滤请求
// for (String key : paramMap.keySet()) {
// if (key.startsWith("not_")) {
... ...
... ... @@ -36,12 +36,12 @@ public class CouponSceneService extends AbstractSceneService {
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_ISLIMITEDBUY, "N");// 不支持限购
// paramMap.put(SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE,"N");//不支持定金促销
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISDESPOSITADVANCE, "N");// 不支持定金预售
paramMap.put(SearchRequestParams.PARAM_SEARCH_ISLIMITTIMEADVANCE, "N");// 不支持定金促销
}
@Override
public SearchApiResult productList(Map<String, String> paramMap) {
try {
... ...