|
|
package com.yoho.search.service.list;
|
|
|
|
|
|
import com.yoho.search.models.SearchApiResult;
|
|
|
import com.yoho.search.recall.common.CommonRecallProductListService;
|
|
|
import com.yoho.search.recall.performance.PerformanceRecallProductListService;
|
|
|
import com.yoho.search.recall.scene.SceneRecallProductListService;
|
|
|
import com.yoho.search.recall.sort.SortRecallProductListService;
|
|
|
import com.yoho.search.service.base.SearchDynamicConfigService;
|
...
|
...
|
@@ -21,7 +21,7 @@ public class ProductListSwitchService { |
|
|
@Autowired
|
|
|
private DefaultProductListService defaultProductListService;
|
|
|
@Autowired
|
|
|
private CommonRecallProductListService commonRecallProductListService;
|
|
|
private PerformanceRecallProductListService performanceRecallProductListService;
|
|
|
@Autowired
|
|
|
private SceneRecallProductListService sceneRecallProductListService;
|
|
|
@Autowired
|
...
|
...
|
@@ -36,26 +36,26 @@ public class ProductListSwitchService { |
|
|
* @return
|
|
|
*/
|
|
|
public SearchApiResult productList(Map<String, String> paramMap) {
|
|
|
// 1、不是个性化,则直接走费个性化接口
|
|
|
// 1、不是个性化,则直接走非个性化接口
|
|
|
if (!this.isPersionalScene(paramMap)) {
|
|
|
return defaultProductListService.productListNotPersional(paramMap);
|
|
|
}
|
|
|
// 2、个性化时根据开关,决定是否使用高性能的场景-双11专用
|
|
|
boolean perfamanceStrategyOpen = searchDynamicConfigService.searchPersionalPerfamanceStrategyOpen();
|
|
|
if(perfamanceStrategyOpen){
|
|
|
return commonRecallProductListService.productList(paramMap);
|
|
|
return performanceRecallProductListService.productList(paramMap);
|
|
|
}
|
|
|
// 3、品类页使用单独的召回页
|
|
|
boolean sortPageRecallOpen = searchDynamicConfigService.isSortPageRecallOpen();
|
|
|
if(sortPageRecallOpen && searchCommonHelper.isSortPageDefault(paramMap)){
|
|
|
return sortRecallProductListService.recallProductList(paramMap);
|
|
|
return sortRecallProductListService.productList(paramMap);
|
|
|
}
|
|
|
// 4、全部使用新的召回策略
|
|
|
boolean searchPersionalNewStrategyOpen = searchDynamicConfigService.searchPersionalNewStrategyOpen();
|
|
|
if (searchPersionalNewStrategyOpen) {
|
|
|
return sceneRecallProductListService.productList(paramMap);
|
|
|
}
|
|
|
// 4、使用向量版本的个性化方案
|
|
|
// 5、默认使用向量版本的个性化方案
|
|
|
return defaultProductListService.productListForDefaultPersional(paramMap);
|
|
|
}
|
|
|
|
...
|
...
|
|