...
|
...
|
@@ -32,11 +32,13 @@ public class CommonRecallRequestBuilder { |
|
|
requests.add(this.buildFirstSknRequest(userRecallRequest, firstProductSkns));
|
|
|
//1.2) 直通车召回
|
|
|
requests.add(this.buildDirectTrainRequest(userRecallRequest));
|
|
|
//1.3) 新开店铺的召回
|
|
|
//1.3) 直通车-ufo召回
|
|
|
requests.add(this.buildUfoDirectTrainRequest(userRecallRequest));
|
|
|
//1.4) 新开店铺的召回
|
|
|
requests.add(this.buildNewShopRequest(userRecallRequest));
|
|
|
//1.4) 流量补偿的召回
|
|
|
//1.5) 流量补偿的召回
|
|
|
requests.add(this.buildAddFlowRequest(userRecallRequest));
|
|
|
//1.5) 页面的兜底召回
|
|
|
//1.6) 页面的兜底召回
|
|
|
requests.add(this.buildCommonHeatValueStrategy(userRecallRequest, pageSize));
|
|
|
return requests;
|
|
|
}
|
...
|
...
|
@@ -60,19 +62,31 @@ public class CommonRecallRequestBuilder { |
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildDirectTrainRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.DIRECT_TRAIN);
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.DIRECT_TRAIN,60);
|
|
|
CommonDirectTrainStrategy strategy = new CommonDirectTrainStrategy(size);
|
|
|
return new RecallRequest(userRecallRequest.getParamQueryFilter(), strategy);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 构建【按UFO直通车召回】的请求参数
|
|
|
*
|
|
|
* @param userRecallRequest
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildUfoDirectTrainRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.DIRECT_TRAIN_UFO,40);
|
|
|
CommonDirectTrainUfoStrategy strategy = new CommonDirectTrainUfoStrategy(size);
|
|
|
return new RecallRequest(userRecallRequest.getParamQueryFilter(), strategy);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 构建【按新开店铺召回】的请求参数
|
|
|
*
|
|
|
* @param userRecallRequest
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildNewShopRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.NEW_SHOP);
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.NEW_SHOP,10);
|
|
|
CommonNewShopStrategy strategy = new CommonNewShopStrategy(size);
|
|
|
return new RecallRequest(userRecallRequest.getParamQueryFilter(), strategy);
|
|
|
}
|
...
|
...
|
@@ -84,7 +98,7 @@ public class CommonRecallRequestBuilder { |
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildAddFlowRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.ADD_FLOW);
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.ADD_FLOW,10);
|
|
|
CommonAddFlowStrategy strategy = new CommonAddFlowStrategy(size);
|
|
|
return new RecallRequest(userRecallRequest.getParamQueryFilter(), strategy);
|
|
|
}
|
...
|
...
|
|