forked from github/dataease
fix(数据集): 修复校验sql卡顿导致数据集重名
This commit is contained in:
parent
4b09c6d0af
commit
d2a9dc64f5
@ -320,12 +320,12 @@ public class DataSetTableService {
|
|||||||
|
|
||||||
@DeCleaner(value = DePermissionType.DATASET, key = "sceneId")
|
@DeCleaner(value = DePermissionType.DATASET, key = "sceneId")
|
||||||
public DatasetTable save(DataSetTableRequest datasetTable) throws Exception {
|
public DatasetTable save(DataSetTableRequest datasetTable) throws Exception {
|
||||||
checkName(datasetTable);
|
|
||||||
if (StringUtils.equalsIgnoreCase(datasetTable.getType(), DatasetType.SQL.name()) && !"appApply".equalsIgnoreCase(datasetTable.getOptFrom())) {
|
if (StringUtils.equalsIgnoreCase(datasetTable.getType(), DatasetType.SQL.name()) && !"appApply".equalsIgnoreCase(datasetTable.getOptFrom())) {
|
||||||
DataSetTableRequest dataSetTableRequest = new DataSetTableRequest();
|
DataSetTableRequest dataSetTableRequest = new DataSetTableRequest();
|
||||||
BeanUtils.copyBean(dataSetTableRequest, datasetTable);
|
BeanUtils.copyBean(dataSetTableRequest, datasetTable);
|
||||||
getSQLPreview(dataSetTableRequest, false);
|
getSQLPreview(dataSetTableRequest, false);
|
||||||
}
|
}
|
||||||
|
checkName(datasetTable);
|
||||||
if (StringUtils.isEmpty(datasetTable.getId())) {
|
if (StringUtils.isEmpty(datasetTable.getId())) {
|
||||||
datasetTable.setId(UUID.randomUUID().toString());
|
datasetTable.setId(UUID.randomUUID().toString());
|
||||||
datasetTable.setCreateBy(AuthUtils.getUser().getUsername());
|
datasetTable.setCreateBy(AuthUtils.getUser().getUsername());
|
||||||
|
Loading…
Reference in New Issue
Block a user