finalIntegercount=jdbcTemplate.queryForObject(StrFormatter.format("select count(table_name) from information_schema.TABLES where TABLE_NAME = '{}'",tableName),Integer.class);
/*final Integer count = jdbcTemplate.queryForObject(StrFormatter.format("select count(table_name) from information_schema.TABLES where TABLE_NAME = '{}'", tableName), Integer.class);
if (count > 0) {
if (count > 0) {
return AjaxResult.error("此表已存在");
return AjaxResult.error("此表已存在");
}
}
...
@@ -164,7 +175,7 @@ public class DataImportController {
...
@@ -164,7 +175,7 @@ public class DataImportController {
updateTemplate.setId(template.getId());
updateTemplate.setId(template.getId());
updateTemplate.setTableName(tableName);
updateTemplate.setTableName(tableName);
DataSourceUtil.switchDefaultDs();
DataSourceUtil.switchDefaultDs();
dataImportService.updateById(updateTemplate);
dataImportService.updateById(updateTemplate);*/
}else{
}else{
// oracle
// oracle
finalIntegercount=jdbcTemplate.queryForObject(StrFormatter.format("select count(*) from user_tables where table_name =upper('{}')",tableName),Integer.class);
finalIntegercount=jdbcTemplate.queryForObject(StrFormatter.format("select count(*) from user_tables where table_name =upper('{}')",tableName),Integer.class);
...
@@ -179,14 +190,17 @@ public class DataImportController {
...
@@ -179,14 +190,17 @@ public class DataImportController {