...
|
...
|
@@ -34,7 +34,7 @@ public class CommonRecallRequestBuilder { |
|
|
* @param userRecallRequest
|
|
|
* @return
|
|
|
*/
|
|
|
public List<RecallRequest> buildCommonRecallRequests(UserRecallRequest userRecallRequest, PagePersonalFactor pagePersonalFactor) {
|
|
|
public List<RecallRequest> buildRecallRequestsForCommon(UserRecallRequest userRecallRequest, PagePersonalFactor pagePersonalFactor) {
|
|
|
//1、构造召回请求
|
|
|
List<RecallRequest> requests = new ArrayList<>();
|
|
|
//2、firstSkn的召回
|
...
|
...
|
@@ -70,7 +70,7 @@ public class CommonRecallRequestBuilder { |
|
|
*/
|
|
|
private List<RecallRequest> buildFirstSknRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.FIRST_SKN, 0);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildCommonRequest, FIRST_SKN size is [{}]",size);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildRecallRequestsForCommon, FIRST_SKN size is [{}]",size);
|
|
|
if (size == 0) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
...
|
...
|
@@ -87,7 +87,7 @@ public class CommonRecallRequestBuilder { |
|
|
*/
|
|
|
private List<RecallRequest> buildDirectTrainRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.DIRECT_TRAIN, 0);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildCommonRequest, DIRECT_TRAIN size is [{}]",size);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildRecallRequestsForCommon, DIRECT_TRAIN size is [{}]",size);
|
|
|
if (size == 0) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
...
|
...
|
@@ -103,7 +103,7 @@ public class CommonRecallRequestBuilder { |
|
|
*/
|
|
|
private List<RecallRequest> buildUfoDirectTrainRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.DIRECT_TRAIN_UFO, 0);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildCommonRequest, DIRECT_TRAIN_UFO size is [{}]",size);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildRecallRequestsForCommon, DIRECT_TRAIN_UFO size is [{}]",size);
|
|
|
if (size == 0) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
...
|
...
|
@@ -119,7 +119,7 @@ public class CommonRecallRequestBuilder { |
|
|
*/
|
|
|
private List<RecallRequest> buildNewShopRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.NEW_SHOP, 0);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildCommonRequest, NEW_SHOP size is [{}]",size);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildRecallRequestsForCommon, NEW_SHOP size is [{}]",size);
|
|
|
if (size == 0) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
...
|
...
|
@@ -135,7 +135,7 @@ public class CommonRecallRequestBuilder { |
|
|
*/
|
|
|
private List<RecallRequest> buildAddFlowRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.ADD_FLOW, 0);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildCommonRequest, ADD_FLOW size is [{}]",size);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildRecallRequestsForCommon, ADD_FLOW size is [{}]",size);
|
|
|
if (size == 0) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
...
|
...
|
@@ -151,7 +151,7 @@ public class CommonRecallRequestBuilder { |
|
|
*/
|
|
|
private List<RecallRequest> buildNewProductRequest(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.NEW_PRODUCT, 0);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildCommonRequest, NEW_PRODUCT size is [{}]",size);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildRecallRequestsForCommon, NEW_PRODUCT size is [{}]",size);
|
|
|
if (size == 0) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
...
|
...
|
@@ -167,7 +167,7 @@ public class CommonRecallRequestBuilder { |
|
|
*/
|
|
|
private List<RecallRequest> buildCommonRandomStrategy(UserRecallRequest userRecallRequest) {
|
|
|
int size = recallConfigService.queryStrategyConfigSize(userRecallRequest, StrategyEnum.COMMON_RANDOM, 0);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildCommonRequest, COMMON_RANDOM size is [{}]",size);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildRecallRequestsForCommon, COMMON_RANDOM size is [{}]",size);
|
|
|
if (size == 0) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
...
|
...
|
@@ -187,7 +187,7 @@ public class CommonRecallRequestBuilder { |
|
|
if (size == 0 || size < pageSize) {
|
|
|
size = pageSize;
|
|
|
}
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildCommonRequest, COMMON_HEAT_VALUE size is [{}]",size);
|
|
|
RecallLoggerHelper.infoDetail(userRecallRequest,"buildRecallRequestsForCommon, COMMON_HEAT_VALUE size is [{}]",size);
|
|
|
CommonHeatValueStrategy strategy = new CommonHeatValueStrategy(size);
|
|
|
return this.buildRequestList(userRecallRequest, strategy);
|
|
|
}
|
...
|
...
|
|