...
|
...
|
@@ -90,7 +90,7 @@ public class SortSceneService extends AbstractSceneService { |
|
|
this.addParamsToParamMap(paramMap);
|
|
|
CompletableFuture<SearchApiResult> productListFuture = null;
|
|
|
// 2、获取商品列表-是否使用召回策略
|
|
|
if (searchDynamicConfigService.isSortPageRecallOpen() && searchCommonHelper.isOrderEmpty(paramMap) && searchCommonHelper.hasUid(paramMap)) {
|
|
|
if (goToRecall(paramMap)) {
|
|
|
productListFuture = CompletableFuture.supplyAsync(() -> sortRecallSceneService.productList(this.newParamMap(paramMap)), executorService);
|
|
|
} else {
|
|
|
productListFuture = CompletableFuture.supplyAsync(() -> sceneProductListService.productList(this.newParamMap(paramMap)), executorService);
|
...
|
...
|
@@ -117,6 +117,23 @@ public class SortSceneService extends AbstractSceneService { |
|
|
}
|
|
|
}
|
|
|
|
|
|
private boolean goToRecall(Map<String, String> paramMap) {
|
|
|
if (!searchDynamicConfigService.isSortPageRecallOpen()) {
|
|
|
return false;
|
|
|
}
|
|
|
if (!searchCommonHelper.isOrderEmpty(paramMap) && searchCommonHelper.hasUid(paramMap)) {
|
|
|
return false;
|
|
|
}
|
|
|
int uid = searchCommonHelper.getUid(paramMap);
|
|
|
if (uid <= 0) {
|
|
|
return false;
|
|
|
}
|
|
|
if (!searchDynamicConfigService.isGoToSortRecallUser(uid)) {
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public SearchApiResult aggregations(Map<String, String> paramMap) {
|
|
|
try {
|
...
|
...
|
|