forked from github/dataease
Merge pull request #6962 from dataease/pr@dev-v2@fixDatasource
fix: 【数据集】列权限自定义脱敏格式显示不正确
This commit is contained in:
commit
cde9664013
@ -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:
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user