...
|
...
|
@@ -17,28 +17,33 @@ public class SortBrandRecallRequestBuilder { |
|
|
|
|
|
/**
|
|
|
* 构造品牌+品类的召回请求
|
|
|
*
|
|
|
* @param paramQueryFilter
|
|
|
* @param sortBrands
|
|
|
* @return
|
|
|
*/
|
|
|
public List<RecallRequest> buildSortBrandRecallRequests(ParamQueryFilter paramQueryFilter, List<SortBrand> sortBrands,SortBrandType sortBrandType){
|
|
|
public List<RecallRequest> buildSortBrandRecallRequests(ParamQueryFilter paramQueryFilter, List<SortBrand> sortBrands, SortBrandType sortBrandType) {
|
|
|
//1、构造召回请求
|
|
|
List<RecallRequest> requests = new ArrayList<>();
|
|
|
// 1) 人气
|
|
|
for (SortBrand sortBrand : sortBrands) {
|
|
|
requests.add(this.buildSortBrandHeatValueRequest(paramQueryFilter, sortBrand, SknCountConstants.SORT_BRAND_RECALL_STRATEGY_SKN_COUNT,sortBrandType));
|
|
|
requests.add(this.buildSortBrandHeatValueRequest(paramQueryFilter, sortBrand, SknCountConstants.SORT_BRAND_RECALL_STRATEGY_SKN_COUNT, sortBrandType));
|
|
|
}
|
|
|
// 2) 转化率
|
|
|
for (SortBrand sortBrand : sortBrands) {
|
|
|
requests.add(this.buildSortBrandCtrValueRequest(paramQueryFilter, sortBrand, SknCountConstants.SORT_BRAND_RECALL_STRATEGY_SKN_COUNT, sortBrandType));
|
|
|
}
|
|
|
// 2) 新品
|
|
|
// 3) 新品
|
|
|
for (SortBrand sortBrand : sortBrands) {
|
|
|
requests.add(this.buildSortBrandNewShelveRequest(paramQueryFilter, sortBrand, SknCountConstants.SORT_BRAND_RECALL_STRATEGY_SKN_COUNT,sortBrandType));
|
|
|
requests.add(this.buildSortBrandNewShelveRequest(paramQueryFilter, sortBrand, SknCountConstants.SORT_BRAND_RECALL_STRATEGY_SKN_COUNT, sortBrandType));
|
|
|
}
|
|
|
// 3) 新降价
|
|
|
// 4) 新降价
|
|
|
for (SortBrand sortBrand : sortBrands) {
|
|
|
requests.add(this.buildSortBrandReducePriceRequest(paramQueryFilter, sortBrand,SknCountConstants.SORT_BRAND_RECALL_STRATEGY_SKN_COUNT,sortBrandType));
|
|
|
requests.add(this.buildSortBrandReducePriceRequest(paramQueryFilter, sortBrand, SknCountConstants.SORT_BRAND_RECALL_STRATEGY_SKN_COUNT, sortBrandType));
|
|
|
}
|
|
|
// 4) 新开促销
|
|
|
// 5) 新开促销
|
|
|
for (SortBrand sortBrand : sortBrands) {
|
|
|
requests.add(this.buildSortBrandPromotionRequest(paramQueryFilter, sortBrand, SknCountConstants.SORT_BRAND_RECALL_STRATEGY_SKN_COUNT,sortBrandType));
|
|
|
requests.add(this.buildSortBrandPromotionRequest(paramQueryFilter, sortBrand, SknCountConstants.SORT_BRAND_RECALL_STRATEGY_SKN_COUNT, sortBrandType));
|
|
|
}
|
|
|
return requests;
|
|
|
}
|
...
|
...
|
@@ -51,8 +56,21 @@ public class SortBrandRecallRequestBuilder { |
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandHeatValueRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size,SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandHeatValueStrategy(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 buildSortBrandCtrValueRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandCtrValueStrategy(sortBrand, size, sortBrandType);
|
|
|
return new RecallRequest(paramQueryFilter, strategy);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -64,7 +82,7 @@ public class SortBrandRecallRequestBuilder { |
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandNewShelveRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size,SortBrandType sortBrandType) {
|
|
|
private RecallRequest buildSortBrandNewShelveRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size, SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandNewShelveStrategy(sortBrand, size, sortBrandType);
|
|
|
return new RecallRequest(paramQueryFilter, strategy);
|
|
|
}
|
...
|
...
|
@@ -77,8 +95,8 @@ public class SortBrandRecallRequestBuilder { |
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandReducePriceRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size,SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandReducePriceStrategy(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);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -90,8 +108,8 @@ public class SortBrandRecallRequestBuilder { |
|
|
* @param size
|
|
|
* @return
|
|
|
*/
|
|
|
private RecallRequest buildSortBrandPromotionRequest(ParamQueryFilter paramQueryFilter, SortBrand sortBrand, int size,SortBrandType sortBrandType) {
|
|
|
IStrategy strategy = new SortBrandPromotionStrategy(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);
|
|
|
}
|
|
|
|
...
|
...
|
|