|
@@ -166,7 +166,7 @@ public class TableInfoServiceImpl implements ITableInfoService {
|
|
|
.put("total", dmTableList.size());
|
|
|
return ajaxResult;
|
|
|
} else if (databaseType.equals(DataSourceType.ORACLE.getDataSourceName())) {
|
|
|
- List<TableInfoVO> dmTableList = tableInfoMapper.oracleTableInfoList(username,map);
|
|
|
+ List<TableInfoVO> dmTableList = tableInfoMapper.oracleTableInfoList(username, map);
|
|
|
AjaxResult ajaxResult = new AjaxResult();
|
|
|
ajaxResult.put("code", 200)
|
|
|
.put("data", dmTableList.stream().skip((pageNum - 1) * pageSize).limit(pageSize).
|
|
@@ -670,7 +670,7 @@ public class TableInfoServiceImpl implements ITableInfoService {
|
|
|
showDatabaseSql = "select name from sys.databases";
|
|
|
createDatabaseSql = "CREATE DATABASE " + dataSource.getDatabaseName();
|
|
|
// 封装sqlserver基础库信息连接信息
|
|
|
- foundationDriverName =driverName;
|
|
|
+ foundationDriverName = driverName;
|
|
|
foundationDBURL += "jdbc:sqlserver://" + infoMap.get("databaseIp") + ":" + infoMap.get("portNumber") + ";DatabaseName=" + infoMap.get("databaseName") + ";trustServerCertificate=true;";
|
|
|
foundationUserName += infoMap.get("username");
|
|
|
foundationUserPwd += infoMap.get("password");
|
|
@@ -691,7 +691,7 @@ public class TableInfoServiceImpl implements ITableInfoService {
|
|
|
dbURL = "jdbc:oracle:thin:@" + dataSource.getDatabaseIp() + ":" + dataSource.getPortNumber();
|
|
|
// 封装oracle基础库信息连接信息
|
|
|
foundationDriverName = driverName;
|
|
|
- foundationDBURL += "jdbc:oracle:thin:@" + infoMap.get("databaseIp") + ":" + infoMap.get("portNumber") + ":" + infoMap.get("databaseName");
|
|
|
+ foundationDBURL += "jdbc:oracle:thin:@" + infoMap.get("databaseIp") + ":" + infoMap.get("portNumber") + ":" + dataSource.getDatabaseName();
|
|
|
foundationUserName += infoMap.get("username");
|
|
|
foundationUserPwd += infoMap.get("password");
|
|
|
break;
|
|
@@ -765,15 +765,12 @@ public class TableInfoServiceImpl implements ITableInfoService {
|
|
|
script.append(System.lineSeparator());
|
|
|
}
|
|
|
reader.close();
|
|
|
- if (dataSource.getDatabaseType().equals("dm")){
|
|
|
- foundationSt.execute("set schema " + dataSource.getDatabaseName() +";");
|
|
|
+ if (dataSource.getDatabaseType().equals("dm")) {
|
|
|
+ foundationSt.execute("set schema " + dataSource.getDatabaseName() + ";");
|
|
|
}
|
|
|
- if (dataSource.getDatabaseType().equals("sqlserver")){
|
|
|
+ if (dataSource.getDatabaseType().equals("sqlserver")) {
|
|
|
foundationSt.executeUpdate("USE " + dataSource.getDatabaseName() + ";");
|
|
|
}
|
|
|
- if (dataSource.getDatabaseType().equals("oracle")){
|
|
|
- foundationSt.executeUpdate("USE `" + dataSource.getDatabaseName() + "`");
|
|
|
- }
|
|
|
// 将SQL脚本内容作为字符串执行
|
|
|
foundationSt.execute(script.toString());
|
|
|
}
|