mirror of
https://github.com/dataease/dataease.git
synced 2026-05-18 01:38:11 +08:00
feat(X-Pack): 行权限
This commit is contained in:
@@ -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<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);
|
||||
|
||||
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<SQLObj> fields = new ArrayList<>();
|
||||
fields.addAll(xFields);
|
||||
@@ -323,6 +328,7 @@ public class DorisQueryProvider 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
|
||||
@@ -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<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
|
||||
@@ -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<SQLObj> fields = new ArrayList<>();
|
||||
fields.addAll(xFields);
|
||||
@@ -512,6 +523,7 @@ public class DorisQueryProvider 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
|
||||
@@ -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<SQLObj> fields = new ArrayList<>();
|
||||
fields.addAll(xFields);
|
||||
@@ -623,6 +637,7 @@ public class DorisQueryProvider 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
|
||||
@@ -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<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<>();
|
||||
|
||||
@@ -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<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);
|
||||
|
||||
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<SQLObj> fields = new ArrayList<>();
|
||||
fields.addAll(xFields);
|
||||
@@ -324,6 +328,7 @@ public class MysqlQueryProvider 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
|
||||
@@ -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<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
|
||||
@@ -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<SQLObj> fields = new ArrayList<>();
|
||||
fields.addAll(xFields);
|
||||
@@ -513,6 +523,7 @@ public class MysqlQueryProvider 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
|
||||
@@ -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<SQLObj> fields = new ArrayList<>();
|
||||
fields.addAll(xFields);
|
||||
@@ -624,6 +637,7 @@ public class MysqlQueryProvider 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
|
||||
@@ -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<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<>();
|
||||
|
||||
Reference in New Issue
Block a user