Explorar o código

完善视图规则聚合。

zhangjinjun %!s(int64=6) %!d(string=hai) anos
pai
achega
efe6739426
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      src/main/java/com/yihu/quota/service/view/ViewService.java

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

@ -241,7 +241,7 @@ public class ViewService extends BaseJpaService<View, ViewDao> {
     * @param filterModelList  视图/指标的过滤条件模型集合
     */
    private void joinFilters(BoolQueryBuilder boolQueryBuilder, List<ViewQuotaFilterModel> filterModelList) {
        if (filterModelList.size() != 0) {
        if (filterModelList != null && filterModelList.size() != 0) {
            for (ViewQuotaFilterModel filterModel : filterModelList) {
                String field = filterModel.getDimensionCode();
                Object value = filterModel.getFilterValue();
@ -315,7 +315,8 @@ public class ViewService extends BaseJpaService<View, ViewDao> {
        AggregationBuilder dimensionAgg = null;
        String dimensionCode = viewDimension.getDimensionCode();
        String orderType = viewDimension.getMemberOrderType();
        boolean isTopAsc = "asc".equals(viewDimension.getMemberOrderStrategy()) ? true : false;
        String orderStrategy = viewDimension.getMemberOrderStrategy();
        boolean isTopAsc = StringUtils.isEmpty(orderStrategy) || "asc".equals(orderStrategy) ? true : false;
        String fieldType = cubeService.findDimensionDataType(viewDimension.getCubeCode(), viewDimension.getDimensionCode());
        if (!"date".equals(fieldType)) {