From c3fae86e8bbe898b66d1f8c07de0294a28b12eb5 Mon Sep 17 00:00:00 2001 From: pwq Date: Tue, 29 Oct 2024 17:22:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=BD=E4=BA=A7=E6=97=B6?= =?UTF-8?q?=E5=BA=8F=E6=95=B0=E6=8D=AE=E5=BA=93TDEngine=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- report-core/pom.xml | 7 +++++++ .../datasource/service/impl/DataSourceServiceImpl.java | 2 ++ .../template/gaea/business/util/JdbcConstants.java | 1 + .../src/main/resources/db/migration/V1.4.3__update.sql | 4 ++++ 4 files changed, 14 insertions(+) create mode 100644 report-core/src/main/resources/db/migration/V1.4.3__update.sql diff --git a/report-core/pom.xml b/report-core/pom.xml index 6c9a8b4f..034f2aa7 100644 --- a/report-core/pom.xml +++ b/report-core/pom.xml @@ -112,6 +112,13 @@ mysql-connector-java 8.0.28 + + + com.taosdata.jdbc + taos-jdbcdriver + 3.3.3 + + org.flywaydb flyway-core diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasource/service/impl/DataSourceServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasource/service/impl/DataSourceServiceImpl.java index 7e0acf2d..89458d64 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasource/service/impl/DataSourceServiceImpl.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/datasource/service/impl/DataSourceServiceImpl.java @@ -103,6 +103,7 @@ public class DataSourceServiceImpl implements DataSourceService { case JdbcConstants.POSTGRESQL: case JdbcConstants.DAMENG: case JdbcConstants.OPENGAUSS: + case JdbcConstants.TDENGINE: case JdbcConstants.KINGBASE: testRelationalDb(dto); break; @@ -131,6 +132,7 @@ public class DataSourceServiceImpl implements DataSourceService { case JdbcConstants.POSTGRESQL: case JdbcConstants.DAMENG: case JdbcConstants.OPENGAUSS: + case JdbcConstants.TDENGINE: case JdbcConstants.KINGBASE: return executeRelationalDb(dto); case JdbcConstants.HTTP: diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/util/JdbcConstants.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/util/JdbcConstants.java index a343601a..845246d6 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/util/JdbcConstants.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/util/JdbcConstants.java @@ -11,6 +11,7 @@ public class JdbcConstants { public final static String HTTP = "http"; public final static String MYSQL = "mysql"; public final static String ORACLE = "oracle"; + public final static String TDENGINE = "TDEngine"; public final static String ELASTIC_SEARCH_SQL = "elasticsearch_sql"; public final static String SQL_SERVER = "mssqlserver"; public final static String JDBC = "jdbc"; diff --git a/report-core/src/main/resources/db/migration/V1.4.3__update.sql b/report-core/src/main/resources/db/migration/V1.4.3__update.sql new file mode 100644 index 00000000..c04fbaa4 --- /dev/null +++ b/report-core/src/main/resources/db/migration/V1.4.3__update.sql @@ -0,0 +1,4 @@ + +INSERT INTO gaea_dict_item +(dict_code, item_name, item_value, item_extend, enabled, locale, remark, sort, create_by, create_time, update_by, update_time, version) +VALUES('SOURCE_TYPE', '涛思', 'TDEngine', '[{"label":"driverName","value":"com.taosdata.jdbc.rs.RestfulDriver","labelValue":"驱动类"},{"label":"jdbcUrl","value":"jdbc:TAOS-RS://localhost:6041/flows?user=root&password=taosdata","labelValue":"连接串"},{"label":"user","value":"root","labelValue":"用户名"},{"label":"password","value":"taosdata","labelValue":"密码"}]', 1, 'zh', NULL, 35, 'admin', '2021-03-23 10:54:08', 'admin', '2021-03-23 10:54:08', 1); -- Gitee