From 0c71f5add77db5ff89c870076086b2bf58da02ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E8=B0=83?= <3084898776@qq.com> Date: Wed, 4 Sep 2024 12:01:31 +0800 Subject: [PATCH] =?UTF-8?q?09041201:=E4=BF=AE=E6=94=B9=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E8=B5=84=E4=BA=A7=E7=BB=93=E6=9E=84=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/Impl/DataSourceServiceImpl.java | 57 ++----------------- 1 file changed, 4 insertions(+), 53 deletions(-) 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