浏览代码

完善视图聚合。

zhangjinjun 6 年之前
父节点
当前提交
0a68dc3514
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      src/main/java/com/yihu/quota/service/view/ViewService.java

+ 1 - 3
src/main/java/com/yihu/quota/service/view/ViewService.java

@ -428,8 +428,6 @@ public class ViewService extends BaseJpaService<View, ViewDao> {
                    aggNamePre = ViewConstant.TOTAL_DIMENSION_CODE + "-";
                }
                // TODO 数值类型场合,又是多维度数据集时,需要指定数据集
                if ("sum".equals(quota.getBasicFormulaType())) {
                    // 求和
                    String aggName = aggNamePre + "sum-result";
@ -483,7 +481,7 @@ public class ViewService extends BaseJpaService<View, ViewDao> {
            BoolQueryBuilder quotaBoolQueryBuilder = QueryBuilders.boolQuery();
            this.joinFilters(quotaBoolQueryBuilder, quotaFilterModelList);
            String aggName = quota.getDimensionCode() + "-filter";
            String aggName = quota.getCode() + "-filter";
            filterAgg = AggregationBuilders.filter(aggName).filter(quotaBoolQueryBuilder);
            filterAgg.subAggregation(metricAgg);
        }