diff --git a/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java b/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java index d07d5ad07e..ad15ab3251 100644 --- a/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java @@ -154,8 +154,11 @@ public class DorisQueryProvider extends QueryProvider { if (CollectionUtils.isNotEmpty(xFields)) st_sql.add("groups", xFields); if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj); String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); + if (whereTrees != null) wheres.add(whereTrees); if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres); if (CollectionUtils.isNotEmpty(sortFields)) { @@ -316,6 +319,8 @@ public class DorisQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(xFields); @@ -323,6 +328,7 @@ public class DorisQueryProvider extends QueryProvider { List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); groups.addAll(xFields); // 外层再次套sql @@ -393,12 +399,15 @@ public class DorisQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(xFields); List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); groups.addAll(xFields); // 外层再次套sql @@ -505,6 +514,8 @@ public class DorisQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(xFields); @@ -512,6 +523,7 @@ public class DorisQueryProvider extends QueryProvider { List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); groups.addAll(xFields); // 外层再次套sql @@ -616,6 +628,8 @@ public class DorisQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(xFields); @@ -623,6 +637,7 @@ public class DorisQueryProvider extends QueryProvider { List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); groups.addAll(xFields); // 外层再次套sql @@ -702,12 +717,15 @@ public class DorisQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(yFields); List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); // 外层再次套sql List orders = new ArrayList<>(); diff --git a/backend/src/main/java/io/dataease/provider/engine/mysql/MysqlQueryProvider.java b/backend/src/main/java/io/dataease/provider/engine/mysql/MysqlQueryProvider.java index 137b5c429c..4c85369efc 100644 --- a/backend/src/main/java/io/dataease/provider/engine/mysql/MysqlQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/engine/mysql/MysqlQueryProvider.java @@ -155,8 +155,10 @@ public class MysqlQueryProvider extends QueryProvider { if (CollectionUtils.isNotEmpty(xFields)) st_sql.add("groups", xFields); if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj); String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); + if (whereTrees != null) wheres.add(whereTrees); if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres); if (CollectionUtils.isNotEmpty(sortFields)) { @@ -317,6 +319,8 @@ public class MysqlQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(xFields); @@ -324,6 +328,7 @@ public class MysqlQueryProvider extends QueryProvider { List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); groups.addAll(xFields); // 外层再次套sql @@ -394,12 +399,15 @@ public class MysqlQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(xFields); List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); groups.addAll(xFields); // 外层再次套sql @@ -506,6 +514,8 @@ public class MysqlQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(xFields); @@ -513,6 +523,7 @@ public class MysqlQueryProvider extends QueryProvider { List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); groups.addAll(xFields); // 外层再次套sql @@ -617,6 +628,8 @@ public class MysqlQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(xFields); @@ -624,6 +637,7 @@ public class MysqlQueryProvider extends QueryProvider { List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); groups.addAll(xFields); // 外层再次套sql @@ -703,12 +717,15 @@ public class MysqlQueryProvider extends QueryProvider { String customWheres = transCustomFilterList(tableObj, fieldCustomFilter); // 处理仪表板字段过滤 String extWheres = transExtFilterList(tableObj, extFilterRequestList); + // row permissions tree + String whereTrees = transFilterTrees(tableObj, rowPermissionsTree); // 构建sql所有参数 List fields = new ArrayList<>(); fields.addAll(yFields); List wheres = new ArrayList<>(); if (customWheres != null) wheres.add(customWheres); if (extWheres != null) wheres.add(extWheres); + if (whereTrees != null) wheres.add(whereTrees); List groups = new ArrayList<>(); // 外层再次套sql List orders = new ArrayList<>();