|
@@ -90,7 +90,7 @@ public class SortSceneService extends AbstractSceneService { |
|
@@ -90,7 +90,7 @@ public class SortSceneService extends AbstractSceneService { |
90
|
this.addParamsToParamMap(paramMap);
|
90
|
this.addParamsToParamMap(paramMap);
|
91
|
CompletableFuture<SearchApiResult> productListFuture = null;
|
91
|
CompletableFuture<SearchApiResult> productListFuture = null;
|
92
|
// 2、获取商品列表-是否使用召回策略
|
92
|
// 2、获取商品列表-是否使用召回策略
|
93
|
- if (searchDynamicConfigService.isSortPageRecallOpen() && searchCommonHelper.isOrderEmpty(paramMap) && searchCommonHelper.hasUid(paramMap)) {
|
93
|
+ if (goToRecall(paramMap)) {
|
94
|
productListFuture = CompletableFuture.supplyAsync(() -> sortRecallSceneService.productList(this.newParamMap(paramMap)), executorService);
|
94
|
productListFuture = CompletableFuture.supplyAsync(() -> sortRecallSceneService.productList(this.newParamMap(paramMap)), executorService);
|
95
|
} else {
|
95
|
} else {
|
96
|
productListFuture = CompletableFuture.supplyAsync(() -> sceneProductListService.productList(this.newParamMap(paramMap)), executorService);
|
96
|
productListFuture = CompletableFuture.supplyAsync(() -> sceneProductListService.productList(this.newParamMap(paramMap)), executorService);
|
|
@@ -117,6 +117,23 @@ public class SortSceneService extends AbstractSceneService { |
|
@@ -117,6 +117,23 @@ public class SortSceneService extends AbstractSceneService { |
117
|
}
|
117
|
}
|
118
|
}
|
118
|
}
|
119
|
|
119
|
|
|
|
120
|
+ private boolean goToRecall(Map<String, String> paramMap) {
|
|
|
121
|
+ if (!searchDynamicConfigService.isSortPageRecallOpen()) {
|
|
|
122
|
+ return false;
|
|
|
123
|
+ }
|
|
|
124
|
+ if (!searchCommonHelper.isOrderEmpty(paramMap) && searchCommonHelper.hasUid(paramMap)) {
|
|
|
125
|
+ return false;
|
|
|
126
|
+ }
|
|
|
127
|
+ int uid = searchCommonHelper.getUid(paramMap);
|
|
|
128
|
+ if (uid <= 0) {
|
|
|
129
|
+ return false;
|
|
|
130
|
+ }
|
|
|
131
|
+ if (!searchDynamicConfigService.isGoToSortRecallUser(uid)) {
|
|
|
132
|
+ return false;
|
|
|
133
|
+ }
|
|
|
134
|
+ return true;
|
|
|
135
|
+ }
|
|
|
136
|
+
|
120
|
@Override
|
137
|
@Override
|
121
|
public SearchApiResult aggregations(Map<String, String> paramMap) {
|
138
|
public SearchApiResult aggregations(Map<String, String> paramMap) {
|
122
|
try {
|
139
|
try {
|