...
|
...
|
@@ -8,7 +8,6 @@ import java.util.List; |
|
|
import java.util.Map;
|
|
|
import java.util.Map.Entry;
|
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
|
|
|
import org.elasticsearch.search.aggregations.Aggregation;
|
|
|
import org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation;
|
...
|
...
|
@@ -131,25 +130,19 @@ public class SelectionWithOutAdvanceImpl implements ISelectionsWithOutAdvanceSer |
|
|
list.add(aggregationFactoryService.getStandardAggregation(paramMap).getBuilder());
|
|
|
|
|
|
// 8)尺码
|
|
|
if (!paramMap.containsKey("size") || StringUtils.isBlank(paramMap.get("size"))) {
|
|
|
list.add(aggregationFactoryService.getSizeAggregation().getBuilder());
|
|
|
}
|
|
|
list.add(aggregationFactoryService.getSizeAggregation().getBuilder());
|
|
|
|
|
|
// 9)新品
|
|
|
if (!paramMap.containsKey("new") || StringUtils.isBlank(paramMap.get("new"))) {
|
|
|
list.add(aggregationFactoryService.getIsNewAggregation().getBuilder());
|
|
|
}
|
|
|
list.add(aggregationFactoryService.getIsNewAggregation().getBuilder());
|
|
|
|
|
|
// 10)限量
|
|
|
if (!paramMap.containsKey("limited") || StringUtils.isBlank(paramMap.get("limited"))) {
|
|
|
list.add(aggregationFactoryService.getIsLimitedAggregation().getBuilder());
|
|
|
}
|
|
|
list.add(aggregationFactoryService.getIsLimitedAggregation().getBuilder());
|
|
|
|
|
|
// 11)折扣
|
|
|
if (!paramMap.containsKey("specialoffer") || StringUtils.isBlank(paramMap.get("specialoffer"))) {
|
|
|
list.add(aggregationFactoryService.getIsSecialofferAggregation().getBuilder());
|
|
|
}
|
|
|
list.add(aggregationFactoryService.getIsSecialofferAggregation().getBuilder());
|
|
|
|
|
|
// 12)全球购
|
|
|
if (!paramMap.containsKey("is_global") || StringUtils.isBlank(paramMap.get("is_global"))) {
|
|
|
list.add(aggregationFactoryService.getIsGlobalAggregation().getBuilder());
|
|
|
}
|
|
|
list.add(aggregationFactoryService.getIsGlobalAggregation().getBuilder());
|
|
|
return list;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -187,7 +180,7 @@ public class SelectionWithOutAdvanceImpl implements ISelectionsWithOutAdvanceSer |
|
|
} else {
|
|
|
filter.put("color", colorIndexBaseService.getColorListByIdStr(paramMap.get("color")));
|
|
|
}
|
|
|
|
|
|
|
|
|
// 5)获取风格层面的聚合结果
|
|
|
IAggregation styleAggregation = aggregationFactoryService.getStyleAggregation(paramMap);
|
|
|
Object styleResponse = styleAggregation.getAggregationResponseMap(aggMaps);
|
...
|
...
|
|