Authored by hugufei

召回时添加价格带的召回

... ... @@ -77,8 +77,9 @@ public class BatchRecallCacheBean extends AbstractCacheBean<RecallRequest,Recall
Integer productSkn = MapUtils.getInteger(result, ProductIndexEsField.productSkn, 0);
Integer brandId = MapUtils.getInteger(result, ProductIndexEsField.brandId, 0);
Integer middleSortId = MapUtils.getInteger(result, ProductIndexEsField.middleSortId, 0);
Integer priceArea = MapUtils.getInteger(result, ProductIndexEsField.priceArea, 0);
String factor = MapUtils.getString(result, ProductIndexEsField.productFeatureFactor, "");
recallSkns.add(new RecallResponse.RecallSkn(productSkn, brandId, middleSortId));
recallSkns.add(new RecallResponse.RecallSkn(productSkn, brandId, middleSortId,priceArea));
productFactorMap.put(productSkn,factor);
}
//2、将skn向量加入缓存-可节省一次ES查询
... ...
... ... @@ -26,7 +26,7 @@ public interface IRecallRequest {
* @return
*/
default List<String> includeFields(){
return Arrays.asList(ProductIndexEsField.productSkn,ProductIndexEsField.brandId,ProductIndexEsField.middleSortId,ProductIndexEsField.productFeatureFactor);
return Arrays.asList(ProductIndexEsField.productSkn,ProductIndexEsField.brandId,ProductIndexEsField.middleSortId,ProductIndexEsField.productFeatureFactor,ProductIndexEsField.priceArea);
}
}
... ...
... ... @@ -51,11 +51,11 @@ public class RecallResponse implements Serializable {
public RecallSkn() {
}
public RecallSkn(Integer productSkn, Integer brandId, Integer middleSortId,Integer pa) {
public RecallSkn(Integer productSkn, Integer brandId, Integer middleSortId,Integer priceArea) {
this.skn = productSkn;
this.bdId = brandId;
this.misId = middleSortId;
this.pa = pa;
this.pa = priceArea;
}
public Integer getSkn() {
... ...