fix: 除明细表外,对于其他图表类型,脱敏字段不展示

This commit is contained in:
taojinlong 2024-06-20 18:20:14 +08:00
parent fa8abdea07
commit 13bcf02dd5

View File

@ -133,10 +133,7 @@ public class ChartViewManege {
// filter column disable field // filter column disable field
Map<String, ColumnPermissionItem> desensitizationList = new HashMap<>(); Map<String, ColumnPermissionItem> desensitizationList = new HashMap<>();
List<DatasetTableFieldDTO> datasetTableFieldDTOS = permissionManage.filterColumnPermissions(collect, desensitizationList, id, null); List<DatasetTableFieldDTO> datasetTableFieldDTOS = permissionManage.filterColumnPermissions(collect, desensitizationList, id, null);
if (!chartViewDTO.getType().equalsIgnoreCase("table-info")) { datasetTableFieldDTOS.forEach(ele -> ele.setDesensitized(desensitizationList.containsKey(ele.getDataeaseName())));
datasetTableFieldDTOS = datasetTableFieldDTOS.stream().filter(datasetTableFieldDTO -> !desensitizationList.keySet().contains(datasetTableFieldDTO.getDataeaseName())).collect(Collectors.toList());
}
datasetTableFieldDTOS.add(createCountField(id)); datasetTableFieldDTOS.add(createCountField(id));
List<ChartViewFieldDTO> list = transFieldDTO(datasetTableFieldDTOS); List<ChartViewFieldDTO> list = transFieldDTO(datasetTableFieldDTOS);