...
|
...
|
@@ -57,6 +57,7 @@ import com.yoho.search.service.scene.recall.strategy.IRecallStrategy; |
|
|
import com.yoho.search.service.scene.recall.strategy.NewPromotionStrategy;
|
|
|
import com.yoho.search.service.scene.recall.strategy.NewReducePriceStrategy;
|
|
|
import com.yoho.search.service.scene.recall.strategy.NewShelveStrategy;
|
|
|
import com.yoho.search.service.scene.recall.strategy.NewShopStrategy;
|
|
|
import com.yoho.search.service.scene.recall.type.RecallType;
|
|
|
import com.yoho.search.service.service.IProductIndexService;
|
|
|
|
...
|
...
|
@@ -130,7 +131,8 @@ public class SortRecallSceneService extends AbstractRecallService { |
|
|
// 3)填充变价计划,并做品牌打散
|
|
|
begin = System.currentTimeMillis();
|
|
|
List<Map<String, Object>> product_list = productIndexBaseService.getProductListWithPricePlan(recallProductInfoList.getProductInfoList());
|
|
|
//product_list = productListSortService.sortProductList(product_list, paramMap);
|
|
|
// product_list =
|
|
|
// productListSortService.sortProductList(product_list, paramMap);
|
|
|
logger.warn("[func2=getProductListWithPricePlan][cost={}]", System.currentTimeMillis() - begin);
|
|
|
|
|
|
// 4)构造返回结果
|
...
|
...
|
@@ -256,7 +258,7 @@ public class SortRecallSceneService extends AbstractRecallService { |
|
|
String uid = MapUtils.getString(paramMap, "uid", "0");
|
|
|
String vectorFeatureVersion = searchDynamicConfigService.personalizedSearchVersion();
|
|
|
String userGlobalBrandIds = bigDataRedisService.getUserGlobalFaveriteBrand(uid, vectorFeatureVersion);
|
|
|
logger.warn("uid is [{}],vectorFeatureVersion is [{}], userGlobalBrandIds is [{}]",uid,vectorFeatureVersion,userGlobalBrandIds);
|
|
|
logger.warn("uid is [{}],vectorFeatureVersion is [{}], userGlobalBrandIds is [{}]", uid, vectorFeatureVersion, userGlobalBrandIds);
|
|
|
JSONArray brandJsonArray = JSON.parseArray(userGlobalBrandIds);
|
|
|
List<Integer> results = new ArrayList<Integer>();
|
|
|
for (int i = 0; i < brandJsonArray.size(); i++) {
|
...
|
...
|
@@ -347,19 +349,21 @@ public class SortRecallSceneService extends AbstractRecallService { |
|
|
List<IRecallStrategy> recallStrategy = new ArrayList<IRecallStrategy>();
|
|
|
int pageSize = this.getPageSize(paramMap);
|
|
|
// 0、获取用户偏好品牌
|
|
|
//List<Integer> brandIds = this.getUserGlobalBrandIds(paramMap);
|
|
|
// List<Integer> brandIds = this.getUserGlobalBrandIds(paramMap);
|
|
|
List<Integer> brandIds = this.getUserLikeBrandIds(paramMap);
|
|
|
// 1、支持firstProductSkn的召回
|
|
|
recallStrategy.add(new FirstProductSknStrategy(1, this.getFirstProductSkns(paramMap)));
|
|
|
// 2、支持直通车的召回
|
|
|
// 2、支持直通车的召回-随机召回
|
|
|
recallStrategy.add(new DirectTrainStrategy(2));
|
|
|
// 3、支持曝光补偿的召回
|
|
|
// 3、支持曝光补偿的召回-大数据给的,随机召回
|
|
|
recallStrategy.add(new AddFlowStrategy(2));
|
|
|
// 4、支持新上架的召回
|
|
|
// 4、新开店铺商品召回-随机召回
|
|
|
recallStrategy.add(new NewShopStrategy(2));
|
|
|
// 5、支持新上架的召回-有new标签的
|
|
|
recallStrategy.add(new NewShelveStrategy(brandIds, 10));
|
|
|
// 5、支持新降价的召回
|
|
|
// 6、支持新降价的召回-两天内实际降过价的
|
|
|
recallStrategy.add(new NewReducePriceStrategy(brandIds, 10));
|
|
|
// 6、支持新开促销的召回
|
|
|
// 7、支持新开促销的召回-5种促销类型
|
|
|
recallStrategy.add(new NewPromotionStrategy(brandIds, 10));
|
|
|
// 8、支持兜底的召回-人气排序
|
|
|
recallStrategy.add(new CommonStrategy(pageSize));
|
...
|
...
|
|