Authored by 胡古飞

添加全球购是否显示小飞机的字段

... ... @@ -43,7 +43,7 @@ public class SearchServiceHelper {
private DynamicSearchRuleHelper dynamicSearchRuleHelper;
@Autowired
private FunctionScoreSearchHelper functionScoreSearchHelper;
/**
* 构造关键字查询的query
*
... ... @@ -97,7 +97,7 @@ public class SearchServiceHelper {
return queryBuilder;
}
/**
* 构造关键字查询的query的时候operator默认为or,minimum匹配度是50%
*
... ... @@ -145,20 +145,25 @@ public class SearchServiceHelper {
QueryBuilder queryBuilder = this.constructQueryBuilder(paramMap);
queryBuilder = functionScoreSearchHelper.buildFunctionScoreQueryBuild(queryBuilder, paramMap);
return queryBuilder;
// queryBuilder = this.buildPersonalSearch(queryBuilder, paramMap);
// queryBuilder = this.buildFunctionScoreQueryBuild(queryBuilder, paramMap);
// return queryBuilder;
// String dynamicRuleValue = dynamicSearchRuleHelper.getDynamicRuleValue(paramMap);
// if (StringUtils.isEmpty(dynamicRuleValue) || "-1".equals(dynamicRuleValue)) {
// queryBuilder = this.buildGlobalSearch(queryBuilder, paramMap);
// queryBuilder = this.buildDeScoreBrandSearch(queryBuilder, paramMap);
// } else {
// queryBuilder = dynamicSearchRuleHelper.buildDynamicSerach(queryBuilder, paramMap, dynamicRuleValue);
// }
// return queryBuilder;
// queryBuilder = this.buildPersonalSearch(queryBuilder, paramMap);
// queryBuilder = this.buildFunctionScoreQueryBuild(queryBuilder,
// paramMap);
// return queryBuilder;
// String dynamicRuleValue =
// dynamicSearchRuleHelper.getDynamicRuleValue(paramMap);
// if (StringUtils.isEmpty(dynamicRuleValue) ||
// "-1".equals(dynamicRuleValue)) {
// queryBuilder = this.buildGlobalSearch(queryBuilder, paramMap);
// queryBuilder = this.buildDeScoreBrandSearch(queryBuilder, paramMap);
// } else {
// queryBuilder =
// dynamicSearchRuleHelper.buildDynamicSerach(queryBuilder, paramMap,
// dynamicRuleValue);
// }
// return queryBuilder;
}
public QueryBuilder constructOrQueryBuilderForProductList(Map<String, String> paramMap) {
QueryBuilder queryBuilder = this.constructOrQueryBuilder(paramMap);
queryBuilder = functionScoreSearchHelper.buildFunctionScoreQueryBuild(queryBuilder, paramMap);
... ... @@ -675,10 +680,7 @@ public class SearchServiceHelper {
productMap.put("sales_num", map.get("salesNum"));
productMap.put("status", map.get("status"));
productMap.put("is_promotion", map.get("ispromotion"));
productMap.put("is_promotion", map.get("ispromotion"));
productMap.put("tbl_country_id", map.get("tblCountryId"));
productMap.put("tbl_country_name", map.get("tblCountryName"));
productMap.put("is_promotion", map.get("ispromotion"));
String yohoodIdFromMap = (String) map.get("yohoodId");
if (yohoodIdFromMap != null && yohoodIdFromMap.length() > 0) {
productMap.put("yohood_id", yohoodIdFromMap);
... ... @@ -695,13 +697,22 @@ public class SearchServiceHelper {
productMap.put("student_price", map.get("studentPrice"));
}
productMap.put("country_id", map.get("countryId"));
// 是否是全球购商品
productMap.put("is_global", map.get("isGlobal") == null ? "N" : map.get("isGlobal"));
// 是否学生返币
productMap.put("is_student_rebate", map.get("isstudentrebate") == null ? "N" : map.get("isstudentrebate"));
// 年龄层,逗号隔开的字符串
productMap.put("age_level", map.get("ageLevel") == null ? "" : map.get("ageLevel"));
// 是否是全球购商品
productMap.put("is_global", map.get("isGlobal") == null ? "N" : map.get("isGlobal"));
Integer tbl_country_id = 0;
try {
tbl_country_id = (Integer) map.get("tblCountryId");
} catch (Exception e) {
}
productMap.put("tbl_country_id", tbl_country_id);
productMap.put("tbl_country_name", map.get("tblCountryName"));
String tbl_plane = tbl_country_id == 86 ? "Y" : "N";
productMap.put("tbl_plane", tbl_plane);
return productMap;
}
}
... ...