Authored by wangnan

修改方法名

@@ -154,27 +154,27 @@ public class SearchServiceHelper { @@ -154,27 +154,27 @@ public class SearchServiceHelper {
154 154
155 155
156 //添加过滤请求 156 //添加过滤请求
157 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ID);  
158 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_CITYID);  
159 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ISTOP);  
160 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ISRECOMMEND);  
161 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_SORT);  
162 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_BIZID);  
163 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ORDERBY);  
164 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_SCORE);  
165 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ASSESSMENTNUM);  
166 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_TAGS);  
167 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_CONSUMPTION); 157 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ID);
  158 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_CITYID);
  159 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ISTOP);
  160 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ISRECOMMEND);
  161 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_SORT);
  162 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_BIZID);
  163 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ORDERBY);
  164 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_SCORE);
  165 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ASSESSMENTNUM);
  166 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_TAGS);
  167 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_CONSUMPTION);
168 //boolFilter = BoolQueryBuilder(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_LATITUDE); 168 //boolFilter = BoolQueryBuilder(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_LATITUDE);
169 //boolFilter = BoolQueryBuilder(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_LONGITUDE); 169 //boolFilter = BoolQueryBuilder(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_LONGITUDE);
170 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_PUBLISHTIME);  
171 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_USERTYPE);  
172 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_USERAUTH);  
173 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ISDELETED);  
174 - boolFilter = BoolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_UID); 170 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_PUBLISHTIME);
  171 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_USERTYPE);
  172 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_USERAUTH);
  173 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_ISDELETED);
  174 + boolFilter = boolQueryBuilderWithMutiValue(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_UID);
175 175
176 176
177 - boolFilter = BoolQueryBuilderGte(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_STORENUM); 177 + boolFilter = boolQueryBuilderGte(paramMap, boolFilter, ISearchConstans.PARAM_SEARCH_STORENUM);
178 178
179 // 通用的过滤请求 179 // 通用的过滤请求
180 for (String key : paramMap.keySet()) { 180 for (String key : paramMap.keySet()) {
@@ -283,7 +283,7 @@ public class SearchServiceHelper { @@ -283,7 +283,7 @@ public class SearchServiceHelper {
283 * @param fieldName 283 * @param fieldName
284 * @return 284 * @return
285 */ 285 */
286 - private BoolQueryBuilder BoolQueryBuilderWithMutiValue(Map<String, String> paramMap, BoolQueryBuilder boolFilter, String fieldName) { 286 + private BoolQueryBuilder boolQueryBuilderWithMutiValue(Map<String, String> paramMap, BoolQueryBuilder boolFilter, String fieldName) {
287 if (paramMap.containsKey(fieldName) && StringUtils.isNotBlank(paramMap.get(fieldName))) { 287 if (paramMap.containsKey(fieldName) && StringUtils.isNotBlank(paramMap.get(fieldName))) {
288 int[] values = ConvertUtils.stringToIntArray(paramMap.get(fieldName), ","); 288 int[] values = ConvertUtils.stringToIntArray(paramMap.get(fieldName), ",");
289 boolFilter.must(QueryBuilders.termsQuery(fieldName, values)); 289 boolFilter.must(QueryBuilders.termsQuery(fieldName, values));
@@ -300,7 +300,7 @@ public class SearchServiceHelper { @@ -300,7 +300,7 @@ public class SearchServiceHelper {
300 * @param fieldName 300 * @param fieldName
301 * @return 301 * @return
302 */ 302 */
303 - private BoolQueryBuilder BoolQueryBuilder(Map<String, String> paramMap, BoolQueryBuilder boolFilter, String fieldName) { 303 + private BoolQueryBuilder boolQueryBuilder(Map<String, String> paramMap, BoolQueryBuilder boolFilter, String fieldName) {
304 if (paramMap.containsKey(fieldName) && StringUtils.isNotBlank(paramMap.get(fieldName))) { 304 if (paramMap.containsKey(fieldName) && StringUtils.isNotBlank(paramMap.get(fieldName))) {
305 boolFilter.must(QueryBuilders.termsQuery(fieldName, paramMap.get(fieldName))); 305 boolFilter.must(QueryBuilders.termsQuery(fieldName, paramMap.get(fieldName)));
306 } 306 }
@@ -315,7 +315,7 @@ public class SearchServiceHelper { @@ -315,7 +315,7 @@ public class SearchServiceHelper {
315 * @param fieldName 315 * @param fieldName
316 * @return 316 * @return
317 */ 317 */
318 - private BoolQueryBuilder BoolQueryBuilderGte(Map<String, String> paramMap, BoolQueryBuilder boolFilter, String fieldName) { 318 + private BoolQueryBuilder boolQueryBuilderGte(Map<String, String> paramMap, BoolQueryBuilder boolFilter, String fieldName) {
319 if (paramMap.containsKey(fieldName) && StringUtils.isNotBlank(paramMap.get(fieldName))) { 319 if (paramMap.containsKey(fieldName) && StringUtils.isNotBlank(paramMap.get(fieldName))) {
320 int begin = Integer.parseInt(paramMap.get(fieldName)); 320 int begin = Integer.parseInt(paramMap.get(fieldName));
321 if (begin == 0) { 321 if (begin == 0) {