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