Compare commits
No commits in common. "master_fei" and "master" have entirely different histories.
master_fei
...
master
42
README.md
42
README.md
|
@ -1,26 +1,26 @@
|
|||
## 系统模块
|
||||
|
||||
~~~
|
||||
com.etl
|
||||
├── etl-ui // 前端框架 [80]
|
||||
├── etl-gateway // 网关模块 [8080]
|
||||
├── etl-auth // 认证中心 [9200]
|
||||
├── etl-common // 通用模块
|
||||
│ └── etl-common-core // 核心模块
|
||||
│ └── etl-common-datascope // 权限范围
|
||||
│ └── etl-common-datasource // 多数据源
|
||||
│ └── etl-common-log // 日志记录
|
||||
│ └── etl-common-redis // 缓存服务
|
||||
│ └── etl-common-seata // 分布式事务
|
||||
│ └── etl-common-security // 安全模块
|
||||
│ └── etl-common-swagger // 系统接口
|
||||
│ └── etl-common-system // 系统基础
|
||||
├── etl-modules // 业务模块
|
||||
│ └── etl-system // 系统模块 [9201]
|
||||
│ └── etl-gen // 代码生成 [9202]
|
||||
│ └── etl-job // 定时任务 [9203]
|
||||
│ └── etl-file // 文件服务 [9300]
|
||||
├── etl-visual // 图形化管理模块
|
||||
│ └── etl-visual-monitor // 监控中心 [9100]
|
||||
com.muyu
|
||||
├── muyu-ui // 前端框架 [80]
|
||||
├── muyu-gateway // 网关模块 [8080]
|
||||
├── muyu-auth // 认证中心 [9200]
|
||||
├── muyu-common // 通用模块
|
||||
│ └── muyu-common-core // 核心模块
|
||||
│ └── muyu-common-datascope // 权限范围
|
||||
│ └── muyu-common-datasource // 多数据源
|
||||
│ └── muyu-common-log // 日志记录
|
||||
│ └── muyu-common-redis // 缓存服务
|
||||
│ └── muyu-common-seata // 分布式事务
|
||||
│ └── muyu-common-security // 安全模块
|
||||
│ └── muyu-common-swagger // 系统接口
|
||||
│ └── muyu-common-system // 系统基础
|
||||
├── muyu-modules // 业务模块
|
||||
│ └── muyu-system // 系统模块 [9201]
|
||||
│ └── muyu-gen // 代码生成 [9202]
|
||||
│ └── muyu-job // 定时任务 [9203]
|
||||
│ └── muyu-file // 文件服务 [9300]
|
||||
├── muyu-visual // 图形化管理模块
|
||||
│ └── muyu-visual-monitor // 监控中心 [9100]
|
||||
├──pom.xml // 公共依赖
|
||||
~~~
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Auth<74><68><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../etl-auth/target
|
||||
cd ../muyu-auth/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar etl-auth.jar
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-auth.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Gateway<61><79><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../etl-gateway/target
|
||||
cd ../muyu-gateway/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar etl-gateway.jar
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-gateway.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-File<6C><65><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../etl-modules/etl-file/target
|
||||
cd ../muyu-modules/muyu-file/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar etl-modules-file.jar
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-modules-file.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-Gen<65><6E><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../etl-modules/etl-gen/target
|
||||
cd ../muyu-modules/muyu-gen/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar etl-modules-gen.jar
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-modules-gen.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-Job<6F><62><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../etl-modules/etl-job/target
|
||||
cd ../muyu-modules/muyu-job/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar etl-modules-job.jar
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-modules-job.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Modules-System<65><6D><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../etl-modules/etl-system/target
|
||||
cd ../muyu-modules/muyu-system/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar etl-modules-system.jar
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-modules-system.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
|
@ -4,11 +4,11 @@ echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Monitor<6F><72><EFBFBD>̡<EFBFBD>
|
|||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../etl-visual/etl-monitor/target
|
||||
cd ../muyu-visual/muyu-monitor/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar etl-visual-monitor.jar
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar muyu-visual-monitor.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
|
@ -14,28 +14,28 @@ cp ../sql/ry_config_20220929.sql ./mysql/db
|
|||
|
||||
# copy html
|
||||
echo "begin copy html "
|
||||
cp -r ../etl-ui/dist/** ./nginx/html/dist
|
||||
cp -r ../muyu-ui/dist/** ./nginx/html/dist
|
||||
|
||||
|
||||
# copy jar
|
||||
echo "begin copy etl-gateway "
|
||||
cp ../etl-gateway/target/etl-gateway.jar ./etl/gateway/jar
|
||||
echo "begin copy muyu-gateway "
|
||||
cp ../muyu-gateway/target/muyu-gateway.jar ./muyu/gateway/jar
|
||||
|
||||
echo "begin copy etl-auth "
|
||||
cp ../etl-auth/target/etl-auth.jar ./etl/auth/jar
|
||||
echo "begin copy muyu-auth "
|
||||
cp ../muyu-auth/target/muyu-auth.jar ./muyu/auth/jar
|
||||
|
||||
echo "begin copy etl-visual "
|
||||
cp ../etl-visual/etl-monitor/target/etl-visual-monitor.jar ./etl/visual/monitor/jar
|
||||
echo "begin copy muyu-visual "
|
||||
cp ../muyu-visual/muyu-monitor/target/muyu-visual-monitor.jar ./muyu/visual/monitor/jar
|
||||
|
||||
echo "begin copy etl-modules-system "
|
||||
cp ../etl-modules/etl-system/target/etl-modules-system.jar ./etl/modules/system/jar
|
||||
echo "begin copy muyu-modules-system "
|
||||
cp ../muyu-modules/muyu-system/target/muyu-modules-system.jar ./muyu/modules/system/jar
|
||||
|
||||
echo "begin copy etl-modules-file "
|
||||
cp ../etl-modules/etl-file/target/etl-modules-file.jar ./etl/modules/file/jar
|
||||
echo "begin copy muyu-modules-file "
|
||||
cp ../muyu-modules/muyu-file/target/muyu-modules-file.jar ./muyu/modules/file/jar
|
||||
|
||||
echo "begin copy etl-modules-job "
|
||||
cp ../etl-modules/etl-job/target/etl-modules-job.jar ./etl/modules/job/jar
|
||||
echo "begin copy muyu-modules-job "
|
||||
cp ../muyu-modules/muyu-job/target/muyu-modules-job.jar ./muyu/modules/job/jar
|
||||
|
||||
echo "begin copy etl-modules-gen "
|
||||
cp ../etl-modules/etl-gen/target/etl-modules-gen.jar ./etl/modules/gen/jar
|
||||
echo "begin copy muyu-modules-gen "
|
||||
cp ../muyu-modules/muyu-gen/target/muyu-modules-gen.jar ./muyu/modules/gen/jar
|
||||
|
||||
|
|
|
@ -26,12 +26,12 @@ port(){
|
|||
|
||||
# 启动基础环境(必须)
|
||||
base(){
|
||||
docker-compose up -d etl-mysql etl-redis etl-nacos
|
||||
docker-compose up -d muyu-mysql muyu-redis muyu-nacos
|
||||
}
|
||||
|
||||
# 启动程序模块(必须)
|
||||
modules(){
|
||||
docker-compose up -d etl-nginx etl-gateway etl-auth etl-modules-system
|
||||
docker-compose up -d muyu-nginx muyu-gateway muyu-auth muyu-modules-system
|
||||
}
|
||||
|
||||
# 关闭所有环境/模块
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
version : '3.8'
|
||||
services:
|
||||
etl-nacos:
|
||||
container_name: etl-nacos
|
||||
muyu-nacos:
|
||||
container_name: muyu-nacos
|
||||
image: nacos/nacos-server
|
||||
build:
|
||||
context: ./nacos
|
||||
|
@ -15,9 +15,9 @@ services:
|
|||
- "9848:9848"
|
||||
- "9849:9849"
|
||||
depends_on:
|
||||
- etl-mysql
|
||||
etl-mysql:
|
||||
container_name: etl-mysql
|
||||
- muyu-mysql
|
||||
muyu-mysql:
|
||||
container_name: muyu-mysql
|
||||
image: mysql:5.7
|
||||
build:
|
||||
context: ./mysql
|
||||
|
@ -38,103 +38,103 @@ services:
|
|||
environment:
|
||||
MYSQL_DATABASE: 'ry-cloud'
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
etl-redis:
|
||||
container_name: etl-redis
|
||||
muyu-redis:
|
||||
container_name: muyu-redis
|
||||
image: redis
|
||||
build:
|
||||
context: ./redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- ./redis/conf/redis.conf:/home/etl/redis/redis.conf
|
||||
- ./redis/conf/redis.conf:/home/muyu/redis/redis.conf
|
||||
- ./redis/data:/data
|
||||
command: redis-server /home/etl/redis/redis.conf
|
||||
etl-nginx:
|
||||
container_name: etl-nginx
|
||||
command: redis-server /home/muyu/redis/redis.conf
|
||||
muyu-nginx:
|
||||
container_name: muyu-nginx
|
||||
image: nginx
|
||||
build:
|
||||
context: ./nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx/html/dist:/home/etl/projects/etl-ui
|
||||
- ./nginx/html/dist:/home/muyu/projects/muyu-ui
|
||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/logs:/var/log/nginx
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- etl-gateway
|
||||
- muyu-gateway
|
||||
links:
|
||||
- etl-gateway
|
||||
etl-gateway:
|
||||
container_name: etl-gateway
|
||||
- muyu-gateway
|
||||
muyu-gateway:
|
||||
container_name: muyu-gateway
|
||||
build:
|
||||
context: ./etl/gateway
|
||||
context: ./muyu/gateway
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
- etl-redis
|
||||
- muyu-redis
|
||||
links:
|
||||
- etl-redis
|
||||
etl-auth:
|
||||
container_name: etl-auth
|
||||
- muyu-redis
|
||||
muyu-auth:
|
||||
container_name: muyu-auth
|
||||
build:
|
||||
context: ./etl/auth
|
||||
context: ./muyu/auth
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9200:9200"
|
||||
depends_on:
|
||||
- etl-redis
|
||||
- muyu-redis
|
||||
links:
|
||||
- etl-redis
|
||||
etl-modules-system:
|
||||
container_name: etl-modules-system
|
||||
- muyu-redis
|
||||
muyu-modules-system:
|
||||
container_name: muyu-modules-system
|
||||
build:
|
||||
context: ./etl/modules/system
|
||||
context: ./muyu/modules/system
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9201:9201"
|
||||
depends_on:
|
||||
- etl-redis
|
||||
- etl-mysql
|
||||
- muyu-redis
|
||||
- muyu-mysql
|
||||
links:
|
||||
- etl-redis
|
||||
- etl-mysql
|
||||
etl-modules-gen:
|
||||
container_name: etl-modules-gen
|
||||
- muyu-redis
|
||||
- muyu-mysql
|
||||
muyu-modules-gen:
|
||||
container_name: muyu-modules-gen
|
||||
build:
|
||||
context: ./etl/modules/gen
|
||||
context: ./muyu/modules/gen
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9202:9202"
|
||||
depends_on:
|
||||
- etl-mysql
|
||||
- muyu-mysql
|
||||
links:
|
||||
- etl-mysql
|
||||
etl-modules-job:
|
||||
container_name: etl-modules-job
|
||||
- muyu-mysql
|
||||
muyu-modules-job:
|
||||
container_name: muyu-modules-job
|
||||
build:
|
||||
context: ./etl/modules/job
|
||||
context: ./muyu/modules/job
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9203:9203"
|
||||
depends_on:
|
||||
- etl-mysql
|
||||
- muyu-mysql
|
||||
links:
|
||||
- etl-mysql
|
||||
etl-modules-file:
|
||||
container_name: etl-modules-file
|
||||
- muyu-mysql
|
||||
muyu-modules-file:
|
||||
container_name: muyu-modules-file
|
||||
build:
|
||||
context: ./etl/modules/file
|
||||
context: ./muyu/modules/file
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./etl/uploadPath:/home/etl/uploadPath
|
||||
etl-visual-monitor:
|
||||
container_name: etl-visual-monitor
|
||||
- ./muyu/uploadPath:/home/muyu/uploadPath
|
||||
muyu-visual-monitor:
|
||||
container_name: muyu-visual-monitor
|
||||
build:
|
||||
context: ./etl/visual/monitor
|
||||
context: ./muyu/visual/monitor
|
||||
dockerfile: dockerfile
|
||||
ports:
|
||||
- "9100:9100"
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER etl
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/etl
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/etl
|
||||
# 指定路径
|
||||
WORKDIR /home/etl
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/etl-auth.jar /home/etl/etl-auth.jar
|
||||
# 启动认证服务
|
||||
ENTRYPOINT ["java","-jar","etl-auth.jar"]
|
|
@ -1,15 +0,0 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER etl
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/etl
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/etl
|
||||
# 指定路径
|
||||
WORKDIR /home/etl
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/etl-gateway.jar /home/etl/etl-gateway.jar
|
||||
# 启动网关服务
|
||||
ENTRYPOINT ["java","-jar","etl-gateway.jar"]
|
|
@ -1,15 +0,0 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER etl
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/etl
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/etl
|
||||
# 指定路径
|
||||
WORKDIR /home/etl
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/etl-modules-file.jar /home/etl/etl-modules-file.jar
|
||||
# 启动文件服务
|
||||
ENTRYPOINT ["java","-jar","etl-modules-file.jar"]
|
|
@ -1,15 +0,0 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER etl
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/etl
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/etl
|
||||
# 指定路径
|
||||
WORKDIR /home/etl
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/etl-modules-gen.jar /home/etl/etl-modules-gen.jar
|
||||
# 启动代码生成服务
|
||||
ENTRYPOINT ["java","-jar","etl-modules-gen.jar"]
|
|
@ -1,15 +0,0 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER etl
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/etl
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/etl
|
||||
# 指定路径
|
||||
WORKDIR /home/etl
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/etl-modules-job.jar /home/etl/etl-modules-job.jar
|
||||
# 启动定时任务服务
|
||||
ENTRYPOINT ["java","-jar","etl-modules-job.jar"]
|
|
@ -1,15 +0,0 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER etl
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/etl
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/etl
|
||||
# 指定路径
|
||||
WORKDIR /home/etl
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/etl-modules-system.jar /home/etl/etl-modules-system.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","etl-modules-system.jar"]
|
|
@ -1,15 +0,0 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER etl
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/etl
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/etl
|
||||
# 指定路径
|
||||
WORKDIR /home/etl
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/etl-visual-monitor.jar /home/etl/etl-visual-monitor.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","etl-visual-monitor.jar"]
|
|
@ -0,0 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER muyu
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/muyu
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/muyu
|
||||
# 指定路径
|
||||
WORKDIR /home/muyu
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/muyu-auth.jar /home/muyu/muyu-auth.jar
|
||||
# 启动认证服务
|
||||
ENTRYPOINT ["java","-jar","muyu-auth.jar"]
|
|
@ -0,0 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER muyu
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/muyu
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/muyu
|
||||
# 指定路径
|
||||
WORKDIR /home/muyu
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/muyu-gateway.jar /home/muyu/muyu-gateway.jar
|
||||
# 启动网关服务
|
||||
ENTRYPOINT ["java","-jar","muyu-gateway.jar"]
|
|
@ -0,0 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER muyu
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/muyu
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/muyu
|
||||
# 指定路径
|
||||
WORKDIR /home/muyu
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/muyu-modules-file.jar /home/muyu/muyu-modules-file.jar
|
||||
# 启动文件服务
|
||||
ENTRYPOINT ["java","-jar","muyu-modules-file.jar"]
|
|
@ -0,0 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER muyu
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/muyu
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/muyu
|
||||
# 指定路径
|
||||
WORKDIR /home/muyu
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/muyu-modules-gen.jar /home/muyu/muyu-modules-gen.jar
|
||||
# 启动代码生成服务
|
||||
ENTRYPOINT ["java","-jar","muyu-modules-gen.jar"]
|
|
@ -0,0 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER muyu
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/muyu
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/muyu
|
||||
# 指定路径
|
||||
WORKDIR /home/muyu
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/muyu-modules-job.jar /home/muyu/muyu-modules-job.jar
|
||||
# 启动定时任务服务
|
||||
ENTRYPOINT ["java","-jar","muyu-modules-job.jar"]
|
|
@ -0,0 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER muyu
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/muyu
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/muyu
|
||||
# 指定路径
|
||||
WORKDIR /home/muyu
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/muyu-modules-system.jar /home/muyu/muyu-modules-system.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","muyu-modules-system.jar"]
|
|
@ -0,0 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM openjdk:8-jre
|
||||
# author
|
||||
MAINTAINER muyu
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/muyu
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/muyu
|
||||
# 指定路径
|
||||
WORKDIR /home/muyu
|
||||
# 复制jar文件到路径
|
||||
COPY ./jar/muyu-visual-monitor.jar /home/muyu/muyu-visual-monitor.jar
|
||||
# 启动系统服务
|
||||
ENTRYPOINT ["java","-jar","muyu-visual-monitor.jar"]
|
|
@ -1,7 +1,7 @@
|
|||
# 基础镜像
|
||||
FROM mysql:5.7
|
||||
# author
|
||||
MAINTAINER etl
|
||||
MAINTAINER muyu
|
||||
|
||||
# 执行sql脚本
|
||||
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
spring.datasource.platform=mysql
|
||||
db.num=1
|
||||
db.url.0=jdbc:mysql://etl-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||
db.url.0=jdbc:mysql://muyu-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||
db.user=root
|
||||
db.password=password
|
||||
|
||||
|
@ -16,7 +16,7 @@ management.metrics.export.influx.enabled=false
|
|||
server.tomcat.accesslog.enabled=true
|
||||
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
||||
|
||||
server.tomcat.basedir=/home/etl/nacos/tomcat/logs
|
||||
server.tomcat.basedir=/home/muyu/nacos/tomcat/logs
|
||||
|
||||
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# 基础镜像
|
||||
FROM nacos/nacos-server
|
||||
# author
|
||||
MAINTAINER etl
|
||||
MAINTAINER muyu
|
||||
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
||||
|
|
|
@ -15,7 +15,7 @@ http {
|
|||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /home/etl/projects/etl-ui;
|
||||
root /home/muyu/projects/muyu-ui;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ http {
|
|||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://etl-gateway:8080/;
|
||||
proxy_pass http://muyu-gateway:8080/;
|
||||
}
|
||||
|
||||
# 避免actuator暴露
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM nginx
|
||||
# author
|
||||
MAINTAINER etl
|
||||
MAINTAINER muyu
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/etl/projects/etl-ui
|
||||
VOLUME /home/muyu/projects/muyu-ui
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/etl/projects/etl-ui
|
||||
RUN mkdir -p /home/muyu/projects/muyu-ui
|
||||
# 指定路径
|
||||
WORKDIR /home/etl/projects/etl-ui
|
||||
WORKDIR /home/muyu/projects/muyu-ui
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
# 复制html文件到路径
|
||||
COPY ./html/dist /home/etl/projects/etl-ui
|
||||
COPY ./html/dist /home/muyu/projects/muyu-ui
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# 基础镜像
|
||||
FROM redis
|
||||
# author
|
||||
MAINTAINER etl
|
||||
MAINTAINER muyu
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/etl/redis
|
||||
VOLUME /home/muyu/redis
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/etl/redis
|
||||
RUN mkdir -p /home/muyu/redis
|
||||
# 指定路径
|
||||
WORKDIR /home/etl/redis
|
||||
WORKDIR /home/muyu/redis
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/redis.conf /home/etl/redis/redis.conf
|
||||
COPY ./conf/redis.conf /home/muyu/redis/redis.conf
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml" />
|
||||
<springProperty scope="context" name="springAppName" source="Website may be available for web development ideas"/>
|
||||
<springProperty scope="context" name="serverPort" source="server.port"/>
|
||||
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
|
||||
<!--logstash的服务地址和端口,可以实际情况设置-->
|
||||
<destination>111.229.102.61:5044</destination>
|
||||
<!-- 日志输出编码 -->
|
||||
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder">
|
||||
<providers>
|
||||
<timestamp>
|
||||
<timeZone>UTC</timeZone>
|
||||
</timestamp>
|
||||
<pattern>
|
||||
<pattern>
|
||||
{
|
||||
<!--应用名称 -->
|
||||
"app": "${springAppName}_${serverPort}",
|
||||
<!--打印时间 -->
|
||||
"timestamp": "%d{yyyy-MM-dd HH:mm:ss.SSS}",
|
||||
<!--线程名称 -->
|
||||
"thread": "%thread",
|
||||
<!--日志级别 -->
|
||||
"level": "%level",
|
||||
<!--日志名称 -->
|
||||
"logger_name": "%logger",
|
||||
<!--日志信息 -->
|
||||
"message": "%msg",
|
||||
<!--日志堆栈 -->
|
||||
"stack_trace": "%exception"
|
||||
}
|
||||
</pattern>
|
||||
</pattern>
|
||||
</providers>
|
||||
</encoder>
|
||||
</appender>
|
||||
<!--定义日志文件的存储地址,使用绝对路径-->
|
||||
<property name="LOG_HOME" value="/Users/jianchenghou/log/elklog"/>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<fileNamePattern>${LOG_HOME}/${springAppName}-${serverPort}-%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<root level="INFO">
|
||||
<appender-ref ref="LOGSTASH" />
|
||||
<appender-ref ref="FILE" />
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</root>
|
||||
|
||||
|
||||
</configuration>
|
|
@ -1,33 +0,0 @@
|
|||
package com.etl.common.core.constant;
|
||||
|
||||
/**
|
||||
* 服务名称
|
||||
*
|
||||
* @author etl
|
||||
*/
|
||||
public class ServiceNameConstants {
|
||||
/**
|
||||
* 认证服务的serviceid
|
||||
*/
|
||||
public static final String AUTH_SERVICE = "etl-auth";
|
||||
|
||||
/**
|
||||
* 系统模块的serviceid
|
||||
*/
|
||||
public static final String SYSTEM_SERVICE = "etl-system";
|
||||
|
||||
/**
|
||||
* 文件服务的serviceid
|
||||
*/
|
||||
public static final String FILE_SERVICE = "etl-file";
|
||||
|
||||
/**
|
||||
* 数据源服务
|
||||
*/
|
||||
public static final String DATA_SOURCE_SERVICE = "etl-data-source";
|
||||
|
||||
/**
|
||||
* 数据规则引擎服务
|
||||
*/
|
||||
public static final String DATA_RULE_ENGINE_SERVICE = "etl-data-rule-engine";
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
com.etl.common.core.utils.SpringUtils
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>etl-common-data-standard</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-common-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,7 +0,0 @@
|
|||
package com.etl;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println ( "Hello world!" );
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
package com.etl.conmon.data.standard.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 数据模型
|
||||
* @author YunFei.Du
|
||||
* @date 14:16 2024/5/15
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class DataModel {
|
||||
|
||||
/**
|
||||
* 数据键
|
||||
*/
|
||||
private String key;
|
||||
|
||||
/**
|
||||
* 数据值
|
||||
*/
|
||||
private Object value;
|
||||
|
||||
/**
|
||||
* 源标准-枚举
|
||||
*/
|
||||
private String sourceType;
|
||||
|
||||
/**
|
||||
* 处理标准-枚举
|
||||
*/
|
||||
private String processType;
|
||||
|
||||
/**
|
||||
* 处理类型
|
||||
*/
|
||||
private Class<?> processClass;
|
||||
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
package com.etl.conmon.data.standard.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 一页
|
||||
* @author YunFei.Du
|
||||
* @date 14:17 2024/5/15
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class DataSetModel {
|
||||
|
||||
// [[DataModel,DataModel,DataModel],[DataModel,DataModel,DataModel]]
|
||||
|
||||
private DataSetModel[] dataSetModel = null;
|
||||
|
||||
private int setLength;
|
||||
|
||||
|
||||
public static DataSetModel build(int dataSetModelLength){
|
||||
return build ( new DataSetModel[dataSetModelLength] );
|
||||
}
|
||||
|
||||
public static DataSetModel build(DataSetModel[] dataSetModel){
|
||||
return DataSetModel.builder ()
|
||||
.dataSetModel(dataSetModel)
|
||||
.setLength ( dataSetModel.length )
|
||||
.build ();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package com.etl.conmon.data.standard.model;
|
||||
|
||||
/**
|
||||
* 数据标准
|
||||
* @author YunFei.Du
|
||||
* @date 14:17 2024/5/15
|
||||
*/
|
||||
public interface DataStandard {
|
||||
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
package com.etl.conmon.data.standard.model;
|
||||
|
||||
import com.etl.conmon.data.standard.utils.EtlUtils;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.function.IntFunction;
|
||||
|
||||
/**
|
||||
* 记录模型
|
||||
* @author YunFei.Du
|
||||
* @date 14:17 2024/5/15
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RecordModel {
|
||||
// [DataModel,DataModel,DataModel]
|
||||
|
||||
/**
|
||||
* 指定key主键 ([] 比 集合 高级)
|
||||
*/
|
||||
private String[] keys;
|
||||
|
||||
/**
|
||||
* 主键数据
|
||||
*/
|
||||
private DataModel[] keyForValue;
|
||||
/**
|
||||
* 单条记录 由 多个模型组成
|
||||
*/
|
||||
private DataModel[] dataModelArr = null;
|
||||
|
||||
/**
|
||||
* 记录长度
|
||||
*/
|
||||
private int recodeLength;
|
||||
|
||||
/**
|
||||
* 构建一个RecordModel实例。
|
||||
* 该方法是build(int dataModelLength, String[] keys)的重载版本,提供了一个便捷的方式来创建RecordModel实例,
|
||||
* 其中数据模型数组的长度由dataModelLength指定,键数组由keys指定。
|
||||
*
|
||||
* @param dataModelLength 数据模型数组的长度。表示RecordModel中数据模型的数量。
|
||||
* @param keys 与数据模型相关联的键数组。这些键用于在RecordModel中标识和访问数据模型。
|
||||
* @return 返回一个构建好的RecordModel实例,其中包含指定数量的数据模型,并且每个数据模型都与一个键相关联。
|
||||
*/
|
||||
public static RecordModel build(int dataModelLength,String[] keys){
|
||||
// 使用提供的数据模型长度和键数组来构建RecordModel
|
||||
return build ( new DataModel[dataModelLength] , keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据给定的数据模型数组和键数组构建一个记录模型。
|
||||
*
|
||||
* @param dataModelArr 数据模型数组,包含了一系列的数据模型实例。
|
||||
* @param keys 键数组,用于在数据模型中筛选特定的记录。
|
||||
* @return 返回一个构建好的记录模型实例,该实例包含了指定的数据显示和键值对应关系。
|
||||
*/
|
||||
public static RecordModel build(DataModel[] dataModelArr, String[] keys){
|
||||
return RecordModel.builder()
|
||||
.dataModelArr ( dataModelArr )
|
||||
.recodeLength ( dataModelArr.length )
|
||||
.keys( keys)
|
||||
// 筛选数据模型数组中键值匹配给定键数组的元素,并将其设置为keyForValue
|
||||
.keyForValue(
|
||||
Arrays.stream (dataModelArr).filter ( dataModel -> EtlUtils.valAsArr ( keys , dataModel.getKey () ) )
|
||||
.toArray ( value -> new DataModel[0] )
|
||||
)
|
||||
.build ();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package com.etl.conmon.data.standard.utils;
|
||||
|
||||
/**
|
||||
* @ClassName EtlUtils
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/15 14:28
|
||||
*/
|
||||
|
||||
public class EtlUtils {
|
||||
|
||||
public static boolean valAsArr(String[] keys,String key ){
|
||||
for (String s : keys) {
|
||||
if (s.equals ( key )){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
com.etl.common.datascope.aspect.DataScopeAspect
|
|
@ -1,2 +0,0 @@
|
|||
com.etl.common.log.service.AsyncLogService
|
||||
com.etl.common.log.aspect.LogAspect
|
|
@ -1,2 +0,0 @@
|
|||
com.etl.common.redis.configure.RedisConfig
|
||||
com.etl.common.redis.service.RedisService
|
|
@ -1,5 +0,0 @@
|
|||
com.etl.common.security.config.WebMvcConfig
|
||||
com.etl.common.security.service.TokenService
|
||||
com.etl.common.security.aspect.PreAuthorizeAspect
|
||||
com.etl.common.security.aspect.InnerAuthAspect
|
||||
com.etl.common.security.handler.GlobalExceptionHandler
|
|
@ -1,3 +0,0 @@
|
|||
# com.etl.common.swagger.config.SwaggerAutoConfiguration
|
||||
# com.etl.common.swagger.config.SwaggerWebConfiguration
|
||||
# com.etl.common.swagger.config.SwaggerBeanPostProcessor
|
|
@ -1,3 +0,0 @@
|
|||
com.etl.common.system.remote.factory.RemoteUserFallbackFactory
|
||||
com.etl.common.system.remote.factory.RemoteLogFallbackFactory
|
||||
com.etl.common.system.remote.factory.RemoteFileFallbackFactory
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-cloud</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<modules>
|
||||
<module>etl-common-log</module>
|
||||
<module>etl-common-core</module>
|
||||
<module>etl-common-redis</module>
|
||||
<module>etl-common-seata</module>
|
||||
<module>etl-common-swagger</module>
|
||||
<module>etl-common-security</module>
|
||||
<module>etl-common-datascope</module>
|
||||
<module>etl-common-datasource</module>
|
||||
<module>etl-common-system</module>
|
||||
<module>etl-common-data-standard</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>etl-common</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<description>
|
||||
etl-common通用模块
|
||||
</description>
|
||||
|
||||
</project>
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-data-source</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>etl-data-source-client</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-data-source-remote</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,15 +0,0 @@
|
|||
package com.etl.data.client.config;
|
||||
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 数据接入客户端配置
|
||||
* @author YunFei.Du
|
||||
* @date 21:34 2024/5/8
|
||||
*/
|
||||
@Component
|
||||
@Import ( value = {DataAccessClientRunner.class})
|
||||
public class DataAccessClientConfig {
|
||||
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
package com.etl.data.client.config;
|
||||
import com.etl.data.source.remote.RemoteDataSourceService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据访问客户端运行程序
|
||||
*
|
||||
* @author YunFei.Du
|
||||
* @date 14:10 2024/5/10
|
||||
*/
|
||||
@Log4j2
|
||||
public class DataAccessClientRunner implements ApplicationRunner {
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private RemoteDataSourceService remoteDataSourceService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
|
||||
// List< DataSource > dataSourceList = remoteDataSourceService.getDataSourceList ( new DataSourceQueryReq ( ) ).getData ( ).getRows ( );
|
||||
// if (!dataSourceList.isEmpty ()){
|
||||
// ConnPoolManagementService.init ( dataSourceList );
|
||||
// try {
|
||||
// DruidPooledConnection druidPooledConnection = ConnPoolManagementService.get ( dataSourceList.get ( 0 ).getKey ( ) );
|
||||
//// Map< DruidPooledConnection, String > connToKey = ConnPoolManagementService.getConnToKey ( );
|
||||
//// log.info ( "connToKey:{}", druidPooledConnection );
|
||||
//
|
||||
//// JDBCConcreteClass jdbcConcreteClass = new JDBCConcreteClass ( );
|
||||
//// PreparedStatement preparedStatement = jdbcConcreteClass.getPreparedStatement ( connection, "select * from car" );
|
||||
//// ResultSetMetaData rsd = preparedStatement.getMetaData ( );
|
||||
//// for (int i = 1; i <= rsd.getColumnCount ( ); i++) {
|
||||
//// log.info ( "类型:{}", rsd.getColumnClassName ( i ) );
|
||||
//// }
|
||||
//
|
||||
// ConnPoolManagementService.returnConnection ( druidPooledConnection );
|
||||
// } catch (Exception e) {
|
||||
// log.error ( "数据访问客户端运行程序异常:{}", e.getMessage ( ) );
|
||||
// throw new RuntimeException ( e );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
package com.etl.data.client.connPool.pool;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.etl.common.core.exception.ServiceException;
|
||||
import com.etl.common.core.utils.StringUtils;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* 连接池上下文
|
||||
* @author YunFei.Du
|
||||
* @date 15:04 2024/5/15
|
||||
*/
|
||||
@Log4j2
|
||||
public class ConnPoolContext {
|
||||
|
||||
/**
|
||||
* 无参 其他不能构造
|
||||
*/
|
||||
private ConnPoolContext(){
|
||||
|
||||
}
|
||||
private final static ConcurrentHashMap<String, DruidDataSource> connPoolContext
|
||||
= new ConcurrentHashMap<>(16);
|
||||
|
||||
public static void setConnection(String key,DruidDataSource druidDataSource){
|
||||
if (connPoolContext.containsKey(key)){
|
||||
throw new ServiceException (
|
||||
StringUtils.format ( "连接池key:{} 已存在" )
|
||||
);
|
||||
}
|
||||
connPoolContext.put(key,druidDataSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过key获取连接池
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
public static DruidDataSource getConnection(String key){
|
||||
return connPoolContext.get ( key );
|
||||
}
|
||||
|
||||
public static void remove(String key){
|
||||
try (DruidDataSource druidDataSource = connPoolContext.remove ( key )) {
|
||||
druidDataSource.close ();
|
||||
}catch (RuntimeException e){
|
||||
log.warn ( "关闭连接池失败:[{}]-- [{}]", key,e.getMessage (),e );
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
package com.etl.data.client.connPool.service;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.pool.DruidPooledConnection;
|
||||
import com.etl.data.client.connPool.pool.ConnPoolContext;
|
||||
import com.etl.data.domain.DataSource;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Component;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.etl.data.client.connPool.pool.ConnPoolContext.getConnection;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName ConnPollManagementService
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/15 15:14
|
||||
*/
|
||||
@Component
|
||||
@Log4j2
|
||||
public class ConnPoolManagementService {
|
||||
|
||||
private final static ThreadLocal< Map<DruidPooledConnection,String> > connToKey
|
||||
= new ThreadLocal<> ( );
|
||||
|
||||
public static Map<DruidPooledConnection,String> getConnToKey() {
|
||||
Map<DruidPooledConnection,String> dataMap=connToKey.get ();
|
||||
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
public static void init(List< DataSource> dataSourceList) {
|
||||
for (DataSource dataSource : dataSourceList) {
|
||||
createPool ( dataSource );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
public static void createPool(DataSource dataSource){
|
||||
DruidDataSource druidDataSource = new DruidDataSource ( );
|
||||
druidDataSource.setUsername ( dataSource.getUsername ( ) );
|
||||
druidDataSource.setPassword ( dataSource.getPassword ( ) );
|
||||
druidDataSource.setUrl ( "jdbc:mysql://" + dataSource.getHost ( ) + ":" + dataSource.getPort ( ) + "/" + dataSource.getDatabaseName ( ) );
|
||||
druidDataSource.setDriverClassName ( dataSource.getJdbcDriver ( ) );
|
||||
// 设置初始化连接数和最小空闲连接数
|
||||
druidDataSource.setInitialSize ( Integer.valueOf ( dataSource.getInitNum ( ) ) );
|
||||
druidDataSource.setMinIdle ( Integer.valueOf ( dataSource.getInitNum ( ) ) );
|
||||
// 设置最大活动连接数
|
||||
druidDataSource.setMaxActive ( Integer.valueOf ( dataSource.getMaxNum ( ) ) );
|
||||
|
||||
ConnPoolContext.setConnection ( dataSource.getKey (), druidDataSource );
|
||||
try {
|
||||
druidDataSource.init ();
|
||||
} catch (SQLException e) {
|
||||
log.error ( "新增数据源失败" );
|
||||
throw new RuntimeException ( e );
|
||||
}
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取
|
||||
*/
|
||||
public static DruidPooledConnection get(DataSource dataSource){
|
||||
return get ( dataSource.getKey () );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取
|
||||
*/
|
||||
public static DruidPooledConnection get(String key){
|
||||
DruidPooledConnection connection=null;
|
||||
DruidDataSource druidDataSource = getConnection (key );
|
||||
try {
|
||||
connection = druidDataSource.getConnection ( );
|
||||
return connection;
|
||||
} catch (SQLException e) {
|
||||
log.warn ( "获取连接异常:[{}] - [{}]",e.getMessage (),e );
|
||||
throw new RuntimeException ( e );
|
||||
}finally {
|
||||
getConnToKey ().put ( connection,key );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放
|
||||
* @param connection
|
||||
*/
|
||||
public static void returnConnection(DruidPooledConnection connection) {
|
||||
try {
|
||||
connection.close ();
|
||||
} catch (SQLException e) {
|
||||
log.warn ( "获取连接异常:[{}] - [{}]",getConnToKey().get ( connection ),e.getMessage () );
|
||||
throw new RuntimeException ( e );
|
||||
}finally {
|
||||
getConnToKey ().remove ( connection );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void remove(DataSource dataSource) {
|
||||
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
package com.etl.data.client.jdbcUtils;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
|
||||
/**
|
||||
* jdbc抽象类
|
||||
* @author YunFei.Du
|
||||
* @date 15:34 2024/5/14
|
||||
*/
|
||||
|
||||
@Component
|
||||
public abstract class JDBCAbstractClass {
|
||||
|
||||
|
||||
public abstract PreparedStatement getPreparedStatement(Connection connection, String sql);
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package com.etl.data.client.jdbcUtils;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* jdbc实体类
|
||||
* @author YunFei.Du
|
||||
* @date 15:36 2024/5/14
|
||||
*/
|
||||
@Log4j2
|
||||
public class JDBCConcreteClass extends JDBCAbstractClass{
|
||||
@Override
|
||||
public PreparedStatement getPreparedStatement(Connection connection,String sql) {
|
||||
try {
|
||||
PreparedStatement preparedStatement = connection.prepareStatement ( sql );
|
||||
log.info ( "查询结果:" + preparedStatement );
|
||||
return preparedStatement;
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException ( e );
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
com.etl.data.client.config.DataAccessClientConfig
|
|
@ -1,42 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-data-source</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>etl-data-source-common</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-common-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.2.20</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.2.20</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-common-system</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,46 +0,0 @@
|
|||
package com.etl.data.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.etl.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
|
||||
/**
|
||||
* 资产认证
|
||||
* @author YunFei.Du
|
||||
* @date 15:30 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("asset_accredit")
|
||||
public class AssetAccredit extends BaseEntity
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/** 主键id */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 部门id */
|
||||
private Long deptId;
|
||||
|
||||
/** 数据表id */
|
||||
private Long dataAssetId;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package com.etl.data.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.etl.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资产模型
|
||||
* @author YunFei.Du
|
||||
* @date 10:26 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("asset_model")
|
||||
public class AssetModel extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 数据资产ID */
|
||||
private Long dataAssetId;
|
||||
|
||||
/** 字段名 */
|
||||
private String name;
|
||||
|
||||
/** 字段备注 */
|
||||
private String comment;
|
||||
|
||||
/** 是否主键 */
|
||||
private String isPrimaryKey;
|
||||
|
||||
/** 数据类型 */
|
||||
private String type;
|
||||
|
||||
/** 映射数据类型 */
|
||||
private String mappingType;
|
||||
|
||||
/** 长度 */
|
||||
private String length;
|
||||
|
||||
/** 小数位 */
|
||||
private String decimalPlaces;
|
||||
|
||||
/** 是否不可为空 */
|
||||
private String isNull;
|
||||
|
||||
/** 是否字典 */
|
||||
private String isDict;
|
||||
|
||||
/** 默认值 */
|
||||
private String defaultValue;
|
||||
|
||||
/** 字典key */
|
||||
private String dictKey;
|
||||
/** 字典id */
|
||||
private Long dictionaryId;
|
||||
|
||||
/** 字典信息 */
|
||||
@TableField(exist = false)
|
||||
private List<DictionaryInfo> dictionaryDataList;
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package com.etl.data.domain;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.etl.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 数据资产(数据表)
|
||||
* @author YunFei.Du
|
||||
* @date 10:06 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("data_asset")
|
||||
public class DataAsset extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 数据接入ID */
|
||||
private Long dataSourceId;
|
||||
|
||||
/** 表名称 */
|
||||
private String name;
|
||||
|
||||
/** 表备注 */
|
||||
private String nameAs;
|
||||
|
||||
/** 数据量 */
|
||||
private Integer dataTotal;
|
||||
|
||||
/** 资产模型 */
|
||||
private Integer fields;
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
package com.etl.data.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.etl.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
|
||||
/**
|
||||
* 数据源
|
||||
* @author YunFei.Du
|
||||
* @date 21:47 2024/4/25
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("data_source")
|
||||
public class DataSource extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 接入源名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 数据来源系统名称
|
||||
*/
|
||||
private String systemName;
|
||||
/**
|
||||
* 数据接入类型不能为空
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 主机地址
|
||||
*/
|
||||
private String host;
|
||||
/**
|
||||
* 主机ip端口
|
||||
*/
|
||||
private String port;
|
||||
/**
|
||||
* 数据库
|
||||
*/
|
||||
private String databaseName;
|
||||
/**
|
||||
* 用户
|
||||
*/
|
||||
private String username;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 数据连接参数
|
||||
*/
|
||||
private String connectionParam;
|
||||
/**
|
||||
* 初始连接数量
|
||||
*/
|
||||
private String initNum;
|
||||
/**
|
||||
* 最大连接数量
|
||||
*/
|
||||
private String maxNum;
|
||||
/**
|
||||
* 最大等待时间
|
||||
*/
|
||||
private String maxWaitTime;
|
||||
/**
|
||||
* 最大等待次数
|
||||
*/
|
||||
private String maxWaitSize;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 连接驱动
|
||||
*/
|
||||
private String jdbcDriver;
|
||||
/**
|
||||
* 模式名称
|
||||
*/
|
||||
private String modeName;
|
||||
|
||||
|
||||
public String getKey(){
|
||||
return this.name+"_"+this.systemName+"_"+this.id;
|
||||
}
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
package com.etl.data.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.etl.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 字典
|
||||
* @author YunFei.Du
|
||||
* @date 15:16 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("dictionary")
|
||||
public class Dictionary extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 逐渐
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 字典名称 */
|
||||
private String dictionaryName;
|
||||
|
||||
/** 字典key */
|
||||
private String dictionaryKey;
|
||||
|
||||
/** 数据源ID */
|
||||
private Long dataSourceId;
|
||||
|
||||
/** 字典数据集合 */
|
||||
@TableField(exist = false)
|
||||
private List<DictionaryInfo> dictionaryDataList;
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
package com.etl.data.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.etl.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 字典信息
|
||||
* @author YunFei.Du
|
||||
* @date 15:16 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("dictionary_data")
|
||||
public class DictionaryInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 字典表id
|
||||
*/
|
||||
private Long dictionaryId;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String label;
|
||||
/**
|
||||
* 值
|
||||
*/
|
||||
private String val;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
package com.etl.data.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.etl.common.core.annotation.Excel;
|
||||
import com.etl.common.core.web.domain.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 数据源授权
|
||||
* @author YunFei.Du
|
||||
* @date 15:26 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("source_accredit")
|
||||
public class SourceAccredit extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键id */
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 部门id */
|
||||
private Long deptId;
|
||||
|
||||
/** 数据源id */
|
||||
private Long dataSourceId;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package com.etl.data.domain.custom;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassName Statistics
|
||||
* @Description 描述
|
||||
* @Author YunFei Du
|
||||
* @Date 2024/4/23 20:43
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Statistics {
|
||||
private Long dataAsset;
|
||||
private Long assetModel;
|
||||
private Long dataModel;
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
package com.etl.data.domain.dataSource;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.etl.data.domain.DataSource;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 数据源连接池配置
|
||||
* @author YunFei.Du
|
||||
* @date 9:09 2024/5/14
|
||||
*/
|
||||
@Log4j2
|
||||
public class DataSourceConfig {
|
||||
|
||||
|
||||
private static HashMap<String,DruidDataSource> dataSourceMap= new HashMap<> ();
|
||||
|
||||
/**
|
||||
* 初始化数据库连接池
|
||||
* 初始化数据库连接池
|
||||
* @param dataSource 提供数据库连接配置信息的对象,包括用户名、密码、数据库地址、端口、数据库名称、JDBC驱动类名、初始化连接数和最大活动连接数等。
|
||||
*/
|
||||
public static void init(DataSource dataSource) {
|
||||
// 创建Druid数据源实例
|
||||
DruidDataSource druidDataSource = new DruidDataSource();
|
||||
druidDataSource.setUsername(dataSource.getUsername ());
|
||||
druidDataSource.setPassword(dataSource.getPassword());
|
||||
druidDataSource.setUrl ( "jdbc:mysql://"+dataSource.getHost ( )+":"+dataSource.getPort ( )+"/"+dataSource.getDatabaseName ( ) );
|
||||
druidDataSource.setDriverClassName ( dataSource.getJdbcDriver () );
|
||||
// 设置初始化连接数和最小空闲连接数
|
||||
druidDataSource.setInitialSize ( Integer.valueOf ( dataSource.getInitNum () ) );
|
||||
druidDataSource.setMinIdle ( Integer.valueOf ( dataSource.getInitNum () ) );
|
||||
// 设置最大活动连接数
|
||||
druidDataSource.setMaxActive ( Integer.valueOf ( dataSource.getMaxNum () ) );
|
||||
try {
|
||||
//初始化连接池
|
||||
druidDataSource.init();
|
||||
} catch (SQLException e) {
|
||||
// 如果初始化失败,记录错误信息
|
||||
log.error ( "初始化数据源失败" );
|
||||
}
|
||||
// 将初始化好的数据源实例添加到全局的dataSourceMap中,以便其他部分使用
|
||||
dataSourceMap.put(dataSource.getName ()+dataSource.getId(), druidDataSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取连接池信息
|
||||
* @param key
|
||||
*/
|
||||
public static void getNum(String key) {
|
||||
DruidDataSource druidDataSource = dataSourceMap.get ( key );
|
||||
log.info(key + "正在使用连接" + druidDataSource.getActiveCount () + "个,线程数量:" + druidDataSource.getPoolingCount () + "个");
|
||||
|
||||
}
|
||||
|
||||
public static Connection getConnection(String key) {
|
||||
|
||||
DruidDataSource druidDataSource = dataSourceMap.get ( key );
|
||||
if (druidDataSource != null){
|
||||
try {
|
||||
return druidDataSource.getConnection ( );
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException ( e );
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放连接
|
||||
* @param connection
|
||||
*/
|
||||
public static void close(Connection connection) {
|
||||
try {
|
||||
connection.close ();
|
||||
} catch (SQLException e) {
|
||||
log.error ( "释放连接失败" );
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package com.etl.data.domain.decoration;
|
||||
|
||||
import com.etl.data.domain.DataSource;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* @ClassName DataSourceDecoration
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/9 8:53
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class DataSourceDecoration {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 系统名称
|
||||
*/
|
||||
private String systemName;
|
||||
|
||||
/**
|
||||
* 数据源名称
|
||||
*/
|
||||
private String name;
|
||||
/** 连接驱动名称 */
|
||||
private String jdbcDriver;
|
||||
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
|
||||
private String type;
|
||||
|
||||
|
||||
public static DataSourceDecoration dataSourceBuild(DataSource dataSource) {
|
||||
return DataSourceDecoration.builder ()
|
||||
.id(dataSource.getId ())
|
||||
.name(dataSource.getName ())
|
||||
.systemName(dataSource.getSystemName ())
|
||||
.databaseName(dataSource.getDatabaseName ())
|
||||
.type("dataSource")
|
||||
.build ();
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package com.etl.data.domain.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 认证模型
|
||||
* @author YunFei.Du
|
||||
* @date 15:58 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AccreditModel {
|
||||
private List<Long> userAccreditModelIds;
|
||||
private List<Long> deptAccreditModelIds;
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
package com.etl.data.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资产认证要求
|
||||
* @author YunFei.Du
|
||||
* @date 16:13 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class AssetAccreditReq {
|
||||
private List<Long> deptIds;
|
||||
private Long userId;
|
||||
private Long dataAssetId;
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
package com.etl.data.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 数据源查询请求
|
||||
* @author YunFei.Du
|
||||
* @date 14:55 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class DataSourceQueryReq {
|
||||
private Integer pageNum=1;
|
||||
|
||||
private Integer pageSize=10;
|
||||
|
||||
/**
|
||||
* 数据源名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 数据来源名称
|
||||
* */
|
||||
private String systemName;
|
||||
|
||||
/**
|
||||
* 数据库名称
|
||||
*/
|
||||
private String databaseName;
|
||||
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
package com.etl.data.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName SourceAccreditReq
|
||||
* @Description 描述
|
||||
* @Author YunFei Du
|
||||
* @Date 2024/4/26 15:19
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class SourceAccreditReq {
|
||||
private List<Long> deptIds;
|
||||
private Long userId;
|
||||
private Long dataSourceId;
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
package com.etl.data.domain.resp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
/**
|
||||
* 数据源拼接参数
|
||||
* @author YunFei.Du
|
||||
* @date 14:55 2024/5/1
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class DataSourceSpliceParam {
|
||||
|
||||
private String name;
|
||||
|
||||
private String val;
|
||||
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-data-source</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>etl-data-source-remote</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-openfeign-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-rule-engine-common</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-common-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-data-source-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,21 +0,0 @@
|
|||
package com.etl.data.source.remote;
|
||||
|
||||
import com.etl.common.core.constant.ServiceNameConstants;
|
||||
import com.etl.data.source.remote.factory.AssetModelFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
|
||||
/**
|
||||
* @ClassName RemoteAssetModelService
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/13 15:08
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "RemoteAssetModelService",
|
||||
value = ServiceNameConstants.DATA_SOURCE_SERVICE,
|
||||
fallbackFactory = AssetModelFactory.class,
|
||||
path = "/model"
|
||||
)
|
||||
public interface RemoteAssetModelService {
|
||||
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
package com.etl.data.source.remote;
|
||||
|
||||
import com.etl.common.core.constant.ServiceNameConstants;
|
||||
import com.etl.common.core.domain.Result;
|
||||
import com.etl.common.core.web.page.TableDataInfo;
|
||||
import com.etl.data.domain.DataSource;
|
||||
import com.etl.data.domain.req.DataSourceQueryReq;
|
||||
import com.etl.data.source.remote.factory.DataSourceFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 远程数据源服务
|
||||
* @author YunFei.Du
|
||||
* @date 14:09 2024/5/10
|
||||
*/
|
||||
@FeignClient(
|
||||
contextId = "RemoteDataAccess",
|
||||
value = ServiceNameConstants.DATA_SOURCE_SERVICE,
|
||||
fallbackFactory = DataSourceFactory.class,
|
||||
path = "/source"
|
||||
)
|
||||
public interface RemoteDataSourceService {
|
||||
@PostMapping("/list")
|
||||
public Result< TableDataInfo< DataSource > > getDataSourceList (@RequestBody DataSourceQueryReq req);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package com.etl.data.source.remote.factory;
|
||||
|
||||
import com.etl.data.source.remote.RemoteAssetModelService;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
|
||||
/**
|
||||
* @ClassName AssetModelFactory
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/13 15:07
|
||||
*/
|
||||
public class AssetModelFactory implements FallbackFactory< RemoteAssetModelService > {
|
||||
@Override
|
||||
public RemoteAssetModelService create(Throwable cause) {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package com.etl.data.source.remote.factory;
|
||||
|
||||
import com.etl.common.core.domain.Result;
|
||||
import com.etl.common.core.web.page.TableDataInfo;
|
||||
import com.etl.data.domain.DataSource;
|
||||
import com.etl.data.domain.req.DataSourceQueryReq;
|
||||
import com.etl.data.source.remote.RemoteDataSourceService;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
|
||||
/**
|
||||
* 数据源熔断
|
||||
* @author YunFei.Du
|
||||
* @date 14:10 2024/5/10
|
||||
*/
|
||||
public class DataSourceFactory implements FallbackFactory< RemoteDataSourceService > {
|
||||
@Override
|
||||
public RemoteDataSourceService create(Throwable cause) {
|
||||
return new RemoteDataSourceService (){
|
||||
@Override
|
||||
public Result< TableDataInfo< DataSource > > getDataSourceList(DataSourceQueryReq req) {
|
||||
return Result.error ( new TableDataInfo<DataSource> ());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
com.etl.data.source.remote.factory.DataSourceFactory
|
|
@ -1,150 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-data-source</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>etl-data-source-server</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.logstash.logback</groupId>
|
||||
<artifactId>logstash-logback-encoder</artifactId>
|
||||
<version>6.6</version>
|
||||
</dependency>
|
||||
<!-- Spring Cloud Sleuth -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-sleuth</artifactId>
|
||||
</dependency>
|
||||
<!-- Spring Cloud zipkin -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-zipkin</artifactId>
|
||||
<version>2.2.8.RELEASE</version>
|
||||
</dependency>
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Sentinel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot Actuator -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- etl Common DataSource -->
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-common-datasource</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- etl Common DataScope -->
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-common-datascope</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- etl Common Log -->
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- etl Common Swagger -->
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-common-swagger</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- ETL模块 公共依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-data-source-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- ETL模块 远程调用 依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-data-source-remote</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 添加 PostgreSQL JDBC 驱动 -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.5.0</version> <!-- 使用当前最新稳定版本 -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.etl</groupId>
|
||||
<artifactId>etl-data-source-client</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 加入maven deploy插件,当在deploy时,忽略些model-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -1,26 +0,0 @@
|
|||
package com.etl.data;
|
||||
|
||||
import com.etl.common.security.annotation.EnableCustomConfig;
|
||||
import com.etl.common.security.annotation.EnableMyFeignClients;
|
||||
import com.etl.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* 数据源模块
|
||||
*
|
||||
* @author YunFei
|
||||
*/
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
@EnableMyFeignClients
|
||||
@SpringBootApplication
|
||||
@EnableTransactionManagement
|
||||
@MapperScan("com.etl.data.mapper")
|
||||
public class ETLDataSourceApplication {
|
||||
public static void main (String[] args) {
|
||||
SpringApplication.run(ETLDataSourceApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package com.etl.data.config;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.amqp.rabbit.connection.CorrelationData;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* 消息发送确认配置
|
||||
* 消息发送到交换机的回调
|
||||
*/
|
||||
@Component
|
||||
@Log4j2
|
||||
public class ConfirmCallbackConfig implements RabbitTemplate.ConfirmCallback {
|
||||
|
||||
@Autowired
|
||||
private RabbitTemplate rabbitTemplate;
|
||||
|
||||
/**
|
||||
* @PostContruct是spring框架的注解,在⽅法上加该注解会在项⽬启动的时候执⾏该⽅法,也可以理解为在spring容器初始化的时候执
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
rabbitTemplate.setConfirmCallback(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 交换机不管是否收到消息的一个回调方法
|
||||
*
|
||||
* @param correlationData 消息相关数据
|
||||
* @param ack 交换机是否收到消息
|
||||
* @param cause 失败原因
|
||||
*/
|
||||
@Override
|
||||
public void confirm(CorrelationData correlationData, boolean ack, String cause) {
|
||||
if (ack) {
|
||||
// 消息投递到broker 的状态,true表示成功
|
||||
log.info("消息已经成功发送到交换机");
|
||||
} else {
|
||||
// String exchange = correlationData.getReturned().getExchange();
|
||||
// String message = correlationData.getReturned().getMessage().getBody().toString();
|
||||
// 发送异常
|
||||
log.error("消息发送到交换机:失败,原因是:{}", cause);
|
||||
// TODO 可以把异常信息 以及 消息的内容直接添加到 MYSQL
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
package com.etl.data.config;
|
||||
|
||||
import org.springframework.amqp.core.FanoutExchange;
|
||||
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
|
||||
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
|
||||
import org.springframework.amqp.rabbit.core.RabbitAdmin;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* rabbitAdmin 配置类 创建RabbitAdmin 放到Spring容器中
|
||||
*/
|
||||
@Configuration
|
||||
public class RabbitAdminConfig {
|
||||
|
||||
public static final String DATA_SOURCE_EXCHANGE = "data_source_exchange";
|
||||
public static final String RULE_ENGINE_EXCHANGE = "rule_engine_exchange";
|
||||
|
||||
@Value("${spring.rabbitmq.host}")
|
||||
private String host;
|
||||
@Value("${spring.rabbitmq.username}")
|
||||
private String username;
|
||||
@Value("${spring.rabbitmq.password}")
|
||||
private String password;
|
||||
@Value("${spring.rabbitmq.virtualhost}")
|
||||
private String virtualhost;
|
||||
|
||||
/**
|
||||
* 构建连接工厂
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public ConnectionFactory connectionFactory() {
|
||||
CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
|
||||
connectionFactory.setAddresses(host);
|
||||
connectionFactory.setUsername(username);
|
||||
connectionFactory.setPassword(password);
|
||||
connectionFactory.setVirtualHost(virtualhost);
|
||||
// 配置发送确认回调时,次配置必须配置,否则即使在RabbitTemplate配置了ConfirmCallback也不会生效
|
||||
connectionFactory.setPublisherConfirmType(CachingConnectionFactory.ConfirmType.CORRELATED);
|
||||
connectionFactory.setPublisherReturns(true);
|
||||
return connectionFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建 RabbitAdmin 管理 RabbitMQ 操作 队列以及交换机
|
||||
* @param connectionFactory
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public RabbitAdmin rabbitAdmin(ConnectionFactory connectionFactory) {
|
||||
RabbitAdmin rabbitAdmin = new RabbitAdmin(connectionFactory);
|
||||
rabbitAdmin.setAutoStartup(true);
|
||||
//创建交换机
|
||||
FanoutExchange dataFanoutExchange = new FanoutExchange(DATA_SOURCE_EXCHANGE, true, true);
|
||||
//声明交换机
|
||||
rabbitAdmin.declareExchange(dataFanoutExchange);
|
||||
return rabbitAdmin;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
package com.etl.data.config;
|
||||
|
||||
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
|
||||
import org.springframework.amqp.support.converter.MessageConverter;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class RabbitmqConfig {
|
||||
// 消息转换配置
|
||||
@Bean
|
||||
public MessageConverter jsonMessageConverter(){
|
||||
return new Jackson2JsonMessageConverter();
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
package com.etl.data.config;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.amqp.core.ReturnedMessage;
|
||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* 消息发送到队列的确认
|
||||
*/
|
||||
@Component
|
||||
@Log4j2
|
||||
public class ReturnCallbackConfig implements RabbitTemplate.ReturnsCallback {
|
||||
|
||||
@Autowired
|
||||
private RabbitTemplate rabbitTemplate;
|
||||
|
||||
/**
|
||||
* @PostContruct是spring框架的注解,在⽅法上加该注解会在项⽬启动的时候执⾏该⽅法,也可以理解为在spring容器初始化的时候执
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
rabbitTemplate.setReturnsCallback(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息发送失败 则会执行这个方法
|
||||
*
|
||||
* @param returnedMessage the returned message and metadata.
|
||||
*/
|
||||
@Override
|
||||
public void returnedMessage(ReturnedMessage returnedMessage) {
|
||||
log.error("消息:{},被交换机:{} 回退!退回原因为:{}",
|
||||
returnedMessage.getMessage().toString(), returnedMessage.getExchange(), returnedMessage.getReplyText());
|
||||
// TODO 回退了所有的信息,可做补偿机制
|
||||
}
|
||||
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package com.etl.data.controller;
|
||||
|
||||
import com.etl.common.core.domain.Result;
|
||||
import com.etl.data.domain.req.AssetAccreditReq;
|
||||
import com.etl.data.service.AssetAccreditService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName AssetAccreditController
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/1 15:48
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping( "/assetAccredit")
|
||||
public class AssetAccreditController {
|
||||
@Autowired
|
||||
private AssetAccreditService assetAccreditService;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据表id获取授权信息
|
||||
*/
|
||||
@GetMapping(value = "/GetAssetAccreditByDataAssetId")
|
||||
public Result getAssetAccreditByDataAssetId(@RequestParam("id") Long id)
|
||||
{
|
||||
return assetAccreditService.getAssetAccreditByDataAssetId(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping()
|
||||
public Result assetAccredit(@RequestBody AssetAccreditReq assetAccreditReq){
|
||||
return assetAccreditService.insertAssetAccredit(assetAccreditReq);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 授权删除
|
||||
*/
|
||||
|
||||
@PostMapping("/DeleteAssetAccreditByAssetIds")
|
||||
public Result deleteSourceAccreditBySourceIds(@RequestBody AssetAccreditReq assetAccreditReq)
|
||||
{
|
||||
return assetAccreditService.deleteAssetAccreditByAssetIds(assetAccreditReq);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
package com.etl.data.controller;
|
||||
|
||||
import com.etl.common.core.domain.Result;
|
||||
import com.etl.data.domain.AssetModel;
|
||||
import com.etl.data.service.AssetModelService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @ClassName AssetModelController
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/2 9:38
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping( "/model")
|
||||
public class AssetModelController {
|
||||
@Autowired
|
||||
private AssetModelService assetModelService;
|
||||
|
||||
@PostMapping("UpdateAssetModel")
|
||||
public Result updateAssetModel(AssetModel assetModel) {
|
||||
return assetModelService.updateAssetModel(assetModel);
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
package com.etl.data.controller;
|
||||
|
||||
import com.etl.common.core.domain.Result;
|
||||
import com.etl.data.service.DataAssetService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @ClassName DataAsset
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/2 9:21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/asset")
|
||||
public class DataAssetController {
|
||||
@Autowired
|
||||
private DataAssetService dataAssetService;
|
||||
}
|
|
@ -1,153 +0,0 @@
|
|||
package com.etl.data.controller;
|
||||
|
||||
import com.etl.common.core.domain.Result;
|
||||
import com.etl.common.core.web.controller.BaseController;
|
||||
import com.etl.common.core.web.page.TableDataInfo;
|
||||
import com.etl.data.domain.DataAsset;
|
||||
import com.etl.data.domain.DataSource;
|
||||
import com.etl.data.domain.decoration.DataSourceDecoration;
|
||||
import com.etl.data.domain.req.DataSourceQueryReq;
|
||||
import com.etl.data.service.DataSourceService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 数据源 dataAccess
|
||||
* @author YunFei.Du
|
||||
* @date 21:47 2024/4/25
|
||||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/source")
|
||||
public class DataSourceController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private DataSourceService dataSourceService;
|
||||
|
||||
public static ThreadLocal< String > local = new ThreadLocal<> ( );
|
||||
/**
|
||||
* 查询数据源列表
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public Result< TableDataInfo<DataSource> > getDataSourceList (@RequestBody DataSourceQueryReq req) {
|
||||
startPage();
|
||||
log.info ( "adsghssafghjhghdfsahgh" );
|
||||
local.set ( "asdf" );
|
||||
List<DataSource> list = dataSourceService.selectDataSourceList(req);
|
||||
return getDataAsset (list);
|
||||
}
|
||||
|
||||
@GetMapping("/getList")
|
||||
public List< DataSourceDecoration > getList () {
|
||||
List<DataSourceDecoration> list = dataSourceService.getList();
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 编辑数据源(添加/修改)
|
||||
* @param dataSource
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/editDataSource")
|
||||
public Result editDataSource(@RequestBody DataSource dataSource){
|
||||
return dataSourceService.editDataSource(dataSource);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@GetMapping("getDataSourceById")
|
||||
public Result getDataSourceById(@RequestParam("id") Long id) {
|
||||
DataSource dataSource = dataSourceService.getById(id);
|
||||
return Result.success(dataSource);
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("handleDelete/{id}")
|
||||
public Result handleDeleteByIds(@PathVariable Long id){
|
||||
return dataSourceService.handleDeleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("deleteInBulk/{ids}")
|
||||
public Result deleteInBulk(@PathVariable Long[] ids){
|
||||
return dataSourceService.deleteInBulk(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试连接
|
||||
* @param dataSource
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/TestConnection")
|
||||
public Result testConnect(@RequestBody DataSource dataSource){
|
||||
return dataSourceService.testConnect(dataSource)?Result.success():Result.error();
|
||||
}
|
||||
|
||||
/**
|
||||
// 同步数据
|
||||
* @param dataSource
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/SynchronousData")
|
||||
public Result dataSynchronization(@RequestBody DataSource dataSource){
|
||||
return dataSourceService.dataSynchronization(dataSource);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 数据资产列表根据数据源id
|
||||
* @param dataSource
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/DataAssetList")
|
||||
public Result<List<DataAsset>> dataAssetListByDataSourceId(@RequestBody DataSource dataSource){
|
||||
return dataSourceService.dataAssetListByDataSourceId(dataSource);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 模型列表根据数据资产id
|
||||
* @param dataAsset
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/AssetModelList")
|
||||
public Result assetModelListByDataAssetId(@RequestBody DataAsset dataAsset)
|
||||
{
|
||||
return dataSourceService.assetModelListByDataAssetId(dataAsset.getId ());
|
||||
}
|
||||
|
||||
/**
|
||||
* 模型结构
|
||||
* @param dataSource
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/StructureList")
|
||||
public Result structureList(@RequestBody DataSource dataSource)
|
||||
{
|
||||
return dataSourceService.structureList(dataSource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/Statistics")
|
||||
public Result statistics(){
|
||||
return dataSourceService.statistics();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
package com.etl.data.controller;
|
||||
|
||||
import com.etl.common.core.domain.Result;
|
||||
import com.etl.data.domain.Dictionary;
|
||||
import com.etl.data.service.DictionaryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import static com.etl.common.core.domain.Result.success;
|
||||
|
||||
/**
|
||||
* @ClassName DictionaryController
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/2 9:18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping( "/dictionary")
|
||||
public class DictionaryController {
|
||||
@Autowired
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@PostMapping("insert")
|
||||
public Result insert(Dictionary dictionary){
|
||||
return dictionaryService.insert(dictionary);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据数据源id获取字典详细信息
|
||||
*/
|
||||
@GetMapping(value = "/GetDictionaryList")
|
||||
public Result getDictionaryList(@RequestParam("dataSourceId") Long dataSourceId){
|
||||
return dictionaryService.getDictionaryList(dataSourceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据key删除字典详细信息
|
||||
*/
|
||||
@GetMapping(value = "/DeleteDictionary")
|
||||
public Result deleteDictionary(@RequestParam("id") Long id){
|
||||
return dictionaryService.deleteDictionary(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package com.etl.data.controller;
|
||||
|
||||
import com.etl.common.core.domain.Result;
|
||||
import com.etl.data.domain.DictionaryInfo;
|
||||
import com.etl.data.service.DictionaryInfoService;
|
||||
import com.etl.data.service.DictionaryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @ClassName DictionaryController
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/2 9:18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping( "/data")
|
||||
public class DictionaryInfoController {
|
||||
@Autowired
|
||||
private DictionaryInfoService dictionaryInfoService;
|
||||
|
||||
|
||||
@PostMapping("/insert")
|
||||
public Result< DictionaryInfo > insert(@RequestBody DictionaryInfo dictionaryInfo) {
|
||||
return dictionaryInfoService.save(dictionaryInfo) ? Result.success() : Result.error();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
public Result< DictionaryInfo > update(@RequestBody DictionaryInfo dictionaryInfo) {
|
||||
return dictionaryInfoService.save(dictionaryInfo) ? Result.success() : Result.error();
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
package com.etl.data.controller;
|
||||
|
||||
import com.etl.common.core.domain.Result;
|
||||
import com.etl.data.domain.req.AssetAccreditReq;
|
||||
import com.etl.data.domain.req.SourceAccreditReq;
|
||||
import com.etl.data.service.AssetAccreditService;
|
||||
import com.etl.data.service.SourceAccreditService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @ClassName AssetAccreditController
|
||||
* @Description 描述
|
||||
* @Author YunFei.Du
|
||||
* @Date 2024/5/1 15:48
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@RequestMapping( "/sourceAccredit")
|
||||
public class SourceAccreditController {
|
||||
@Autowired
|
||||
private SourceAccreditService sourceAccreditService;
|
||||
|
||||
/**
|
||||
* 根据数据源id获取授权信息
|
||||
*/
|
||||
@GetMapping(value = "/GetSourceAccreditByDataSourceId")
|
||||
public Result getSourceAccreditByDataSourceId(@RequestParam("id") Long id)
|
||||
{
|
||||
return sourceAccreditService.getSourceAccreditByDataSourceId(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
@PostMapping("insertSourceAccredit")
|
||||
public Result insertSourceAccredit(@RequestBody SourceAccreditReq sourceAccreditReq){
|
||||
return sourceAccreditService.insertSourceAccredit(sourceAccreditReq);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 授权删除
|
||||
*/
|
||||
|
||||
@PostMapping("/DeleteSourceAccreditBySourceIds")
|
||||
public Result deleteSourceAccreditBySourceIds(@RequestBody SourceAccreditReq sourceAccreditReq) {
|
||||
return sourceAccreditService.deleteSourceAccreditBySourceIds(sourceAccreditReq);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package com.etl.data.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.etl.data.domain.AssetAccredit;
|
||||
|
||||
/**
|
||||
* 资产认证
|
||||
* @author YunFei.Du
|
||||
* @date 15:30 2024/5/1
|
||||
*/
|
||||
|
||||
public interface AssetAccreditMapper extends BaseMapper< AssetAccredit > {
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.etl.data.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.etl.data.domain.AssetModel;
|
||||
|
||||
/**
|
||||
* 资产模型
|
||||
* @author YunFei.Du
|
||||
* @date 10:26 2024/5/1
|
||||
*/
|
||||
public interface AssetModelMapper extends BaseMapper<AssetModel> {
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue