|
@@ -13,6 +13,7 @@ import com.yoho.search.recall.scene.beans.builder.RecallParamsBuilder; |
|
@@ -13,6 +13,7 @@ import com.yoho.search.recall.scene.beans.builder.RecallParamsBuilder; |
13
|
import com.yoho.search.recall.scene.models.RecallParams;
|
13
|
import com.yoho.search.recall.scene.models.RecallParams;
|
14
|
import com.yoho.search.service.base.SearchCacheService;
|
14
|
import com.yoho.search.service.base.SearchCacheService;
|
15
|
import com.yoho.search.service.base.SearchCommonService;
|
15
|
import com.yoho.search.service.base.SearchCommonService;
|
|
|
16
|
+import com.yoho.search.service.base.SearchDynamicConfigService;
|
16
|
import com.yoho.search.service.helper.ProductListHelper;
|
17
|
import com.yoho.search.service.helper.ProductListHelper;
|
17
|
import com.yoho.search.service.helper.SearchCommonHelper;
|
18
|
import com.yoho.search.service.helper.SearchCommonHelper;
|
18
|
import com.yoho.search.service.helper.SearchParamHelper;
|
19
|
import com.yoho.search.service.helper.SearchParamHelper;
|
|
@@ -46,6 +47,8 @@ public class PromotionProductListService extends AbstractCacheAbleService { |
|
@@ -46,6 +47,8 @@ public class PromotionProductListService extends AbstractCacheAbleService { |
46
|
private RecallParamsBuilder recallParamsBuilder;
|
47
|
private RecallParamsBuilder recallParamsBuilder;
|
47
|
@Autowired
|
48
|
@Autowired
|
48
|
private SceneRecallProductListService sceneRecallProductListService;
|
49
|
private SceneRecallProductListService sceneRecallProductListService;
|
|
|
50
|
+ @Autowired
|
|
|
51
|
+ private SearchDynamicConfigService searchDynamicConfigService;
|
49
|
|
52
|
|
50
|
@Override
|
53
|
@Override
|
51
|
public SearchCache getSearchCache() {
|
54
|
public SearchCache getSearchCache() {
|
|
@@ -74,7 +77,7 @@ public class PromotionProductListService extends AbstractCacheAbleService { |
|
@@ -74,7 +77,7 @@ public class PromotionProductListService extends AbstractCacheAbleService { |
74
|
BoolQueryBuilder promotionMustFilter = promotionSceneHelper.getMustFilterByPromotion(promotionConditions);
|
77
|
BoolQueryBuilder promotionMustFilter = promotionSceneHelper.getMustFilterByPromotion(promotionConditions);
|
75
|
|
78
|
|
76
|
//3、个性化-走召回逻辑
|
79
|
//3、个性化-走召回逻辑
|
77
|
- if (searchCommonHelper.isPersionalScene(paramMap)) {
|
80
|
+ if (this.goRecallLogic(paramMap)) {
|
78
|
RecallParams promotionRecallParams = recallParamsBuilder.buildPromotionRecallParams(paramMap, promotionMustFilter, pageSize);
|
81
|
RecallParams promotionRecallParams = recallParamsBuilder.buildPromotionRecallParams(paramMap, promotionMustFilter, pageSize);
|
79
|
return sceneRecallProductListService.recallProductList(promotionRecallParams, page);
|
82
|
return sceneRecallProductListService.recallProductList(promotionRecallParams, page);
|
80
|
}
|
83
|
}
|
|
@@ -83,6 +86,17 @@ public class PromotionProductListService extends AbstractCacheAbleService { |
|
@@ -83,6 +86,17 @@ public class PromotionProductListService extends AbstractCacheAbleService { |
83
|
return this.defaultPromotionList(paramMap, promotionMustFilter, page, pageSize);
|
86
|
return this.defaultPromotionList(paramMap, promotionMustFilter, page, pageSize);
|
84
|
}
|
87
|
}
|
85
|
|
88
|
|
|
|
89
|
+ private boolean goRecallLogic(Map<String, String> paramMap){
|
|
|
90
|
+ if(!searchCommonHelper.isPersionalScene(paramMap)){
|
|
|
91
|
+ return false;
|
|
|
92
|
+ }
|
|
|
93
|
+ if(!searchDynamicConfigService.searchPersionalNewStrategyPromotionOpen()){
|
|
|
94
|
+ return false;
|
|
|
95
|
+ }
|
|
|
96
|
+ return true;
|
|
|
97
|
+ }
|
|
|
98
|
+
|
|
|
99
|
+
|
86
|
/**
|
100
|
/**
|
87
|
* 默认的促销列表的返回方式
|
101
|
* 默认的促销列表的返回方式
|
88
|
*
|
102
|
*
|