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