feat(X-Pack): 行权限

This commit is contained in:
junjun 2022-07-20 15:30:38 +08:00
parent bf8151201c
commit dc0f3b0c3c
10 changed files with 177 additions and 0 deletions

View File

@ -183,8 +183,11 @@ public class CKQueryProvider 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<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
List<SQLObj> xOrders = new ArrayList<>();
@ -348,6 +351,8 @@ public class CKQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -355,6 +360,7 @@ public class CKQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -425,12 +431,15 @@ public class CKQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -538,6 +547,8 @@ public class CKQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -545,6 +556,7 @@ public class CKQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -649,6 +661,8 @@ public class CKQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -656,6 +670,7 @@ public class CKQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -735,12 +750,15 @@ public class CKQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();

View File

@ -158,8 +158,11 @@ public class Db2QueryProvider extends QueryProvider {
if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj);
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
List<SQLObj> xOrders = new ArrayList<>();
@ -328,6 +331,8 @@ public class Db2QueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -335,6 +340,7 @@ public class Db2QueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -407,12 +413,15 @@ public class Db2QueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -521,6 +530,8 @@ public class Db2QueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -528,6 +539,7 @@ public class Db2QueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -633,6 +645,8 @@ public class Db2QueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -640,6 +654,7 @@ public class Db2QueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -720,12 +735,15 @@ public class Db2QueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();

View File

@ -183,8 +183,11 @@ public class EsQueryProvider extends QueryProvider {
if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj);
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
@ -353,6 +356,8 @@ public class EsQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -360,6 +365,7 @@ public class EsQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -435,12 +441,15 @@ public class EsQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -550,6 +559,8 @@ public class EsQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -557,6 +568,7 @@ public class EsQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -669,6 +681,8 @@ public class EsQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -676,6 +690,7 @@ public class EsQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -759,12 +774,15 @@ public class EsQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();

View File

@ -143,8 +143,11 @@ public class HiveQueryProvider 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<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
List<SQLObj> xOrders = new ArrayList<>();
@ -304,6 +307,8 @@ public class HiveQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -311,6 +316,7 @@ public class HiveQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -381,12 +387,15 @@ public class HiveQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -494,6 +503,8 @@ public class HiveQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -501,6 +512,7 @@ public class HiveQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -605,6 +617,8 @@ public class HiveQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -612,6 +626,7 @@ public class HiveQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -691,12 +706,15 @@ public class HiveQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();

View File

@ -140,8 +140,11 @@ public class ImpalaQueryProvider 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<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
List<SQLObj> xOrders = new ArrayList<>();
@ -301,6 +304,8 @@ public class ImpalaQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -308,6 +313,7 @@ public class ImpalaQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -378,12 +384,15 @@ public class ImpalaQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -491,6 +500,8 @@ public class ImpalaQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -498,6 +509,7 @@ public class ImpalaQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -602,6 +614,8 @@ public class ImpalaQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -609,6 +623,7 @@ public class ImpalaQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -688,12 +703,15 @@ public class ImpalaQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();

View File

@ -130,8 +130,11 @@ public class MongoQueryProvider extends QueryProvider {
}
if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj);
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
List<SQLObj> xOrders = new ArrayList<>();
@ -264,6 +267,8 @@ public class MongoQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -271,6 +276,7 @@ public class MongoQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -346,12 +352,15 @@ public class MongoQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -461,6 +470,8 @@ public class MongoQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -468,6 +479,7 @@ public class MongoQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -577,6 +589,8 @@ public class MongoQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -584,6 +598,7 @@ public class MongoQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -669,12 +684,15 @@ public class MongoQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();

View File

@ -117,8 +117,11 @@ public class OracleQueryProvider 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<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
List<SQLObj> xOrders = new ArrayList<>();
@ -360,6 +363,8 @@ public class OracleQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -367,6 +372,7 @@ public class OracleQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -437,12 +443,15 @@ public class OracleQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -549,6 +558,8 @@ public class OracleQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -556,6 +567,7 @@ public class OracleQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -660,6 +672,8 @@ public class OracleQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -667,6 +681,7 @@ public class OracleQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -747,12 +762,15 @@ public class OracleQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();
orders.addAll(yOrders);

View File

@ -171,8 +171,11 @@ public class PgQueryProvider 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<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
List<SQLObj> xOrders = new ArrayList<>();
@ -331,6 +334,8 @@ public class PgQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -338,6 +343,7 @@ public class PgQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -408,12 +414,15 @@ public class PgQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -521,6 +530,8 @@ public class PgQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -528,6 +539,7 @@ public class PgQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -632,6 +644,8 @@ public class PgQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -639,6 +653,7 @@ public class PgQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -719,12 +734,15 @@ public class PgQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();

View File

@ -180,8 +180,11 @@ public class RedshiftQueryProvider 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<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
@ -341,6 +344,8 @@ public class RedshiftQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -348,6 +353,7 @@ public class RedshiftQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -463,6 +469,8 @@ public class RedshiftQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -470,6 +478,7 @@ public class RedshiftQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -574,6 +583,8 @@ public class RedshiftQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -581,6 +592,7 @@ public class RedshiftQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -661,12 +673,15 @@ public class RedshiftQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();

View File

@ -170,8 +170,11 @@ public class SqlserverQueryProvider 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<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (whereTrees != null) wheres.add(whereTrees);
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
List<SQLObj> xOrders = new ArrayList<>();
if (CollectionUtils.isNotEmpty(sortFields)) {
@ -323,6 +326,8 @@ public class SqlserverQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -330,6 +335,7 @@ public class SqlserverQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -404,12 +410,15 @@ public class SqlserverQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -540,6 +549,8 @@ public class SqlserverQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -547,6 +558,7 @@ public class SqlserverQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -655,6 +667,8 @@ public class SqlserverQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(xFields);
@ -662,6 +676,7 @@ public class SqlserverQueryProvider extends QueryProvider {
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
groups.addAll(xFields);
// 外层再次套sql
@ -746,12 +761,15 @@ public class SqlserverQueryProvider extends QueryProvider {
String customWheres = transCustomFilterList(tableObj, fieldCustomFilter);
// 处理仪表板字段过滤
String extWheres = transExtFilterList(tableObj, extFilterRequestList);
// row permissions tree
String whereTrees = transFilterTrees(tableObj, rowPermissionsTree);
// 构建sql所有参数
List<SQLObj> fields = new ArrayList<>();
fields.addAll(yFields);
List<String> wheres = new ArrayList<>();
if (customWheres != null) wheres.add(customWheres);
if (extWheres != null) wheres.add(extWheres);
if (whereTrees != null) wheres.add(whereTrees);
List<SQLObj> groups = new ArrayList<>();
// 外层再次套sql
List<SQLObj> orders = new ArrayList<>();