...
|
...
|
@@ -13,6 +13,7 @@ import com.yoho.search.recall.scene.beans.builder.RecallParamsBuilder; |
|
|
import com.yoho.search.recall.scene.models.RecallParams;
|
|
|
import com.yoho.search.service.base.SearchCacheService;
|
|
|
import com.yoho.search.service.base.SearchCommonService;
|
|
|
import com.yoho.search.service.base.SearchDynamicConfigService;
|
|
|
import com.yoho.search.service.helper.ProductListHelper;
|
|
|
import com.yoho.search.service.helper.SearchCommonHelper;
|
|
|
import com.yoho.search.service.helper.SearchParamHelper;
|
...
|
...
|
@@ -46,6 +47,8 @@ public class PromotionProductListService extends AbstractCacheAbleService { |
|
|
private RecallParamsBuilder recallParamsBuilder;
|
|
|
@Autowired
|
|
|
private SceneRecallProductListService sceneRecallProductListService;
|
|
|
@Autowired
|
|
|
private SearchDynamicConfigService searchDynamicConfigService;
|
|
|
|
|
|
@Override
|
|
|
public SearchCache getSearchCache() {
|
...
|
...
|
@@ -74,7 +77,7 @@ public class PromotionProductListService extends AbstractCacheAbleService { |
|
|
BoolQueryBuilder promotionMustFilter = promotionSceneHelper.getMustFilterByPromotion(promotionConditions);
|
|
|
|
|
|
//3、个性化-走召回逻辑
|
|
|
if (searchCommonHelper.isPersionalScene(paramMap)) {
|
|
|
if (this.goRecallLogic(paramMap)) {
|
|
|
RecallParams promotionRecallParams = recallParamsBuilder.buildPromotionRecallParams(paramMap, promotionMustFilter, pageSize);
|
|
|
return sceneRecallProductListService.recallProductList(promotionRecallParams, page);
|
|
|
}
|
...
|
...
|
@@ -83,6 +86,17 @@ public class PromotionProductListService extends AbstractCacheAbleService { |
|
|
return this.defaultPromotionList(paramMap, promotionMustFilter, page, pageSize);
|
|
|
}
|
|
|
|
|
|
private boolean goRecallLogic(Map<String, String> paramMap){
|
|
|
if(!searchCommonHelper.isPersionalScene(paramMap)){
|
|
|
return false;
|
|
|
}
|
|
|
if(!searchDynamicConfigService.searchPersionalNewStrategyPromotionOpen()){
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 默认的促销列表的返回方式
|
|
|
*
|
...
|
...
|
|