fix: 【数据集】列权限自定义脱敏格式显示不正确

This commit is contained in:
taojinlong 2023-12-01 16:39:49 +08:00
parent d61bbef03f
commit d1107c5625
2 changed files with 6 additions and 6 deletions

View File

@ -1106,11 +1106,11 @@ public class ChartDataBuild {
break;
}
if (originStr.length() >= columnPermissionItem.getDesensitizationRule().getM() && originStr.length() >= columnPermissionItem.getDesensitizationRule().getN()) {
desensitizationStr = "***" + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, columnPermissionItem.getDesensitizationRule().getN()) + "***";
desensitizationStr = StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, columnPermissionItem.getDesensitizationRule().getN()) + "***";
break;
}
if (originStr.length() >= columnPermissionItem.getDesensitizationRule().getM() && originStr.length() < columnPermissionItem.getDesensitizationRule().getN()) {
desensitizationStr = "***" + StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, originStr.length());
desensitizationStr = StringUtils.substring(originStr, columnPermissionItem.getDesensitizationRule().getM() - 1, originStr.length());
}
break;
default:

View File

@ -267,7 +267,7 @@ public class DatasourceServer implements DatasourceApi {
try {
datasourceSyncManage.createEngineTable(datasourceRequest.getTable(), tableFields);
} catch (Exception e) {
DEException.throwException("Failed to create table " + datasourceRequest.getTable());
DEException.throwException("Failed to create table " + datasourceRequest.getTable() + ", " + e.getMessage());
}
}
commonThreadPool.addTask(() -> {
@ -409,7 +409,7 @@ public class DatasourceServer implements DatasourceApi {
try {
datasourceSyncManage.createEngineTable(toCreateTable, ApiUtils.getTableFields(datasourceRequest));
} catch (Exception e) {
DEException.throwException("Failed to create table " + toCreateTable);
DEException.throwException("Failed to create table " + toCreateTable + ", " + e.getMessage());
}
}
datasourceSyncManage.deleteSchedule(datasourceTaskServer.selectByDSId(dataSourceDTO.getId()));
@ -425,7 +425,7 @@ public class DatasourceServer implements DatasourceApi {
try {
datasourceSyncManage.dropEngineTable(deleteTable);
} catch (Exception e) {
DEException.throwException("Failed to drop table " + deleteTable);
DEException.throwException("Failed to drop table " + deleteTable + ", " + e.getMessage());
}
}
for (String toCreateTable : toCreateTables) {
@ -433,7 +433,7 @@ public class DatasourceServer implements DatasourceApi {
try {
datasourceSyncManage.createEngineTable(toCreateTable, ExcelUtils.getTableFields(datasourceRequest));
} catch (Exception e) {
DEException.throwException("Failed to create table " + toCreateTable);
DEException.throwException("Failed to create table " + toCreateTable + ", " + e.getMessage());
}
}
datasourceSyncManage.extractExcelData(requestDatasource, "all_scope");