From 51bec018f50ca862f470ce8bbc7ed5865d45508d Mon Sep 17 00:00:00 2001
From: Vickey <891607480@qq.com>
Date: Wed, 14 May 2025 20:34:08 +0800
Subject: [PATCH] refactor(data): remove dc3-common-data-postgres module and
its typed point value classes
---
.../src/main/resources/application-dev.yml | 9 +-
.../src/main/resources/application-pre.yml | 9 +-
.../src/main/resources/application-pro.yml | 9 +-
.../src/main/resources/application-test.yml | 9 +-
.../src/main/resources/application-dev.yml | 9 +-
.../src/main/resources/application-pre.yml | 9 +-
.../src/main/resources/application-pro.yml | 9 +-
.../src/main/resources/application-test.yml | 9 +-
.../src/main/resources/application-dev.yml | 9 +-
.../src/main/resources/application-pre.yml | 9 +-
.../src/main/resources/application-pro.yml | 9 +-
.../src/main/resources/application-test.yml | 9 +-
dc3-common/dc3-common-data-postgres/pom.xml | 96 ----------------
.../config/ActivePostgresProfileConfig.java | 43 -------
.../pnoker/common/config/PostgresConfig.java | 41 -------
.../common/init/PostgresInitRunner.java | 41 -------
.../postgres/dal/PointValueBoolManager.java | 33 ------
.../postgres/dal/PointValueByteManager.java | 33 ------
.../dal/PointValueDecimalManager.java | 33 ------
.../postgres/dal/PointValueDoubleManager.java | 33 ------
.../postgres/dal/PointValueFloatManager.java | 33 ------
.../postgres/dal/PointValueIntManager.java | 33 ------
.../postgres/dal/PointValueLongManager.java | 33 ------
.../dal/impl/PointValueBoolManagerImpl.java | 37 ------
.../dal/impl/PointValueByteManagerImpl.java | 37 ------
.../impl/PointValueDecimalManagerImpl.java | 37 ------
.../dal/impl/PointValueDoubleManagerImpl.java | 37 ------
.../dal/impl/PointValueFloatManagerImpl.java | 37 ------
.../dal/impl/PointValueIntManagerImpl.java | 37 ------
.../dal/impl/PointValueLongManagerImpl.java | 37 ------
.../entity/model/PointValueBoolDO.java | 106 -----------------
.../entity/model/PointValueByteDO.java | 106 -----------------
.../entity/model/PointValueDecimalDO.java | 107 ------------------
.../entity/model/PointValueDoubleDO.java | 106 -----------------
.../entity/model/PointValueFloatDO.java | 106 -----------------
.../entity/model/PointValueIntDO.java | 106 -----------------
.../entity/model/PointValueLongDO.java | 106 -----------------
.../postgres/generator/MybatisGenerator.java | 71 ------------
.../postgres/mapper/PointValueBoolMapper.java | 34 ------
.../postgres/mapper/PointValueByteMapper.java | 34 ------
.../mapper/PointValueDecimalMapper.java | 34 ------
.../mapper/PointValueDoubleMapper.java | 34 ------
.../mapper/PointValueFloatMapper.java | 34 ------
.../postgres/mapper/PointValueIntMapper.java | 34 ------
.../postgres/mapper/PointValueLongMapper.java | 34 ------
.../src/main/resources/META-INF/aop.xml | 22 ----
.../main/resources/META-INF/spring.factories | 20 ----
...ot.autoconfigure.AutoConfiguration.imports | 18 ---
.../main/resources/application-mongodb.yml | 19 ----
.../mapping/PointValueBoolMapper.xml | 21 ----
.../mapping/PointValueByteMapper.xml | 21 ----
.../mapping/PointValueDecimalMapper.xml | 21 ----
.../mapping/PointValueDoubleMapper.xml | 21 ----
.../mapping/PointValueFloatMapper.xml | 21 ----
.../resources/mapping/PointValueIntMapper.xml | 21 ----
.../mapping/PointValueLongMapper.xml | 21 ----
dc3-common/dc3-common-data/pom.xml | 4 -
.../impl}/PostgresRepositoryServiceImpl.java | 3 +-
.../common/data}/dal/PointValueManager.java | 6 +-
.../data}/dal/impl/PointValueManagerImpl.java | 10 +-
.../data}/entity/model/PointValueDO.java | 6 +-
.../common/data}/mapper/PointValueMapper.java | 6 +-
.../resources/mapping/PointValueMapper.xml | 2 +-
dc3-common/dc3-common-manager/pom.xml | 4 -
dc3-common/pom.xml | 6 -
pom.xml | 5 -
66 files changed, 88 insertions(+), 2061 deletions(-)
delete mode 100644 dc3-common/dc3-common-data-postgres/pom.xml
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/config/ActivePostgresProfileConfig.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/config/PostgresConfig.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/init/PostgresInitRunner.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/PointValueBoolManager.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/PointValueByteManager.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/PointValueDecimalManager.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/PointValueDoubleManager.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/PointValueFloatManager.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/PointValueIntManager.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/PointValueLongManager.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueBoolManagerImpl.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueByteManagerImpl.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueDecimalManagerImpl.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueDoubleManagerImpl.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueFloatManagerImpl.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueIntManagerImpl.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueLongManagerImpl.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueBoolDO.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueByteDO.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDecimalDO.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDoubleDO.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueFloatDO.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueIntDO.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueLongDO.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/generator/MybatisGenerator.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueBoolMapper.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueByteMapper.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueDecimalMapper.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueDoubleMapper.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueFloatMapper.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueIntMapper.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueLongMapper.java
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/META-INF/aop.xml
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/META-INF/spring.factories
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/application-mongodb.yml
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueBoolMapper.xml
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueByteMapper.xml
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueDecimalMapper.xml
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueDoubleMapper.xml
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueFloatMapper.xml
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueIntMapper.xml
delete mode 100644 dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueLongMapper.xml
rename dc3-common/{dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/repository => dc3-common-data/src/main/java/io/github/pnoker/common/data/biz/impl}/PostgresRepositoryServiceImpl.java (97%)
rename dc3-common/{dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres => dc3-common-data/src/main/java/io/github/pnoker/common/data}/dal/PointValueManager.java (82%)
rename dc3-common/{dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres => dc3-common-data/src/main/java/io/github/pnoker/common/data}/dal/impl/PointValueManagerImpl.java (75%)
rename dc3-common/{dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres => dc3-common-data/src/main/java/io/github/pnoker/common/data}/entity/model/PointValueDO.java (93%)
rename dc3-common/{dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres => dc3-common-data/src/main/java/io/github/pnoker/common/data}/mapper/PointValueMapper.java (82%)
rename dc3-common/{dc3-common-data-postgres => dc3-common-data}/src/main/resources/mapping/PointValueMapper.xml (91%)
diff --git a/dc3-center/dc3-center-auth/src/main/resources/application-dev.yml b/dc3-center/dc3-center-auth/src/main/resources/application-dev.yml
index 0c6152e20..61be34d9d 100644
--- a/dc3-center/dc3-center-auth/src/main/resources/application-dev.yml
+++ b/dc3-center/dc3-center-auth/src/main/resources/application-dev.yml
@@ -19,9 +19,12 @@ spring:
env: dev
group: ${user.name}
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:35432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_auth}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:35432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_auth}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
data:
redis:
host: ${REDIS_HOST:dc3-redis}
diff --git a/dc3-center/dc3-center-auth/src/main/resources/application-pre.yml b/dc3-center/dc3-center-auth/src/main/resources/application-pre.yml
index d0d7deb40..b9c750151 100644
--- a/dc3-center/dc3-center-auth/src/main/resources/application-pre.yml
+++ b/dc3-center/dc3-center-auth/src/main/resources/application-pre.yml
@@ -17,9 +17,12 @@
# Pre-release environment configuration will overwrite the content configured in application-*.yml
spring:
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3_auth}?currentSchema=${POSTGRES_SCHEMA:dc3_auth}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3_auth}?currentSchema=${POSTGRES_SCHEMA:dc3_auth}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
data:
redis:
host: ${REDIS_HOST:dc3-redis}
diff --git a/dc3-center/dc3-center-auth/src/main/resources/application-pro.yml b/dc3-center/dc3-center-auth/src/main/resources/application-pro.yml
index c53783b04..ac1894f03 100644
--- a/dc3-center/dc3-center-auth/src/main/resources/application-pro.yml
+++ b/dc3-center/dc3-center-auth/src/main/resources/application-pro.yml
@@ -17,9 +17,12 @@
# Production environment configuration will overwrite the content configured in application-*.yml
spring:
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3_auth}?currentSchema=${POSTGRES_SCHEMA:dc3_auth}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3_auth}?currentSchema=${POSTGRES_SCHEMA:dc3_auth}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
data:
redis:
host: ${REDIS_HOST:dc3-redis}
diff --git a/dc3-center/dc3-center-auth/src/main/resources/application-test.yml b/dc3-center/dc3-center-auth/src/main/resources/application-test.yml
index 2b7036efb..678d2f4db 100644
--- a/dc3-center/dc3-center-auth/src/main/resources/application-test.yml
+++ b/dc3-center/dc3-center-auth/src/main/resources/application-test.yml
@@ -17,9 +17,12 @@
# Test environment configuration will overwrite the content configured in application-*.yml
spring:
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_auth}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_auth}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
data:
redis:
host: ${REDIS_HOST:dc3-redis}
diff --git a/dc3-center/dc3-center-manager/src/main/resources/application-dev.yml b/dc3-center/dc3-center-manager/src/main/resources/application-dev.yml
index 172016d5c..6db8fbb30 100644
--- a/dc3-center/dc3-center-manager/src/main/resources/application-dev.yml
+++ b/dc3-center/dc3-center-manager/src/main/resources/application-dev.yml
@@ -19,9 +19,12 @@ spring:
env: dev
group: ${user.name}
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:35432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_manager}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:35432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_manager}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
rabbitmq:
virtual-host: ${RABBITMQ_VIRTUAL_HOST:dc3}
host: ${RABBITMQ_HOST:dc3-rabbitmq}
diff --git a/dc3-center/dc3-center-manager/src/main/resources/application-pre.yml b/dc3-center/dc3-center-manager/src/main/resources/application-pre.yml
index e70bd93c6..0e40fefe5 100644
--- a/dc3-center/dc3-center-manager/src/main/resources/application-pre.yml
+++ b/dc3-center/dc3-center-manager/src/main/resources/application-pre.yml
@@ -17,9 +17,12 @@
# Pre-release environment configuration will overwrite the content configured in application-*.yml
spring:
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_manager}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_manager}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
rabbitmq:
virtual-host: ${RABBITMQ_VIRTUAL_HOST:dc3}
host: ${RABBITMQ_HOST:dc3-rabbitmq}
diff --git a/dc3-center/dc3-center-manager/src/main/resources/application-pro.yml b/dc3-center/dc3-center-manager/src/main/resources/application-pro.yml
index e7d942629..66f4581b1 100644
--- a/dc3-center/dc3-center-manager/src/main/resources/application-pro.yml
+++ b/dc3-center/dc3-center-manager/src/main/resources/application-pro.yml
@@ -17,9 +17,12 @@
# Production environment configuration will overwrite the content configured in application-*.yml
spring:
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_manager}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_manager}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
rabbitmq:
virtual-host: ${RABBITMQ_VIRTUAL_HOST:dc3}
host: ${RABBITMQ_HOST:dc3-rabbitmq}
diff --git a/dc3-center/dc3-center-manager/src/main/resources/application-test.yml b/dc3-center/dc3-center-manager/src/main/resources/application-test.yml
index f9926de76..c664849ff 100644
--- a/dc3-center/dc3-center-manager/src/main/resources/application-test.yml
+++ b/dc3-center/dc3-center-manager/src/main/resources/application-test.yml
@@ -17,9 +17,12 @@
# Test environment configuration will overwrite the content configured in application-*.yml
spring:
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_manager}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_manager}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
rabbitmq:
virtual-host: ${RABBITMQ_VIRTUAL_HOST:dc3}
host: ${RABBITMQ_HOST:dc3-rabbitmq}
diff --git a/dc3-center/dc3-center-single/src/main/resources/application-dev.yml b/dc3-center/dc3-center-single/src/main/resources/application-dev.yml
index 9d2867b61..bd14351f1 100644
--- a/dc3-center/dc3-center-single/src/main/resources/application-dev.yml
+++ b/dc3-center/dc3-center-single/src/main/resources/application-dev.yml
@@ -19,9 +19,12 @@ spring:
env: dev
group: ${user.name}
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:35432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_single}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:35432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_single}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
rabbitmq:
virtual-host: ${RABBITMQ_VIRTUAL_HOST:dc3}
host: ${RABBITMQ_HOST:dc3-rabbitmq}
diff --git a/dc3-center/dc3-center-single/src/main/resources/application-pre.yml b/dc3-center/dc3-center-single/src/main/resources/application-pre.yml
index c14c74e40..bcf70b3e6 100644
--- a/dc3-center/dc3-center-single/src/main/resources/application-pre.yml
+++ b/dc3-center/dc3-center-single/src/main/resources/application-pre.yml
@@ -17,9 +17,12 @@
# Pre-release environment configuration will overwrite the content configured in application-*.yml
spring:
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_single}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_single}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
data:
redis:
host: ${REDIS_HOST:dc3-redis}
diff --git a/dc3-center/dc3-center-single/src/main/resources/application-pro.yml b/dc3-center/dc3-center-single/src/main/resources/application-pro.yml
index f34ac7627..d4c4bda12 100644
--- a/dc3-center/dc3-center-single/src/main/resources/application-pro.yml
+++ b/dc3-center/dc3-center-single/src/main/resources/application-pro.yml
@@ -17,9 +17,12 @@
# Production environment configuration will overwrite the content configured in application-*.yml
spring:
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_single}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_single}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
data:
redis:
host: ${REDIS_HOST:dc3-redis}
diff --git a/dc3-center/dc3-center-single/src/main/resources/application-test.yml b/dc3-center/dc3-center-single/src/main/resources/application-test.yml
index a183b0302..80753d845 100644
--- a/dc3-center/dc3-center-single/src/main/resources/application-test.yml
+++ b/dc3-center/dc3-center-single/src/main/resources/application-test.yml
@@ -17,9 +17,12 @@
# Test environment configuration will overwrite the content configured in application-*.yml
spring:
datasource:
- url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_single}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
- username: ${POSTGRES_USERNAME:dc3}
- password: ${POSTGRES_PASSWORD:dc3dc3dc3}
+ dynamic:
+ datasource:
+ master:
+ url: jdbc:postgresql://${POSTGRES_HOST:dc3-postgres}:${POSTGRES_PORT:5432}/${POSTGRES_DB:dc3}?currentSchema=${POSTGRES_SCHEMA:dc3_single}&applicationName=dc3&ssl=false&stringtype=unspecified&clientEncoding=UTF8&serverTimezone=Asia/Shanghai
+ username: ${POSTGRES_USERNAME:dc3}
+ password: ${POSTGRES_PASSWORD:dc3dc3dc3}
rabbitmq:
virtual-host: ${RABBITMQ_VIRTUAL_HOST:dc3}
host: ${RABBITMQ_HOST:dc3-rabbitmq}
diff --git a/dc3-common/dc3-common-data-postgres/pom.xml b/dc3-common/dc3-common-data-postgres/pom.xml
deleted file mode 100644
index 0dc38ba67..000000000
--- a/dc3-common/dc3-common-data-postgres/pom.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
- * 设备位号历史数据表(Boolean类型) 服务类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueBoolManager extends IService- * 设备位号历史数据表(Byte类型) 服务类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueByteManager extends IService- * 设备位号历史数据表(Decimal类型) 服务类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueDecimalManager extends IService- * 设备位号历史数据表(Double类型) 服务类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueDoubleManager extends IService- * 设备位号历史数据表(Float类型) 服务类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueFloatManager extends IService- * 设备位号历史数据表(Integer类型) 服务类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueIntManager extends IService- * 设备位号历史数据表(Long类型) 服务类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueLongManager extends IService- * 设备位号历史数据表(Boolean类型) 服务实现类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Service -public class PointValueBoolManagerImpl extends ServiceImpl- * 设备位号历史数据表(Byte类型) 服务实现类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Service -public class PointValueByteManagerImpl extends ServiceImpl- * 设备位号历史数据表(Decimal类型) 服务实现类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Service -public class PointValueDecimalManagerImpl extends ServiceImpl- * 设备位号历史数据表(Double类型) 服务实现类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Service -public class PointValueDoubleManagerImpl extends ServiceImpl- * 设备位号历史数据表(Float类型) 服务实现类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Service -public class PointValueFloatManagerImpl extends ServiceImpl- * 设备位号历史数据表(Integer类型) 服务实现类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Service -public class PointValueIntManagerImpl extends ServiceImpl- * 设备位号历史数据表(Long类型) 服务实现类 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Service -public class PointValueLongManagerImpl extends ServiceImpl- * 设备位号历史数据表(Boolean类型) - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Getter -@Setter -@ToString -@TableName("dc3_point_value_bool") -public class PointValueBoolDO implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @TableField("device_id") - private Long deviceId; - - /** - * 位号ID - */ - @TableField("point_id") - private Long pointId; - - /** - * 原始值 - */ - @TableField("raw_value") - private Boolean rawValue; - - /** - * 计算值 - */ - @TableField("cal_value") - private Boolean calValue; - - /** - * 数据信息 - */ - @TableField("value_ext") - private Object valueExt; - - /** - * 驱动ID - */ - @TableField("driver_id") - private Long driverId; - - /** - * 租户ID - */ - @TableField("tenant_id") - private Long tenantId; - - /** - * 原始时间 - */ - @TableField("origin_time") - private LocalDateTime originTime; - - /** - * 创建时间 - */ - @TableField("create_time") - private LocalDateTime createTime; - - /** - * 操作时间 - */ - @TableField("operate_time") - private LocalDateTime operateTime; -} diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueByteDO.java b/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueByteDO.java deleted file mode 100644 index 3f4351f8e..000000000 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueByteDO.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2016-present the IoT DC3 original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.github.pnoker.common.postgres.entity.model; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - *- * 设备位号历史数据表(Byte类型) - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Getter -@Setter -@ToString -@TableName("dc3_point_value_byte") -public class PointValueByteDO implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @TableField("device_id") - private Long deviceId; - - /** - * 位号ID - */ - @TableField("point_id") - private Long pointId; - - /** - * 原始值 - */ - @TableField("raw_value") - private Byte rawValue; - - /** - * 计算值 - */ - @TableField("cal_value") - private Byte calValue; - - /** - * 数据信息 - */ - @TableField("value_ext") - private Object valueExt; - - /** - * 驱动ID - */ - @TableField("driver_id") - private Long driverId; - - /** - * 租户ID - */ - @TableField("tenant_id") - private Long tenantId; - - /** - * 原始时间 - */ - @TableField("origin_time") - private LocalDateTime originTime; - - /** - * 创建时间 - */ - @TableField("create_time") - private LocalDateTime createTime; - - /** - * 操作时间 - */ - @TableField("operate_time") - private LocalDateTime operateTime; -} diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDecimalDO.java b/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDecimalDO.java deleted file mode 100644 index 9b9554c00..000000000 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDecimalDO.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2016-present the IoT DC3 original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.github.pnoker.common.postgres.entity.model; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serial; -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - *- * 设备位号历史数据表(Decimal类型) - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Getter -@Setter -@ToString -@TableName("dc3_point_value_decimal") -public class PointValueDecimalDO implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @TableField("device_id") - private Long deviceId; - - /** - * 位号ID - */ - @TableField("point_id") - private Long pointId; - - /** - * 原始值 - */ - @TableField("raw_value") - private BigDecimal rawValue; - - /** - * 计算值 - */ - @TableField("cal_value") - private BigDecimal calValue; - - /** - * 数据信息 - */ - @TableField("value_ext") - private Object valueExt; - - /** - * 驱动ID - */ - @TableField("driver_id") - private Long driverId; - - /** - * 租户ID - */ - @TableField("tenant_id") - private Long tenantId; - - /** - * 原始时间 - */ - @TableField("origin_time") - private LocalDateTime originTime; - - /** - * 创建时间 - */ - @TableField("create_time") - private LocalDateTime createTime; - - /** - * 操作时间 - */ - @TableField("operate_time") - private LocalDateTime operateTime; -} diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDoubleDO.java b/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDoubleDO.java deleted file mode 100644 index 2520c48e0..000000000 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDoubleDO.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2016-present the IoT DC3 original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.github.pnoker.common.postgres.entity.model; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - *- * 设备位号历史数据表(Double类型) - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Getter -@Setter -@ToString -@TableName("dc3_point_value_double") -public class PointValueDoubleDO implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @TableField("device_id") - private Long deviceId; - - /** - * 位号ID - */ - @TableField("point_id") - private Long pointId; - - /** - * 原始值 - */ - @TableField("raw_value") - private Double rawValue; - - /** - * 计算值 - */ - @TableField("cal_value") - private Double calValue; - - /** - * 数据信息 - */ - @TableField("value_ext") - private Object valueExt; - - /** - * 驱动ID - */ - @TableField("driver_id") - private Long driverId; - - /** - * 租户ID - */ - @TableField("tenant_id") - private Long tenantId; - - /** - * 原始时间 - */ - @TableField("origin_time") - private LocalDateTime originTime; - - /** - * 创建时间 - */ - @TableField("create_time") - private LocalDateTime createTime; - - /** - * 操作时间 - */ - @TableField("operate_time") - private LocalDateTime operateTime; -} diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueFloatDO.java b/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueFloatDO.java deleted file mode 100644 index 60315cffa..000000000 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueFloatDO.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2016-present the IoT DC3 original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.github.pnoker.common.postgres.entity.model; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - *- * 设备位号历史数据表(Float类型) - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Getter -@Setter -@ToString -@TableName("dc3_point_value_float") -public class PointValueFloatDO implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @TableField("device_id") - private Long deviceId; - - /** - * 位号ID - */ - @TableField("point_id") - private Long pointId; - - /** - * 原始值 - */ - @TableField("raw_value") - private Double rawValue; - - /** - * 计算值 - */ - @TableField("cal_value") - private Double calValue; - - /** - * 数据信息 - */ - @TableField("value_ext") - private Object valueExt; - - /** - * 驱动ID - */ - @TableField("driver_id") - private Long driverId; - - /** - * 租户ID - */ - @TableField("tenant_id") - private Long tenantId; - - /** - * 原始时间 - */ - @TableField("origin_time") - private LocalDateTime originTime; - - /** - * 创建时间 - */ - @TableField("create_time") - private LocalDateTime createTime; - - /** - * 操作时间 - */ - @TableField("operate_time") - private LocalDateTime operateTime; -} diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueIntDO.java b/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueIntDO.java deleted file mode 100644 index cfea2e2cd..000000000 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueIntDO.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2016-present the IoT DC3 original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.github.pnoker.common.postgres.entity.model; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - *- * 设备位号历史数据表(Integer类型) - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Getter -@Setter -@ToString -@TableName("dc3_point_value_int") -public class PointValueIntDO implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @TableField("device_id") - private Long deviceId; - - /** - * 位号ID - */ - @TableField("point_id") - private Long pointId; - - /** - * 原始值 - */ - @TableField("raw_value") - private Integer rawValue; - - /** - * 计算值 - */ - @TableField("cal_value") - private Integer calValue; - - /** - * 数据信息 - */ - @TableField("value_ext") - private Object valueExt; - - /** - * 驱动ID - */ - @TableField("driver_id") - private Long driverId; - - /** - * 租户ID - */ - @TableField("tenant_id") - private Long tenantId; - - /** - * 原始时间 - */ - @TableField("origin_time") - private LocalDateTime originTime; - - /** - * 创建时间 - */ - @TableField("create_time") - private LocalDateTime createTime; - - /** - * 操作时间 - */ - @TableField("operate_time") - private LocalDateTime operateTime; -} diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueLongDO.java b/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueLongDO.java deleted file mode 100644 index deeca446e..000000000 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueLongDO.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2016-present the IoT DC3 original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.github.pnoker.common.postgres.entity.model; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; - -import java.io.Serial; -import java.io.Serializable; -import java.time.LocalDateTime; - -/** - *- * 设备位号历史数据表(Long类型) - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -@Getter -@Setter -@ToString -@TableName("dc3_point_value_long") -public class PointValueLongDO implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 设备ID - */ - @TableField("device_id") - private Long deviceId; - - /** - * 位号ID - */ - @TableField("point_id") - private Long pointId; - - /** - * 原始值 - */ - @TableField("raw_value") - private Long rawValue; - - /** - * 计算值 - */ - @TableField("cal_value") - private Long calValue; - - /** - * 数据信息 - */ - @TableField("value_ext") - private Object valueExt; - - /** - * 驱动ID - */ - @TableField("driver_id") - private Long driverId; - - /** - * 租户ID - */ - @TableField("tenant_id") - private Long tenantId; - - /** - * 原始时间 - */ - @TableField("origin_time") - private LocalDateTime originTime; - - /** - * 创建时间 - */ - @TableField("create_time") - private LocalDateTime createTime; - - /** - * 操作时间 - */ - @TableField("operate_time") - private LocalDateTime operateTime; -} diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/generator/MybatisGenerator.java b/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/generator/MybatisGenerator.java deleted file mode 100644 index 2175ddf84..000000000 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/generator/MybatisGenerator.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2016-present the IoT DC3 original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.github.pnoker.common.postgres.generator; - -import com.baomidou.mybatisplus.generator.config.OutputFile; -import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; -import com.google.common.collect.ImmutableMap; -import io.github.pnoker.common.utils.MybatisUtil; - -/** - * 自动代码生成工具 - *- * 注意: - *
- * 当前配置仅用于 dc3-common-dal 服务模块, 如果需要用于其他模块请重新配置 path 参数。 - * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public class MybatisGenerator { - public static void main(String[] args) { - generator(); - } - - public static void generator() { - String path = System.getProperty("user.dir") + "/dc3-common/dc3-common-data-postgres/src/main"; - MybatisUtil.defaultGenerator("dc3-postgres", "35432", "dc3", "dc3_data", "dc3", "dc3dc3dc3") - .globalConfig(builder -> MybatisUtil.defaultGlobalConfig(builder, path)) - .dataSourceConfig(MybatisUtil::defaultDataSourceConfig) - .packageConfig(builder -> builder - .parent("io.github.pnoker.common.postgres") - .entity("entity.model") - .service("dal") - .serviceImpl("dal.impl") - .mapper("mapper") - .pathInfo(ImmutableMap.of( - OutputFile.service, path + "/java/io/github/pnoker/common/postgres/dal", - OutputFile.serviceImpl, path + "/java/io/github/pnoker/common/postgres/dal/impl", - OutputFile.xml, path + "/resources/mapping")) - ) - .templateEngine(new FreemarkerTemplateEngine()) - .strategyConfig(MybatisUtil::defaultStrategyConfig) - .strategyConfig(builder -> builder - .addInclude( - "dc3_point_value_string", - "dc3_point_value_bool", - "dc3_point_value_byte", - "dc3_point_value_int", - "dc3_point_value_long", - "dc3_point_value_float", - "dc3_point_value_double", - "dc3_point_value_decimal" - ) - ).execute(); - } -} \ No newline at end of file diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueBoolMapper.java b/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueBoolMapper.java deleted file mode 100644 index 2e0d0b848..000000000 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueBoolMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2016-present the IoT DC3 original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.github.pnoker.common.postgres.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import io.github.pnoker.common.postgres.entity.model.PointValueBoolDO; - -/** - *
- * 设备位号历史数据表(Boolean类型) Mapper 接口 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueBoolMapper extends BaseMapper- * 设备位号历史数据表(Byte类型) Mapper 接口 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueByteMapper extends BaseMapper- * 设备位号历史数据表(Decimal类型) Mapper 接口 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueDecimalMapper extends BaseMapper- * 设备位号历史数据表(Double类型) Mapper 接口 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueDoubleMapper extends BaseMapper- * 设备位号历史数据表(Float类型) Mapper 接口 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueFloatMapper extends BaseMapper- * 设备位号历史数据表(Integer类型) Mapper 接口 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueIntMapper extends BaseMapper- * 设备位号历史数据表(Long类型) Mapper 接口 - *
- * - * @author pnoker - * @version 2025.2.5 - * @since 2022.1.0 - */ -public interface PointValueLongMapper extends BaseMapper- * 设备位号历史数据表(String类型) 服务类 + * 设备位号历史数据表(默认数据表, String类型) 服务类 *
* * @author pnoker diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueManagerImpl.java b/dc3-common/dc3-common-data/src/main/java/io/github/pnoker/common/data/dal/impl/PointValueManagerImpl.java similarity index 75% rename from dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueManagerImpl.java rename to dc3-common/dc3-common-data/src/main/java/io/github/pnoker/common/data/dal/impl/PointValueManagerImpl.java index 9fb705774..35c98d5b7 100644 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/dal/impl/PointValueManagerImpl.java +++ b/dc3-common/dc3-common-data/src/main/java/io/github/pnoker/common/data/dal/impl/PointValueManagerImpl.java @@ -14,17 +14,17 @@ * limitations under the License. */ -package io.github.pnoker.common.postgres.dal.impl; +package io.github.pnoker.common.data.dal.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.github.pnoker.common.postgres.dal.PointValueManager; -import io.github.pnoker.common.postgres.entity.model.PointValueDO; -import io.github.pnoker.common.postgres.mapper.PointValueMapper; +import io.github.pnoker.common.data.dal.PointValueManager; +import io.github.pnoker.common.data.entity.model.PointValueDO; +import io.github.pnoker.common.data.mapper.PointValueMapper; import org.springframework.stereotype.Service; /** *- * 设备位号历史数据表(String类型) 服务实现类 + * 设备位号历史数据表(默认数据表, String类型) 服务实现类 *
* * @author pnoker diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDO.java b/dc3-common/dc3-common-data/src/main/java/io/github/pnoker/common/data/entity/model/PointValueDO.java similarity index 93% rename from dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDO.java rename to dc3-common/dc3-common-data/src/main/java/io/github/pnoker/common/data/entity/model/PointValueDO.java index 48355ea5d..14be92111 100644 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/entity/model/PointValueDO.java +++ b/dc3-common/dc3-common-data/src/main/java/io/github/pnoker/common/data/entity/model/PointValueDO.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.github.pnoker.common.postgres.entity.model; +package io.github.pnoker.common.data.entity.model; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; @@ -28,7 +28,7 @@ import java.time.LocalDateTime; /** *- * 设备位号历史数据表(String类型) + * 设备位号历史数据表(默认数据表, String类型) *
* * @author pnoker @@ -38,7 +38,7 @@ import java.time.LocalDateTime; @Getter @Setter @ToString -@TableName("dc3_point_value_string") +@TableName("dc3_point_value") public class PointValueDO implements Serializable { @Serial diff --git a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueMapper.java b/dc3-common/dc3-common-data/src/main/java/io/github/pnoker/common/data/mapper/PointValueMapper.java similarity index 82% rename from dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueMapper.java rename to dc3-common/dc3-common-data/src/main/java/io/github/pnoker/common/data/mapper/PointValueMapper.java index 7c11674fa..fea46b578 100644 --- a/dc3-common/dc3-common-data-postgres/src/main/java/io/github/pnoker/common/postgres/mapper/PointValueMapper.java +++ b/dc3-common/dc3-common-data/src/main/java/io/github/pnoker/common/data/mapper/PointValueMapper.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package io.github.pnoker.common.postgres.mapper; +package io.github.pnoker.common.data.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import io.github.pnoker.common.postgres.entity.model.PointValueDO; +import io.github.pnoker.common.data.entity.model.PointValueDO; /** *- * 设备位号历史数据表(String类型) Mapper 接口 + * 设备位号历史数据表(默认数据表, String类型) Mapper 接口 *
* * @author pnoker diff --git a/dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueMapper.xml b/dc3-common/dc3-common-data/src/main/resources/mapping/PointValueMapper.xml similarity index 91% rename from dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueMapper.xml rename to dc3-common/dc3-common-data/src/main/resources/mapping/PointValueMapper.xml index c99b406fe..2c2d2e398 100644 --- a/dc3-common/dc3-common-data-postgres/src/main/resources/mapping/PointValueMapper.xml +++ b/dc3-common/dc3-common-data/src/main/resources/mapping/PointValueMapper.xml @@ -16,6 +16,6 @@ --> -