diff --git a/muyu-source-server/src/main/java/com/muyu/source/service/Impl/DataSourceServiceImpl.java b/muyu-source-server/src/main/java/com/muyu/source/service/Impl/DataSourceServiceImpl.java index a72e157..796294e 100644 --- a/muyu-source-server/src/main/java/com/muyu/source/service/Impl/DataSourceServiceImpl.java +++ b/muyu-source-server/src/main/java/com/muyu/source/service/Impl/DataSourceServiceImpl.java @@ -119,32 +119,6 @@ public class DataSourceServiceImpl extends ServiceImpl() {{ -// eq(DataType::getType, dataSource.getDataType()); -// }}); -// String jdbcUrl = ""; -// String className = ""; -// boolean flag = false; -// try { -// //判空 -// if (dataType.getDriverManager() != null && dataType.getPrefix() != null) { -// if ("MySql".equals(dataType.getType())) { -// className = dataType.getDriverManager(); -// //mysql拼接连接路径 -// jdbcUrl = dataType.getDriverManager() + dataType.getPrefix() + dataSource.getIp() + ":" + dataSource.getPort() + "/" + dataSource.getDatabaseName() + "?" + dataSource.getConnectionParam(); -// } -// if ("Oracle".equals(dataType.getType())) { -// className = dataType.getDriverManager(); -// //oracle拼接连接路径 -// jdbcUrl = dataType.getDriverManager() + dataType.getPrefix() + dataSource.getIp() + ":" + dataSource.getPort() + ":" + dataSource.getDatabaseName() + "?" + dataSource.getConnectionParam(); -// } -// flag = testConnection(className, jdbcUrl, dataSource.getUserName(), dataSource.getPassword()); -// } -// return flag; -// } catch (Exception e) { -// e.printStackTrace(); -// } -// return flag; if (etlDataScore.getDataType().equals(MYSQL)) { MysqlPool mysqlPool = new MysqlPool(etlDataScore); mysqlPool.init(); @@ -174,19 +148,19 @@ public class DataSourceServiceImpl extends ServiceImpl list = tableInfoService.list(new LambdaQueryWrapper<>() {{ eq(TableInfo::getBasicId, etlDataScore.getId()); }}); list.forEach(tableInfo -> { - structureService.remove(new LambdaQueryWrapper<>(){{ + structureService.remove(new LambdaQueryWrapper<>() {{ eq(Structure::getTableId, tableInfo.getId()); }}); }); - tableInfoService.remove(new LambdaQueryWrapper<>(){{ + tableInfoService.remove(new LambdaQueryWrapper<>() {{ eq(TableInfo::getBasicId, etlDataScore.getId()); }}); - assetAuthorizationService.remove(new LambdaQueryWrapper<>(){{ + assetAuthorizationService.remove(new LambdaQueryWrapper<>() {{ eq(AssetAuthorization::getTableId, tableInfoServiceOne.getId()) .or() .eq(AssetAuthorization::getBasicId, etlDataScore.getId()); @@ -336,29 +310,6 @@ public class DataSourceServiceImpl extends ServiceImpl