...
|
...
|
@@ -8,15 +8,14 @@ import com.yoho.search.base.utils.Transfer; |
|
|
import com.yoho.search.core.es.model.SearchParam;
|
|
|
import com.yoho.search.core.es.model.SearchResult;
|
|
|
import com.yoho.search.models.SearchApiResult;
|
|
|
import com.yoho.search.recall.common.ABUserPartitionUtils;
|
|
|
import com.yoho.search.recall.scene.beans.builder.UserRecallRequestBuilder;
|
|
|
import com.yoho.search.recall.scene.beans.cache.SknReturnInfoCacheBean;
|
|
|
import com.yoho.search.recall.scene.beans.cache.UserRecallCacheBean;
|
|
|
import com.yoho.search.recall.scene.beans.helper.SortBuilderHelper;
|
|
|
import com.yoho.search.recall.scene.beans.strategy.StrategyEnum;
|
|
|
import com.yoho.search.recall.scene.models.common.RecallSknInfo;
|
|
|
import com.yoho.search.recall.scene.models.req.UserRecallRequest;
|
|
|
import com.yoho.search.recall.scene.models.req.UserRecallResponse;
|
|
|
import com.yoho.search.recall.scene.models.common.RecallSknInfo;
|
|
|
import com.yoho.search.service.base.SearchCommonService;
|
|
|
import com.yoho.search.service.base.SearchDynamicConfigService;
|
|
|
import com.yoho.search.service.helper.SearchCommonHelper;
|
...
|
...
|
@@ -165,7 +164,7 @@ public class SceneRecallProductListService { |
|
|
private List<RecallSknInfo> queryProductSknByFilterSkn(UserRecallRequest userRecallRequest, List<RecallSknInfo> recallSknInfos, int realPage, int pageSize) {
|
|
|
long begin = System.currentTimeMillis();
|
|
|
//0、策略区分
|
|
|
StrategyEnum strategyEnum = ABUserPartitionUtils.isAUserComplete(userRecallRequest.getUid(), userRecallRequest.getUdid()) ? StrategyEnum.DEFAULT_HEAT_VALUE : StrategyEnum.DEFAULT_CTR_VALUE;
|
|
|
StrategyEnum strategyEnum = StrategyEnum.DEFAULT_HEAT_VALUE;
|
|
|
|
|
|
//1、设置query
|
|
|
SearchParam searchParam = new SearchParam();
|
...
|
...
|
@@ -186,11 +185,7 @@ public class SceneRecallProductListService { |
|
|
searchParam.setIncludeFields(Arrays.asList(ProductIndexEsField.productSkn));
|
|
|
//5、设置排序
|
|
|
List<SortBuilder<?>> sortBuilders = new ArrayList<>();
|
|
|
if (strategyEnum.equals(StrategyEnum.DEFAULT_HEAT_VALUE)) {
|
|
|
sortBuilders.add(SortBuilderHelper.getHeatValueDescSort());
|
|
|
} else {
|
|
|
sortBuilders.add(SortBuilderHelper.getCtrValueDescSort());
|
|
|
}
|
|
|
sortBuilders.add(SortBuilderHelper.getHeatValueDescSort());
|
|
|
sortBuilders.add(SortBuilderHelper.getSevendayMoneyDescSort());
|
|
|
sortBuilders.add(SortBuilderHelper.getIdDescSort());
|
|
|
searchParam.setSortBuilders(sortBuilders);
|
...
|
...
|
|