feat(视图): 行权限

This commit is contained in:
junjie 2021-12-14 11:35:35 +08:00
parent f4d81ef552
commit d11021934b

View File

@ -208,6 +208,13 @@ public class ChartViewService {
}.getType()); }.getType());
List<ChartViewFieldDTO> drill = new Gson().fromJson(view.getDrillFields(), new TypeToken<List<ChartViewFieldDTO>>() { List<ChartViewFieldDTO> drill = new Gson().fromJson(view.getDrillFields(), new TypeToken<List<ChartViewFieldDTO>>() {
}.getType()); }.getType());
// 获取对应数据集行权限
DatasetTableField datasetTableFieldObj = DatasetTableField.builder().tableId(view.getTableId()).checked(Boolean.TRUE).build();
List<DatasetTableField> fields = dataSetTableFieldsService.list(datasetTableFieldObj);
DatasetTable datasetTable = dataSetTableService.get(view.getTableId());
List<ChartFieldCustomFilterDTO> permissionFields = dataSetTableService.getCustomFilters(fields, datasetTable);
fieldCustomFilter.addAll(permissionFields);
for (ChartFieldCustomFilterDTO ele : fieldCustomFilter) { for (ChartFieldCustomFilterDTO ele : fieldCustomFilter) {
ele.setField(dataSetTableFieldsService.get(ele.getId())); ele.setField(dataSetTableFieldsService.get(ele.getId()));
} }