...
|
...
|
@@ -48,22 +48,26 @@ public class SortBrandRecallRequestBuilder { |
|
|
if (productCountConfig.getNewShelve() > 0) {
|
|
|
requests.add(this.buildSortBrandNewShelveRequest(paramQueryFilter, sortBrand, productCountConfig.getNewShelve(), sortBrandType));
|
|
|
}
|
|
|
// 2) 人气
|
|
|
if (productCountConfig.getHeatValue() > 0) {
|
|
|
requests.add(this.buildSortBrandHeatValueRequest(paramQueryFilter, sortBrand, productCountConfig.getHeatValue(), sortBrandType));
|
|
|
// 2) 新开促销
|
|
|
if (productCountConfig.getPromotion() > 0) {
|
|
|
requests.add(this.buildSortBrandPromotionRequest(paramQueryFilter, sortBrand, productCountConfig.getPromotion(), sortBrandType));
|
|
|
}
|
|
|
// 3) 新降价
|
|
|
if (productCountConfig.getReducePrice() > 0) {
|
|
|
requests.add(this.buildSortBrandReducePriceRequest(paramQueryFilter, sortBrand, productCountConfig.getReducePrice(), sortBrandType));
|
|
|
}
|
|
|
// 4) 新开促销
|
|
|
if (productCountConfig.getPromotion() > 0) {
|
|
|
requests.add(this.buildSortBrandPromotionRequest(paramQueryFilter, sortBrand, productCountConfig.getPromotion(), sortBrandType));
|
|
|
}
|
|
|
// 5) 转化率
|
|
|
// 4) 转化率
|
|
|
if (productCountConfig.getCtrValue() > 0) {
|
|
|
requests.add(this.buildSortBrandCtrValueRequest(paramQueryFilter, sortBrand, productCountConfig.getCtrValue(), sortBrandType));
|
|
|
}
|
|
|
// 5) 人气
|
|
|
if (productCountConfig.getHeatValue() > 0) {
|
|
|
requests.add(this.buildSortBrandHeatValueRequest(paramQueryFilter, sortBrand, productCountConfig.getHeatValue(), sortBrandType));
|
|
|
}
|
|
|
// 6) 随机
|
|
|
if (productCountConfig.getRandom() > 0) {
|
|
|
requests.add(this.buildSortBrandRandomRequest(paramQueryFilter, sortBrand, productCountConfig.getRandom(), sortBrandType));
|
|
|
}
|
|
|
}
|
|
|
return requests;
|
|
|
}
|
...
|
...
|
@@ -80,67 +84,80 @@ public class SortBrandRecallRequestBuilder { |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 【按品类+品牌召回人气商品】
|
|
|
* 【按品类+品牌召回新品】
|
|
|
*
|
|
|
* @param paramQueryFilter
|
|
|
* @param sortBrand
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandHeatValueRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandHeatValueStrategy(sortBrand, size, sortBrandType);
|
|
|
private RecallRequest buildSortBrandNewShelveRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandNewShelveStrategy(sortBrand, size, sortBrandType);
|
|
|
return new RecallRequest(paramQueryFilter, strategy);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 【按品类+品牌召回转化率高的商品】
|
|
|
* 【按品类+品牌召回新开促销】
|
|
|
*
|
|
|
* @param paramQueryFilter
|
|
|
* @param sortBrand
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandCtrValueRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandCtrValueStrategy(sortBrand, size, sortBrandType);
|
|
|
private RecallRequest buildSortBrandPromotionRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandPromotionStrategy(sortBrand, size, sortBrandType);
|
|
|
return new RecallRequest(paramQueryFilter, strategy);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 【按品类+品牌召回新品】
|
|
|
* 【按品类+品牌召回新降价】
|
|
|
*
|
|
|
* @param paramQueryFilter
|
|
|
* @param sortBrand
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandNewShelveRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandNewShelveStrategy(sortBrand, size, sortBrandType);
|
|
|
private RecallRequest buildSortBrandReducePriceRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandReducePriceStrategy(sortBrand, size, sortBrandType);
|
|
|
return new RecallRequest(paramQueryFilter, strategy);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 【按品类+品牌召回新降价】
|
|
|
* 【按品类+品牌召回转化率高的商品】
|
|
|
*
|
|
|
* @param paramQueryFilter
|
|
|
* @param sortBrand
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandReducePriceRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandReducePriceStrategy(sortBrand, size, sortBrandType);
|
|
|
private RecallRequest buildSortBrandCtrValueRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandCtrValueStrategy(sortBrand, size, sortBrandType);
|
|
|
return new RecallRequest(paramQueryFilter, strategy);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 【按品类+品牌召回新开促销】
|
|
|
* 【按品类+品牌召回人气商品】
|
|
|
*
|
|
|
* @param paramQueryFilter
|
|
|
* @param sortBrand
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandPromotionRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandPromotionStrategy(sortBrand, size, sortBrandType);
|
|
|
private RecallRequest buildSortBrandHeatValueRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandHeatValueStrategy(sortBrand, size, sortBrandType);
|
|
|
return new RecallRequest(paramQueryFilter, strategy);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 【按品类+品牌随机召回】
|
|
|
*
|
|
|
* @param paramQueryFilter
|
|
|
* @param sortBrand
|
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandRandomRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandRandomStrategy(sortBrand, size, sortBrandType);
|
|
|
return new RecallRequest(paramQueryFilter, strategy);
|
|
|
}
|
|
|
|
...
|
...
|
|