|
@@ -4,7 +4,6 @@ import java.util.ArrayList; |
|
@@ -4,7 +4,6 @@ import java.util.ArrayList; |
4
|
import java.util.List;
|
4
|
import java.util.List;
|
5
|
import java.util.Map;
|
5
|
import java.util.Map;
|
6
|
|
6
|
|
7
|
-import org.apache.commons.lang.StringUtils;
|
|
|
8
|
import org.elasticsearch.index.query.BoolQueryBuilder;
|
7
|
import org.elasticsearch.index.query.BoolQueryBuilder;
|
9
|
import org.elasticsearch.index.query.QueryBuilders;
|
8
|
import org.elasticsearch.index.query.QueryBuilders;
|
10
|
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
|
9
|
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
|
|
@@ -21,7 +20,6 @@ import com.yoho.search.core.es.model.SearchParam; |
|
@@ -21,7 +20,6 @@ import com.yoho.search.core.es.model.SearchParam; |
21
|
import com.yoho.search.core.es.model.SearchResult;
|
20
|
import com.yoho.search.core.es.model.SearchResult;
|
22
|
import com.yoho.search.service.service.SearchCommonService;
|
21
|
import com.yoho.search.service.service.SearchCommonService;
|
23
|
import com.yoho.search.service.servicenew.IGoodProductsService;
|
22
|
import com.yoho.search.service.servicenew.IGoodProductsService;
|
24
|
-import com.yoho.search.service.utils.SearchRequestParams;
|
|
|
25
|
import com.yoho.search.service.vo.SearchApiResult;
|
23
|
import com.yoho.search.service.vo.SearchApiResult;
|
26
|
|
24
|
|
27
|
@Service
|
25
|
@Service
|
|
@@ -32,10 +30,14 @@ public class GoodProductListService implements IGoodProductsService { |
|
@@ -32,10 +30,14 @@ public class GoodProductListService implements IGoodProductsService { |
32
|
|
30
|
|
33
|
@Override
|
31
|
@Override
|
34
|
public SearchApiResult goodProductList(Map<String, String> paramMap) {
|
32
|
public SearchApiResult goodProductList(Map<String, String> paramMap) {
|
35
|
- String productSkns = paramMap.get(SearchRequestParams.PARAM_SYNC_SKN);
|
|
|
36
|
- if (StringUtils.isBlank(productSkns)) {
|
|
|
37
|
- return new SearchApiResult().setCode(400).setData("请输入skn");
|
|
|
38
|
- }
|
33
|
+ //String productSkns = paramMap.get(SearchRequestParams.PARAM_SYNC_SKN);
|
|
|
34
|
+ BoolQueryBuilder boolFilter = QueryBuilders.boolQuery();
|
|
|
35
|
+ boolFilter.must(QueryBuilders.termQuery("isPhraseExist","Y"));
|
|
|
36
|
+ boolFilter.must(QueryBuilders.termQuery("productSkn", "50002052"));
|
|
|
37
|
+ SearchParam searchParam = new SearchParam();
|
|
|
38
|
+ searchParam.setFiter(boolFilter);
|
|
|
39
|
+ searchCommonService.doSearch("productindex", searchParam);
|
|
|
40
|
+ return null;
|
39
|
}
|
41
|
}
|
40
|
|
42
|
|
41
|
/**
|
43
|
/**
|