...
|
...
|
@@ -5,7 +5,7 @@ import com.yoho.search.base.utils.SearchCollectionUtils; |
|
|
import com.yoho.search.base.utils.ProductIndexEsField;
|
|
|
import com.yoho.search.aop.cache.SearchCacheAble;
|
|
|
import com.yoho.search.core.es.model.SearchParam;
|
|
|
import com.yoho.search.dal.model.SimilarSkn;
|
|
|
import com.yoho.search.dal.model.BidataSimilarSkn;
|
|
|
import com.yoho.search.models.SearchApiResult;
|
|
|
import com.yoho.search.common.SearchRequestParams;
|
|
|
import com.yoho.search.service.index.BigdataSimilarSknIndexBaseService;
|
...
|
...
|
@@ -69,21 +69,21 @@ public class BigdataSimilarSknService { |
|
|
return new SearchApiResult().setCode(400).setMessage("SKN不存在");
|
|
|
}
|
|
|
//4、获取similarskn
|
|
|
SimilarSkn similarSkn = bigdataSimilarSknIndexBaseService.querySimilarSkn(productSkn);
|
|
|
BidataSimilarSkn bidataSimilarSkn = bigdataSimilarSknIndexBaseService.querySimilarSkn(productSkn);
|
|
|
|
|
|
//5、构造searchParams
|
|
|
List<SearchParam> searchParams = new ArrayList<>();
|
|
|
//5.1)图片[性别+不同店铺]
|
|
|
List<String> diffShopImgSimilarSkns = new ArrayList<>();
|
|
|
if (similarSkn != null && StringUtils.isNotEmpty(similarSkn.getDiffShopImgSimilarSkns())) {
|
|
|
diffShopImgSimilarSkns = this.getDistinctSknList(similarSkn.getDiffShopImgSimilarSkns());
|
|
|
if (bidataSimilarSkn != null && StringUtils.isNotEmpty(bidataSimilarSkn.getDiffShopImgSimilarSkns())) {
|
|
|
diffShopImgSimilarSkns = this.getDistinctSknList(bidataSimilarSkn.getDiffShopImgSimilarSkns());
|
|
|
}
|
|
|
searchParams.add(this.builderSimilarSknSearchParam(productInfoInEs, diffShopImgSimilarSkns, true));
|
|
|
|
|
|
//5.2)行为[性别+不同店铺+同品类]
|
|
|
List<String> diffShopActionSimilarSkns = new ArrayList<>();
|
|
|
if (similarSkn != null && StringUtils.isNotEmpty(similarSkn.getDiffShopActionSimilarSkns())) {
|
|
|
diffShopActionSimilarSkns = this.getDistinctSknList(similarSkn.getDiffShopActionSimilarSkns());
|
|
|
if (bidataSimilarSkn != null && StringUtils.isNotEmpty(bidataSimilarSkn.getDiffShopActionSimilarSkns())) {
|
|
|
diffShopActionSimilarSkns = this.getDistinctSknList(bidataSimilarSkn.getDiffShopActionSimilarSkns());
|
|
|
}
|
|
|
searchParams.add(this.builderSimilarSknSearchParam(productInfoInEs, diffShopActionSimilarSkns, true));
|
|
|
|
...
|
...
|
|