Compare commits
137 Commits
c121bfa75f
...
2f19d433a2
| Author | SHA1 | Date |
|---|---|---|
|
|
2f19d433a2 | |
|
|
ba6fc1e068 | |
|
|
b246e53901 | |
|
|
e5601bb0a6 | |
|
|
ab457937ff | |
|
|
159413362d | |
|
|
e20994fd3d | |
|
|
08a3ddd71e | |
|
|
09f78dfe30 | |
|
|
34131871c3 | |
|
|
dc34c244e5 | |
|
|
755c051e0c | |
|
|
5bae16ddc5 | |
|
|
7db8851b07 | |
|
|
89377c8870 | |
|
|
19c267b069 | |
|
|
9fbfd881fc | |
|
|
79fa0a933b | |
|
|
622504aff4 | |
|
|
964a8427a1 | |
|
|
37a439b624 | |
|
|
be83f39c99 | |
|
|
08ca7cd7b5 | |
|
|
2e8bb34b15 | |
|
|
24c3b66626 | |
|
|
9bb8ec407a | |
|
|
7b3d2097b6 | |
|
|
b2917b405e | |
|
|
dad884536c | |
|
|
f3a075ec4e | |
|
|
00effa0aa8 | |
|
|
423a50bb66 | |
|
|
9e2b787708 | |
|
|
c87f9ecb80 | |
|
|
9834d45357 | |
|
|
2ea9f1f35c | |
|
|
8fcf4c1641 | |
|
|
49c79f641b | |
|
|
e3bd2c759b | |
|
|
da8c5b1cb4 | |
|
|
0ba2b40f3e | |
|
|
4c46b22b5c | |
|
|
d9786fc6c8 | |
|
|
f866ca9170 | |
|
|
03cc474428 | |
|
|
af4501cda2 | |
|
|
234a8d41cd | |
|
|
14f4975ebf | |
|
|
14a2ff5006 | |
|
|
61f3932313 | |
|
|
4963fbdbab | |
|
|
3d997ef36e | |
|
|
477a7db10b | |
|
|
e8c036e087 | |
|
|
5a99599194 | |
|
|
fb17f9fb41 | |
|
|
828797ca37 | |
|
|
a63376637d | |
|
|
ca937c792f | |
|
|
d82360565b | |
|
|
7ca1c6a013 | |
|
|
1a8482a6b7 | |
|
|
9f0f0d6e19 | |
|
|
38ae5e91b9 | |
|
|
fc8700c0b3 | |
|
|
6d96ad7c0b | |
|
|
35c7596532 | |
|
|
4c43d19d15 | |
|
|
3b1224e38d | |
|
|
93eeb03672 | |
|
|
b1db94b095 | |
|
|
2242266d4c | |
|
|
c60eeda461 | |
|
|
15bff6e9be | |
|
|
02aca1c35c | |
|
|
dae47dd897 | |
|
|
9d4da4ff51 | |
|
|
a8ad8e2e19 | |
|
|
8121728c53 | |
|
|
8df5a15bc2 | |
|
|
bb24ada454 | |
|
|
63c845c48f | |
|
|
c3d19c4692 | |
|
|
1c08d5bc8f | |
|
|
1241ed37d2 | |
|
|
46e1ecceaf | |
|
|
01f7a07e6e | |
|
|
48ae891b98 | |
|
|
5dd76b6d9e | |
|
|
ba7ea48d90 | |
|
|
105321c9a4 | |
|
|
5db0e8458d | |
|
|
37f562dc9c | |
|
|
517bee4006 | |
|
|
e3a92a2878 | |
|
|
e3d5621966 | |
|
|
eb6f09792d | |
|
|
dc2a2b5033 | |
|
|
4b39eac142 | |
|
|
2818bafd89 | |
|
|
2731d24c9f | |
|
|
c974008a62 | |
|
|
64391a99c8 | |
|
|
2419d2d7e7 | |
|
|
c29b7a1467 | |
|
|
fdb39dd41e | |
|
|
aa12895da4 | |
|
|
82e8c6a6cb | |
|
|
82407bc869 | |
|
|
1fa3e16d06 | |
|
|
2390e22758 | |
|
|
604ed75b75 | |
|
|
fbc58d11ad | |
|
|
93c6ad4747 | |
|
|
b89103f9b3 | |
|
|
8e8b9d95f1 | |
|
|
443a9f4fd2 | |
|
|
bd8b720a58 | |
|
|
ffd000b40b | |
|
|
0b8017c092 | |
|
|
0ebf1ba7cb | |
|
|
5f1f1fef6d | |
|
|
7b1d615209 | |
|
|
fc1951e2a4 | |
|
|
cd53305852 | |
|
|
968f62c7e8 | |
|
|
d67d8bfa6e | |
|
|
2399fc16f6 | |
|
|
1f05151933 | |
|
|
626e27269f | |
|
|
c76aa15eeb | |
|
|
e59d8ed238 | |
|
|
e1fbb12415 | |
|
|
ad0cdcb37e | |
|
|
feb6ecb22c | |
|
|
3cf4bc8c38 | |
|
|
7513ae3d8b |
|
|
@ -29,6 +29,8 @@ infrastructure:
|
|||
pre_deploy_commands:
|
||||
- cp sql/ry_20250523.sql docker/mysql/db/
|
||||
- cp sql/ry_config_20250902.sql docker/mysql/db/
|
||||
- cp sql/wvp.sql docker/mysql/db/
|
||||
- cp sql/privileges.sql docker/mysql/db/
|
||||
wait_time: 30 # MySQL 需要更长时间初始化
|
||||
|
||||
- name: ruoyi-redis
|
||||
|
|
@ -75,6 +77,17 @@ repositories:
|
|||
docker_path: docker/nginx/html/dist
|
||||
docker_service: ruoyi-nginx
|
||||
|
||||
- name: ruoyi-hyf
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a_th_web.git
|
||||
path: a_th_web
|
||||
type: nodejs
|
||||
build_commands:
|
||||
- pnpm install
|
||||
- pnpm run build-prod:hyf
|
||||
artifact_path: apps/tuoheng_hyf_web/dist
|
||||
docker_path: docker/a_th_web/html/dist
|
||||
docker_service: ruoyi-hyf
|
||||
|
||||
# 系统服务
|
||||
- name: ruoyi-system
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-system.git
|
||||
|
|
|
|||
|
|
@ -1,200 +0,0 @@
|
|||
# DevOps 自动化部署配置文件
|
||||
|
||||
# 全局分支配置(所有仓库统一使用此分支)
|
||||
global_branch: main
|
||||
|
||||
# Git 仓库配置
|
||||
repositories:
|
||||
# 认证服务
|
||||
- name: ruoyi-auth
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-auth.git
|
||||
path: ruoyi-auth
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/auth/jar
|
||||
docker_service: ruoyi-auth
|
||||
|
||||
# 网关服务
|
||||
- name: ruoyi-gateway
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-gateway.git
|
||||
path: ruoyi-gateway
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/gateway/jar
|
||||
docker_service: ruoyi-gateway
|
||||
|
||||
# 前端UI
|
||||
- name: ruoyi-ui
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-ui.git
|
||||
path: ruoyi-ui
|
||||
type: nodejs
|
||||
build_commands:
|
||||
- npm install
|
||||
- npm run build:prod
|
||||
artifact_path: dist
|
||||
docker_path: docker/nginx/html/dist
|
||||
docker_service: ruoyi-nginx
|
||||
|
||||
# 系统服务
|
||||
- name: ruoyi-system
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-system.git
|
||||
path: ruoyi-modules/ruoyi-system
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/system/jar
|
||||
docker_service: ruoyi-modules-system
|
||||
|
||||
# 文件服务
|
||||
- name: ruoyi-file
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-file.git
|
||||
path: ruoyi-modules/ruoyi-file
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/file/jar
|
||||
docker_service: ruoyi-modules-file
|
||||
|
||||
# 代码生成
|
||||
- name: ruoyi-gen
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-gen.git
|
||||
path: ruoyi-modules/ruoyi-gen
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/gen/jar
|
||||
docker_service: ruoyi-modules-gen
|
||||
|
||||
# 定时任务
|
||||
- name: ruoyi-job
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-job.git
|
||||
path: ruoyi-modules/ruoyi-job
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/job/jar
|
||||
docker_service: ruoyi-modules-job
|
||||
|
||||
# 监控服务
|
||||
- name: ruoyi-monitor
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-ruoyi-visual.git
|
||||
path: ruoyi-visual/ruoyi-monitor
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/visual/monitor/jar
|
||||
docker_service: ruoyi-visual-monitor
|
||||
|
||||
# 设备服务
|
||||
- name: tuoheng-device
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-device.git
|
||||
path: ruoyi-modules/tuoheng-device
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/device/jar
|
||||
docker_service: tuoheng-modules-device
|
||||
|
||||
# 审批服务
|
||||
- name: tuoheng-approval
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-approval.git
|
||||
path: ruoyi-modules/tuoheng-approval
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/approval/jar
|
||||
docker_service: tuoheng-modules-approval
|
||||
|
||||
# 航线服务
|
||||
- name: tuoheng-airline
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-airline.git
|
||||
path: ruoyi-modules/tuoheng-airline
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/airline/jar
|
||||
docker_service: tuoheng-modules-airline
|
||||
|
||||
# 任务服务
|
||||
- name: tuoheng-task
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-task.git
|
||||
path: ruoyi-modules/tuoheng-task
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/task/jar
|
||||
docker_service: tuoheng-modules-task
|
||||
|
||||
# FMS服务
|
||||
- name: tuoheng-fms
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-fms.git
|
||||
path: ruoyi-modules/tuoheng-fms
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/fms/jar
|
||||
docker_service: tuoheng-modules-fms
|
||||
|
||||
# 媒体服务
|
||||
- name: tuoheng-media
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-tuoheng-media.git
|
||||
path: ruoyi-modules/tuoheng-media
|
||||
type: java
|
||||
build_commands:
|
||||
- mvn clean package -DskipTests
|
||||
artifact_path: target/*.jar
|
||||
docker_path: docker/ruoyi/modules/media/jar
|
||||
docker_service: tuoheng-modules-media
|
||||
|
||||
# 主仓库配置
|
||||
main_repository:
|
||||
url: http://th.local.t-aaron.com:13000/THENG/a-cloud-all.git
|
||||
runtime_path: ./runtime
|
||||
|
||||
# 监听配置
|
||||
monitor:
|
||||
poll_interval: 10 # 轮询间隔(秒)
|
||||
enabled_repos: [] # 空数组表示监听所有仓库,或指定具体仓库名称列表
|
||||
|
||||
# 部署配置
|
||||
deploy:
|
||||
docker_compose_path: ./docker/docker-compose.yml
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
file: .devops/logs/devops.log
|
||||
max_size: 10485760 # 10MB
|
||||
|
||||
# 基础设施服务配置(只部署一次)
|
||||
infrastructure:
|
||||
- name: ruoyi-mysql
|
||||
docker_service: ruoyi-mysql
|
||||
pre_deploy_commands:
|
||||
- cp sql/ry_20250523.sql docker/mysql/db/
|
||||
- cp sql/ry_config_20250902.sql docker/mysql/db/
|
||||
deployed_flag: .devops/.deployed_mysql
|
||||
wait_time: 30 # MySQL 需要更长时间初始化
|
||||
|
||||
- name: ruoyi-redis
|
||||
docker_service: ruoyi-redis
|
||||
deployed_flag: .devops/.deployed_redis
|
||||
wait_time: 10 # Redis 启动较快
|
||||
|
||||
- name: ruoyi-nacos
|
||||
docker_service: ruoyi-nacos
|
||||
deployed_flag: .devops/.deployed_nacos
|
||||
wait_time: 20 # Nacos 需要等待 MySQL 就绪
|
||||
|
|
@ -42,6 +42,10 @@ def run_docker_compose(compose_dir, service_name):
|
|||
Logger.error(f"docker-compose.yml 不存在: {compose_file}")
|
||||
return False
|
||||
|
||||
# 停止并删除容器和匿名卷(确保使用最新的镜像内容)
|
||||
Logger.info(f"停止并删除旧容器和卷: {service_name}")
|
||||
Logger.run_command(f"docker-compose down {service_name} -v", compose_dir)
|
||||
|
||||
# 构建镜像
|
||||
if not Logger.run_command(f"docker-compose build --no-cache {service_name}", compose_dir):
|
||||
Logger.error(f"镜像构建失败: {service_name}")
|
||||
|
|
|
|||
|
|
@ -40,3 +40,19 @@
|
|||
[submodule "ruoyi-modules/tuoheng-task"]
|
||||
path = ruoyi-modules/tuoheng-task
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-task.git
|
||||
[submodule "a_th_web"]
|
||||
path = a_th_web
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a_th_web.git
|
||||
[submodule "wvpjar"]
|
||||
path = wvpjar
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-wvp-java.git
|
||||
[submodule "wvpweb"]
|
||||
path = wvpweb
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-wvp-web.git
|
||||
|
||||
[submodule "a-zlm"]
|
||||
path = a-zlm
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-zlm.git
|
||||
[submodule "thingsboard"]
|
||||
path = thingsboard
|
||||
url = http://221.226.114.142:13000/THENG/thingsboard.git
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
[submodule "ruoyi-gateway"]
|
||||
path = ruoyi-gateway
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-gateway.git
|
||||
[submodule "ruoyi-ui"]
|
||||
path = ruoyi-ui
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-ui.git
|
||||
[submodule "ruoyi-auth"]
|
||||
path = ruoyi-auth
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-auth.git
|
||||
[submodule "ruoyi-visual/ruoyi-monitor"]
|
||||
path = ruoyi-visual/ruoyi-monitor
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-visual.git
|
||||
[submodule "ruoyi-modules/ruoyi-file"]
|
||||
path = ruoyi-modules/ruoyi-file
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-file.git
|
||||
[submodule "ruoyi-modules/ruoyi-gen"]
|
||||
path = ruoyi-modules/ruoyi-gen
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-gen.git
|
||||
[submodule "ruoyi-modules/ruoyi-job"]
|
||||
path = ruoyi-modules/ruoyi-job
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-job.git
|
||||
[submodule "ruoyi-modules/ruoyi-system"]
|
||||
path = ruoyi-modules/ruoyi-system
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-ruoyi-system.git
|
||||
[submodule "ruoyi-modules/tuoheng-airline"]
|
||||
path = ruoyi-modules/tuoheng-airline
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-airline.git
|
||||
[submodule "ruoyi-modules/tuoheng-approval"]
|
||||
path = ruoyi-modules/tuoheng-approval
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-approval.git
|
||||
[submodule "ruoyi-modules/tuoheng-device"]
|
||||
path = ruoyi-modules/tuoheng-device
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-device.git
|
||||
[submodule "ruoyi-modules/tuoheng-fms"]
|
||||
path = ruoyi-modules/tuoheng-fms
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-fms.git
|
||||
[submodule "ruoyi-modules/tuoheng-media"]
|
||||
path = ruoyi-modules/tuoheng-media
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-media.git
|
||||
[submodule "ruoyi-modules/tuoheng-task"]
|
||||
path = ruoyi-modules/tuoheng-task
|
||||
url = http://th.local.t-aaron.com:13000/THENG/a-tuoheng-task.git
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d6efa9ce0fc2febc77a303b679a6ee1983ad74ae
|
||||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 27c444605579bcca708df367d71cd171558a0dd2
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 清理工程target生成路径。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean
|
||||
|
||||
pause
|
||||
|
|
@ -45,6 +45,13 @@ if [ -d "docker/nginx/html/dist" ]; then
|
|||
echo "docker/nginx/html/dist 清理完成"
|
||||
fi
|
||||
|
||||
if [ -d "docker/a_th_web/html/dist" ]; then
|
||||
echo "清理 docker/a_th_web/html/dist 文件夹..."
|
||||
rm -rf docker/a_th_web/html/dist/*
|
||||
echo "docker/a_th_web/html/dist 清理完成"
|
||||
fi
|
||||
|
||||
|
||||
# 清理 docker 目录下的所有 .jar 文件
|
||||
if [ -d "docker" ]; then
|
||||
echo "清理 docker 目录下的所有 .jar 文件..."
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 打包Web工程,生成war/jar包文件。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean package -Dmaven.test.skip=true
|
||||
|
||||
pause
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Auth工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-auth/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-auth.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Gateway工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-gateway/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-gateway.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-File工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-file/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-file.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-Gen工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-gen/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-gen.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-Job工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-job/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-job.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Modules-System工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-modules/ruoyi-system/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-system.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Monitor工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-visual/ruoyi-monitor/target
|
||||
|
||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-visual-monitor.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
#!/bin/bash
|
||||
|
||||
# 多架构镜像构建脚本
|
||||
# 用法: ./build-multiarch-image.sh <source_image> <target_registry>
|
||||
# 示例: ./build-multiarch-image.sh mysql:8.0 registry.t-aaron.com
|
||||
|
||||
set -e
|
||||
|
||||
# 颜色输出
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# 打印带颜色的信息
|
||||
info() {
|
||||
echo -e "${GREEN}[INFO]${NC} $1"
|
||||
}
|
||||
|
||||
warn() {
|
||||
echo -e "${YELLOW}[WARN]${NC} $1"
|
||||
}
|
||||
|
||||
error() {
|
||||
echo -e "${RED}[ERROR]${NC} $1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 检查参数
|
||||
if [ $# -lt 1 ]; then
|
||||
error "用法: $0 <source_image> [target_registry]\n示例: $0 mysql:8.0\n示例: $0 mysql:8.0 registry.t-aaron.com"
|
||||
fi
|
||||
|
||||
SOURCE_IMAGE=$1
|
||||
TARGET_REGISTRY=${2:-"registry.t-aaron.com"}
|
||||
|
||||
# 从源镜像中提取镜像名和标签
|
||||
if [[ $SOURCE_IMAGE == *":"* ]]; then
|
||||
IMAGE_NAME=$(echo $SOURCE_IMAGE | cut -d':' -f1)
|
||||
IMAGE_TAG=$(echo $SOURCE_IMAGE | cut -d':' -f2)
|
||||
else
|
||||
IMAGE_NAME=$SOURCE_IMAGE
|
||||
IMAGE_TAG="latest"
|
||||
SOURCE_IMAGE="${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
fi
|
||||
|
||||
# 构建目标镜像名称
|
||||
TARGET_IMAGE="${TARGET_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}"
|
||||
TARGET_IMAGE_ARM64="${TARGET_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}-arm64"
|
||||
TARGET_IMAGE_AMD64="${TARGET_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}-amd64"
|
||||
|
||||
info "=========================================="
|
||||
info "多架构镜像构建配置"
|
||||
info "=========================================="
|
||||
info "源镜像: ${SOURCE_IMAGE}"
|
||||
info "目标镜像: ${TARGET_IMAGE}"
|
||||
info "ARM64 镜像: ${TARGET_IMAGE_ARM64}"
|
||||
info "AMD64 镜像: ${TARGET_IMAGE_AMD64}"
|
||||
info "=========================================="
|
||||
echo
|
||||
|
||||
# 步骤 1:拉取 ARM64 架构的镜像
|
||||
info "步骤 1/7: 拉取 ARM64 架构的镜像..."
|
||||
docker pull --platform linux/arm64 ${SOURCE_IMAGE}
|
||||
|
||||
# 立即获取 ARM64 镜像的 Image ID
|
||||
ARM64_IMAGE_ID=$(docker images --filter=reference=${SOURCE_IMAGE} --format "{{.ID}}" | head -1)
|
||||
info "ARM64 镜像 ID: ${ARM64_IMAGE_ID}"
|
||||
info "✓ ARM64 镜像拉取完成"
|
||||
echo
|
||||
|
||||
# 步骤 2:给 ARM64 镜像打标签并推送
|
||||
info "步骤 2/7: 给 ARM64 镜像打标签并推送..."
|
||||
docker tag ${ARM64_IMAGE_ID} ${TARGET_IMAGE_ARM64}
|
||||
docker push ${TARGET_IMAGE_ARM64}
|
||||
info "✓ ARM64 镜像推送完成"
|
||||
echo
|
||||
|
||||
# 步骤 3:拉取 AMD64 架构的镜像
|
||||
info "步骤 3/7: 拉取 AMD64 架构的镜像..."
|
||||
docker pull --platform linux/amd64 ${SOURCE_IMAGE}
|
||||
|
||||
# 立即获取 AMD64 镜像的 Image ID
|
||||
AMD64_IMAGE_ID=$(docker images --filter=reference=${SOURCE_IMAGE} --format "{{.ID}}" | head -1)
|
||||
info "AMD64 镜像 ID: ${AMD64_IMAGE_ID}"
|
||||
info "✓ AMD64 镜像拉取完成"
|
||||
echo
|
||||
|
||||
# 步骤 4:给 AMD64 镜像打标签并推送
|
||||
info "步骤 4/7: 给 AMD64 镜像打标签并推送..."
|
||||
docker tag ${AMD64_IMAGE_ID} ${TARGET_IMAGE_AMD64}
|
||||
docker push ${TARGET_IMAGE_AMD64}
|
||||
info "✓ AMD64 镜像推送完成"
|
||||
echo
|
||||
|
||||
# 步骤 5:创建 multi-arch manifest
|
||||
info "步骤 5/7: 创建 multi-arch manifest..."
|
||||
docker buildx imagetools create -t ${TARGET_IMAGE} \
|
||||
${TARGET_IMAGE_ARM64} \
|
||||
${TARGET_IMAGE_AMD64}
|
||||
info "✓ Multi-arch manifest 创建完成"
|
||||
echo
|
||||
|
||||
# 步骤 6:验证 multi-arch 镜像
|
||||
info "步骤 6/7: 验证 multi-arch 镜像..."
|
||||
docker buildx imagetools inspect ${TARGET_IMAGE}
|
||||
echo
|
||||
|
||||
# 步骤 7:完成
|
||||
info "=========================================="
|
||||
info "步骤 7/7: 构建完成!"
|
||||
info "=========================================="
|
||||
info "多架构镜像已成功创建: ${TARGET_IMAGE}"
|
||||
info ""
|
||||
info "使用方法:"
|
||||
info " docker pull ${TARGET_IMAGE}"
|
||||
info ""
|
||||
info "该镜像支持以下架构:"
|
||||
info " - linux/arm64 (Image ID: ${ARM64_IMAGE_ID})"
|
||||
info " - linux/amd64 (Image ID: ${AMD64_IMAGE_ID})"
|
||||
info "=========================================="
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /home/ruoyi/projects/ruoyi-ui;
|
||||
try_files $uri $uri/ /index.html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /prod-api/{
|
||||
proxy_set_header Host $http_host;
|
||||
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://ruoyi-gateway:8080/;
|
||||
}
|
||||
|
||||
# 避免actuator暴露
|
||||
if ($uri ~ "/actuator") {
|
||||
return 403;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
# 基础镜像
|
||||
FROM registry.t-aaron.com/nginx:latest
|
||||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi/projects/ruoyi-ui
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi/projects/ruoyi-ui
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi/projects/ruoyi-ui
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||
# 复制html文件到路径
|
||||
COPY ./html/dist /home/ruoyi/projects/ruoyi-ui
|
||||
|
|
@ -0,0 +1 @@
|
|||
需要打包将内容放到这边
|
||||
|
|
@ -11,11 +11,16 @@ usage() {
|
|||
echo "begin copy sql "
|
||||
cp ../sql/ry_20250523.sql ./mysql/db
|
||||
cp ../sql/ry_config_20250902.sql ./mysql/db
|
||||
#cp ../sql/privileges.sql ./mysql/db
|
||||
cp ../sql/wvp.sql ./mysql/db
|
||||
|
||||
# copy html
|
||||
echo "begin copy html "
|
||||
cp -r ../ruoyi-ui/dist/** ./nginx/html/dist
|
||||
|
||||
echo "begin copy hyf html "
|
||||
cp -r ../a_th_web/apps/tuoheng_hyf_web/dist/** ./a_th_web/html/dist
|
||||
|
||||
|
||||
# copy jar
|
||||
echo "begin copy ruoyi-gateway "
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ docker-compose build --no-cache ruoyi-redis && docker-compose up -d ruoyi-redis
|
|||
docker-compose build --no-cache ruoyi-nacos && docker-compose up -d ruoyi-nacos
|
||||
docker-compose build --no-cache ruoyi-gateway && docker-compose up -d ruoyi-gateway
|
||||
docker-compose build --no-cache ruoyi-nginx && docker-compose up -d ruoyi-nginx
|
||||
docker-compose build --no-cache ruoyi-hyf && docker-compose up -d ruoyi-hyf
|
||||
docker-compose build --no-cache ruoyi-auth && docker-compose up -d ruoyi-auth
|
||||
docker-compose build --no-cache ruoyi-modules-system && docker-compose up -d ruoyi-modules-system
|
||||
docker-compose build --no-cache ruoyi-modules-gen && docker-compose up -d ruoyi-modules-gen
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ services:
|
|||
context: ./nacos
|
||||
environment:
|
||||
- MODE=standalone
|
||||
- TZ=Asia/Shanghai
|
||||
volumes:
|
||||
- ./nacos/logs/:/home/nacos/logs
|
||||
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
|
||||
|
|
@ -36,6 +37,7 @@ services:
|
|||
'--lower-case-table-names=1'
|
||||
]
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
MYSQL_DATABASE: 'ry-cloud'
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
ruoyi-redis:
|
||||
|
|
@ -43,17 +45,20 @@ services:
|
|||
image: redis-runtime
|
||||
build:
|
||||
context: ./redis
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
|
||||
- ./redis/data:/data
|
||||
command: redis-server /home/ruoyi/redis/redis.conf
|
||||
ruoyi-nginx:
|
||||
container_name: ruoyi-nginx
|
||||
image: nginx-runtime
|
||||
build:
|
||||
context: ./nginx
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "8899:80"
|
||||
volumes:
|
||||
|
|
@ -65,12 +70,32 @@ services:
|
|||
- ruoyi-gateway
|
||||
links:
|
||||
- ruoyi-gateway
|
||||
ruoyi-hyf:
|
||||
container_name: ruoyi-hyf
|
||||
image: hyf-runtime
|
||||
build:
|
||||
context: ./a_th_web
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9988:80"
|
||||
volumes:
|
||||
- ./a_th_web/html/dist:/home/ruoyi/projects/ruoyi-ui
|
||||
- ./a_th_web/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./a_th_web/logs:/var/log/nginx
|
||||
- ./a_th_web/conf.d:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- ruoyi-gateway
|
||||
links:
|
||||
- ruoyi-gateway
|
||||
ruoyi-gateway:
|
||||
container_name: ruoyi-gateway
|
||||
image: gateway-runtime
|
||||
build:
|
||||
context: ./ruoyi/gateway
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "8080:8080"
|
||||
depends_on:
|
||||
|
|
@ -83,6 +108,8 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/auth
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9200:9200"
|
||||
depends_on:
|
||||
|
|
@ -95,6 +122,8 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/system
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9201:9201"
|
||||
depends_on:
|
||||
|
|
@ -109,6 +138,8 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/gen
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9202:9202"
|
||||
depends_on:
|
||||
|
|
@ -121,6 +152,8 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/job
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9203:9203"
|
||||
depends_on:
|
||||
|
|
@ -133,6 +166,8 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/file
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
|
|
@ -143,6 +178,8 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/visual/monitor
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9100:9100"
|
||||
tuoheng-modules-approval:
|
||||
|
|
@ -151,8 +188,10 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/approval
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9204:9201"
|
||||
- "9212:9212"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
|
|
@ -165,8 +204,10 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/device
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9205:9201"
|
||||
- "9210:9210"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
|
|
@ -179,8 +220,10 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/airline
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9206:9201"
|
||||
- "9211:9211"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
|
|
@ -193,8 +236,10 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/task
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9207:9201"
|
||||
- "9215:9215"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
|
|
@ -207,8 +252,10 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/fms
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9208:9201"
|
||||
- "9213:9213"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
|
|
@ -221,8 +268,10 @@ services:
|
|||
build:
|
||||
context: ./ruoyi/modules/media
|
||||
dockerfile: dockerfile
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
ports:
|
||||
- "9209:9201"
|
||||
- "9214:9214"
|
||||
depends_on:
|
||||
- ruoyi-redis
|
||||
- ruoyi-mysql
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
# requirepass 123456
|
||||
bind 0.0.0.0
|
||||
|
|
@ -3,11 +3,17 @@ FROM registry.t-aaron.com/redis:latest
|
|||
# author
|
||||
MAINTAINER ruoyi
|
||||
|
||||
# 创建用户和组
|
||||
RUN groupadd -r ruoyi && useradd -r -g ruoyi ruoyi
|
||||
|
||||
# 挂载目录
|
||||
VOLUME /home/ruoyi/redis
|
||||
# 创建目录
|
||||
RUN mkdir -p /home/ruoyi/redis
|
||||
# 创建目录并设置权限
|
||||
RUN mkdir -p /home/ruoyi/redis && chown -R ruoyi:ruoyi /home/ruoyi/redis && chmod -R 755 /home/ruoyi/redis
|
||||
# 指定路径
|
||||
WORKDIR /home/ruoyi/redis
|
||||
# 复制conf文件到路径
|
||||
COPY ./conf/redis.conf /home/ruoyi/redis/redis.conf
|
||||
|
||||
# 切换到ruoyi用户
|
||||
USER ruoyi
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
services:
|
||||
postgres:
|
||||
restart: always
|
||||
image: "registry.t-aaron.com/postgres:16"
|
||||
ports:
|
||||
- "5432"
|
||||
environment:
|
||||
POSTGRES_DB: thingsboard
|
||||
POSTGRES_PASSWORD: postgres
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
thingsboard-ce:
|
||||
restart: always
|
||||
image: "registry.t-aaron.com/thingsboard/tb-node:4.2.1.1"
|
||||
ports:
|
||||
- "18080:8080"
|
||||
- "7070:7070"
|
||||
- "1883:1883"
|
||||
- "8883:8883"
|
||||
- "5683-5688:5683-5688/udp"
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "100m"
|
||||
max-file: "10"
|
||||
environment:
|
||||
TB_SERVICE_ID: tb-ce-node
|
||||
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/thingsboard
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
name: tb-postgres-data
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
default:
|
||||
external: true
|
||||
name: docker_default
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
会加入ruoyi的默认网络docker_default
|
||||
|
||||
#第一次的时候执行这个
|
||||
docker-compose run --rm -e INSTALL_TB=true -e LOAD_DEMO=true thingsboard-ce
|
||||
docker-compose up -d
|
||||
|
||||
#以后更新 thingsboard-ce 的时候,执行下面这个
|
||||
# 1. 停止并删除旧容器
|
||||
docker-compose down
|
||||
# 2. 拉取新镜像
|
||||
docker-compose pull thingsboard-ce
|
||||
# 3. 直接启动新版本
|
||||
docker-compose up -d
|
||||
|
||||
|
||||
租户管理员:
|
||||
- 用户名:tenant@thingsboard.org
|
||||
- 密码:tenant
|
||||
|
||||
系统管理员:
|
||||
- 用户名:sysadmin@thingsboard.org
|
||||
- 密码:sysadmin
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
docker-compose down && docker-compose pull thingsboard-ce && docker-compose up -d
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
RTMP_PORT=1935
|
||||
HTTP_PORT=9090
|
||||
HTTPS_PORT=8443
|
||||
RTSP_PORT=8554
|
||||
RTP_TCP_PORT=10000
|
||||
RTP_UDP_PORT=10000
|
||||
WEBRTC_UDP_PORT1=8000
|
||||
WEBRTC_UDP_PORT2=9000
|
||||
RESTART_POLICY=unless-stopped
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# 此镜像为github持续集成自动编译推送,跟代码(master分支)保持最新状态
|
||||
services:
|
||||
zlmediakit:
|
||||
image: registry.t-aaron.com/zlmediakit/zlmediakit:Release.latest
|
||||
container_name: zlmediakit
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${RTMP_PORT:-1935}:1935" # RTMP
|
||||
- "${HTTP_PORT:-9090}:80" # HTTP
|
||||
- "${HTTPS_PORT:-8443}:443" # HTTPS
|
||||
- "${RTSP_PORT:-8554}:554" # RTSP
|
||||
- "${RTP_TCP_PORT:-10000}:10000" # RTP TCP
|
||||
- "${RTP_UDP_PORT:-10000}:10000/udp" # RTP UDP
|
||||
- "${WEBRTC_UDP_PORT1:-8000}:8000/udp" # WebRTC UDP
|
||||
- "${WEBRTC_UDP_PORT2:-9000}:9000/udp" # WebRTC UDP
|
||||
|
||||
networks:
|
||||
default:
|
||||
external: true
|
||||
name: docker_default
|
||||
54
pom.xml
54
pom.xml
|
|
@ -34,6 +34,7 @@
|
|||
<poi.version>4.1.2</poi.version>
|
||||
<springdoc.version>2.6.0</springdoc.version>
|
||||
<transmittable-thread-local.version>2.14.4</transmittable-thread-local.version>
|
||||
<thingsboard-client.version>4.2.1</thingsboard-client.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
|
|
@ -212,6 +213,55 @@
|
|||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 设备接口 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>tuoheng-api-device</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 航线接口 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>tuoheng-api-airline</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 审批接口 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>tuoheng-api-approval</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- FMS接口 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>tuoheng-api-fms</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 媒体接口 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>tuoheng-api-media</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 任务接口 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>tuoheng-api-task</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.thingsboard</groupId>
|
||||
<artifactId>rest-client</artifactId>
|
||||
<version>${thingsboard-client.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
|
@ -274,6 +324,10 @@
|
|||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>thingsboard</id>
|
||||
<url>https://repo.thingsboard.io/artifactory/libs-release-public</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,12 @@
|
|||
|
||||
<modules>
|
||||
<module>ruoyi-api-system</module>
|
||||
<module>tuoheng-api-device</module>
|
||||
<module>tuoheng-api-airline</module>
|
||||
<module>tuoheng-api-approval</module>
|
||||
<module>tuoheng-api-fms</module>
|
||||
<module>tuoheng-api-media</module>
|
||||
<module>tuoheng-api-task</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
<?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.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
<version>3.6.7</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>tuoheng-api-airline</artifactId>
|
||||
|
||||
<description>
|
||||
tuoheng-api-airline航线接口模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- RuoYi Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.ruoyi.airline.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.airline.api.domain.AirlineTempVO;
|
||||
import com.ruoyi.airline.api.factory.RemoteAirlineFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
/**
|
||||
* 航线服务
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@FeignClient(contextId = "remoteAirlineService", value = ServiceNameConstants.AIRLINE_SERVICE, fallbackFactory = RemoteAirlineFallbackFactory.class)
|
||||
public interface RemoteAirlineService
|
||||
{
|
||||
/**
|
||||
* 根据ID查询航线信息
|
||||
*
|
||||
* @param id 航线ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/airline/temp/{id}")
|
||||
R<AirlineTempVO> getAirlineById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.airline.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 航线临时表对象 tuoheng_airline_temp
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
public class AirlineTempVO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private String id;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "AirlineTemp{" +
|
||||
"id='" + id + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.airline.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.airline.api.RemoteAirlineService;
|
||||
import com.ruoyi.airline.api.domain.AirlineTempVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 航线服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@Component
|
||||
public class RemoteAirlineFallbackFactory implements FallbackFactory<RemoteAirlineService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteAirlineFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteAirlineService create(Throwable throwable)
|
||||
{
|
||||
log.error("航线服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteAirlineService()
|
||||
{
|
||||
@Override
|
||||
public R<AirlineTempVO> getAirlineById(String id, String source)
|
||||
{
|
||||
return R.fail("获取航线信息失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?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.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
<version>3.6.7</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>tuoheng-api-approval</artifactId>
|
||||
|
||||
<description>
|
||||
tuoheng-api-approval审批接口模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- RuoYi Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.ruoyi.approval.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.approval.api.domain.ApprovalTempVO;
|
||||
import com.ruoyi.approval.api.factory.RemoteApprovalFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
/**
|
||||
* 审批服务
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@FeignClient(contextId = "remoteApprovalService", value = ServiceNameConstants.APPROVAL_SERVICE, fallbackFactory = RemoteApprovalFallbackFactory.class)
|
||||
public interface RemoteApprovalService
|
||||
{
|
||||
/**
|
||||
* 根据ID查询审批信息
|
||||
*
|
||||
* @param id 审批ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/approval/temp/{id}")
|
||||
R<ApprovalTempVO> getApprovalById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.approval.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 审批临时表对象 tuoheng_approval_temp
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
public class ApprovalTempVO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private String id;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "ApprovalTemp{" +
|
||||
"id='" + id + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.approval.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.approval.api.RemoteApprovalService;
|
||||
import com.ruoyi.approval.api.domain.ApprovalTempVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 审批服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@Component
|
||||
public class RemoteApprovalFallbackFactory implements FallbackFactory<RemoteApprovalService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteApprovalFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteApprovalService create(Throwable throwable)
|
||||
{
|
||||
log.error("审批服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteApprovalService()
|
||||
{
|
||||
@Override
|
||||
public R<ApprovalTempVO> getApprovalById(String id, String source)
|
||||
{
|
||||
return R.fail("获取审批信息失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?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.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
<version>3.6.7</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>tuoheng-api-device</artifactId>
|
||||
|
||||
<description>
|
||||
tuoheng-api-device设备接口模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- RuoYi Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.ruoyi.device.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.device.api.domain.AircraftDetailVO;
|
||||
import com.ruoyi.device.api.factory.RemoteAircraftFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 无人机服务
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@FeignClient(contextId = "remoteAircraftService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteAircraftFallbackFactory.class)
|
||||
public interface RemoteAircraftService
|
||||
{
|
||||
/**
|
||||
* 查看无人机详情
|
||||
*
|
||||
* @param aircraftId 无人机ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/aircraft/detail/{aircraftId}")
|
||||
R<AircraftDetailVO> getAircraftDetail(@PathVariable("aircraftId") Long aircraftId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.ruoyi.device.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.device.api.domain.DeviceTempVO;
|
||||
import com.ruoyi.device.api.factory.RemoteDeviceFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
/**
|
||||
* 设备服务
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-15
|
||||
*/
|
||||
@FeignClient(contextId = "remoteDeviceService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteDeviceFallbackFactory.class)
|
||||
public interface RemoteDeviceService
|
||||
{
|
||||
/**
|
||||
* 根据ID查询设备信息
|
||||
*
|
||||
* @param id 设备ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/device/temp/{id}")
|
||||
R<DeviceTempVO> getDeviceById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.ruoyi.device.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.device.api.domain.DockVO;
|
||||
import com.ruoyi.device.api.domain.DockDetailVO;
|
||||
import com.ruoyi.device.api.factory.RemoteDockFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机场服务
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@FeignClient(contextId = "remoteDockService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteDockFallbackFactory.class)
|
||||
public interface RemoteDockService
|
||||
{
|
||||
/**
|
||||
* 搜索机场
|
||||
*
|
||||
* @param dockStatus 机场状态
|
||||
* @param dockId 机场ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/dock/search")
|
||||
R<List<DockVO>> searchDocks(@RequestParam(required = false) String dockStatus, @RequestParam(required = false) Long dockId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 查看机场详情
|
||||
*
|
||||
* @param dockId 机场ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/dock/detail/{dockId}")
|
||||
R<DockDetailVO> getDockDetail(@PathVariable("dockId") Long dockId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.ruoyi.device.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.device.api.domain.GroupVO;
|
||||
import com.ruoyi.device.api.domain.GroupCreateRequest;
|
||||
import com.ruoyi.device.api.domain.DockVO;
|
||||
import com.ruoyi.device.api.factory.RemoteGroupFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分组服务
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@FeignClient(contextId = "remoteGroupService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = RemoteGroupFallbackFactory.class)
|
||||
public interface RemoteGroupService
|
||||
{
|
||||
/**
|
||||
* 创建分组
|
||||
*
|
||||
* @param request 分组创建请求
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/group/create")
|
||||
R<Long> createGroup(@RequestBody GroupCreateRequest request, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 删除分组
|
||||
*
|
||||
* @param groupId 分组ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@DeleteMapping("/group/delete/{groupId}")
|
||||
R<Void> deleteGroup(@PathVariable("groupId") Long groupId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 切换机场所在的分组
|
||||
*
|
||||
* @param dockId 机场ID
|
||||
* @param groupId 分组ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@PutMapping("/group/switch/{dockId}/{groupId}")
|
||||
R<Void> switchDockGroup(@PathVariable("dockId") Long dockId, @PathVariable("groupId") Long groupId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 查看分组下的机场
|
||||
*
|
||||
* @param groupId 分组ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/group/docks/{groupId}")
|
||||
R<List<DockVO>> getDocksByGroupId(@PathVariable("groupId") Long groupId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 查看所有分组
|
||||
*
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/group/list")
|
||||
R<List<Long>> getAllGroupIds(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 无人机详情VO对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class AircraftDetailVO extends AircraftVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// ========== 基本信息区域 ==========
|
||||
|
||||
/** 无人机版本 */
|
||||
@Excel(name = "无人机版本")
|
||||
private String aircraftVersion;
|
||||
|
||||
/** 无人机SN号 */
|
||||
@Excel(name = "无人机SN号")
|
||||
private String snNumber;
|
||||
|
||||
/** 电池SN号 */
|
||||
@Excel(name = "电池SN号")
|
||||
private String batterySn;
|
||||
|
||||
/** 绑定时间 */
|
||||
@Excel(name = "绑定时间")
|
||||
private Long bindTime;
|
||||
|
||||
/** 运维剩余天数 */
|
||||
@Excel(name = "运维剩余天数")
|
||||
private Integer maintenanceDays;
|
||||
|
||||
// ========== 统计信息区域 ==========
|
||||
|
||||
/** 飞行时长 */
|
||||
@Excel(name = "飞行时长")
|
||||
private Integer flightDuration;
|
||||
|
||||
/** 作业架次 */
|
||||
@Excel(name = "作业架次")
|
||||
private Integer missionCount;
|
||||
|
||||
// ========== 网络列表 ==========
|
||||
|
||||
/** 网络列表 */
|
||||
private List<NetworkVO> networkList;
|
||||
|
||||
// ========== 遥测数据区域 ==========
|
||||
|
||||
/** RTK信号 */
|
||||
@Excel(name = "RTK信号")
|
||||
private Double rtkSignal;
|
||||
|
||||
/** 限高 */
|
||||
@Excel(name = "限高")
|
||||
private Integer maxAltitude;
|
||||
|
||||
/** 限远 */
|
||||
@Excel(name = "限远")
|
||||
private Integer maxDistance;
|
||||
|
||||
/** 电压 */
|
||||
@Excel(name = "电压")
|
||||
private Integer voltage;
|
||||
|
||||
/** 电量 */
|
||||
@Excel(name = "电量")
|
||||
private Integer batteryLevel;
|
||||
|
||||
/** 续航 */
|
||||
@Excel(name = "续航")
|
||||
private Integer flightTimeRemaining;
|
||||
|
||||
/** 电池温度 */
|
||||
@Excel(name = "电池温度")
|
||||
private Double batteryTemperature;
|
||||
|
||||
/** 循环次数 */
|
||||
@Excel(name = "循环次数")
|
||||
private Integer cycleCount;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 无人机更新请求对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-22
|
||||
*/
|
||||
@Data
|
||||
public class AircraftUpdateRequest
|
||||
{
|
||||
/** 无人机ID */
|
||||
private Long aircraftId;
|
||||
|
||||
/** 无人机名称 */
|
||||
private String aircraftName;
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 无人机VO对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class AircraftVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 无人机ID */
|
||||
@Excel(name = "无人机ID")
|
||||
private Long aircraftId;
|
||||
|
||||
/** 无人机IOT ID */
|
||||
@Excel(name = "无人机IOT ID")
|
||||
private String aircraftIotId;
|
||||
|
||||
/** 无人机名称 */
|
||||
@Excel(name = "无人机名称")
|
||||
private String aircraftName;
|
||||
|
||||
/** 无人机厂商 */
|
||||
@Excel(name = "无人机厂商")
|
||||
private String aircraftManufacturer;
|
||||
|
||||
/** 无人机型号 */
|
||||
@Excel(name = "无人机型号")
|
||||
private String aircraftModel;
|
||||
|
||||
/** 无人机状态 */
|
||||
@Excel(name = "无人机状态")
|
||||
private String aircraftStatus;
|
||||
|
||||
/** 挂载列表 */
|
||||
private List<PayloadVO> payloadList;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备临时表对象 tuoheng_device_temp
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-15
|
||||
*/
|
||||
public class DeviceTempVO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private String id;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "DeviceTemp{" +
|
||||
"id='" + id + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,190 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 机场详情VO对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class DockDetailVO extends DockVO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// ========== 基本信息区域 ==========
|
||||
|
||||
|
||||
/**
|
||||
* 固件版本
|
||||
*/
|
||||
@Excel(name = "固件版本")
|
||||
private String firmwareVersion;
|
||||
|
||||
/**
|
||||
* SN号
|
||||
*/
|
||||
@Excel(name = "SN号")
|
||||
private String snNumber;
|
||||
|
||||
/**
|
||||
* 绑定时间
|
||||
*/
|
||||
@Excel(name = "绑定时间")
|
||||
private Long bindTime;
|
||||
|
||||
/**
|
||||
* 运维剩余天数
|
||||
*/
|
||||
@Excel(name = "运维剩余天数")
|
||||
private Integer maintenanceDays;
|
||||
|
||||
// ========== 运行信息区域 ==========
|
||||
|
||||
/**
|
||||
* 备降点坐标(经度)
|
||||
*/
|
||||
@Excel(name = "备降点经度")
|
||||
private Double backupLongitude;
|
||||
|
||||
/**
|
||||
* 备降点坐标(纬度)
|
||||
*/
|
||||
@Excel(name = "备降点纬度")
|
||||
private Double backupLatitude;
|
||||
|
||||
// ========== 统计信息区域 ==========
|
||||
|
||||
/**
|
||||
* 运行时长
|
||||
*/
|
||||
@Excel(name = "运行时长")
|
||||
private Integer runningDuration;
|
||||
|
||||
/**
|
||||
* 作业架次
|
||||
*/
|
||||
@Excel(name = "作业架次")
|
||||
private Integer missionCount;
|
||||
|
||||
/**
|
||||
* 环境风速
|
||||
*/
|
||||
@Excel(name = "环境风速")
|
||||
private Double windSpeed;
|
||||
|
||||
/**
|
||||
* 环境雨量
|
||||
*/
|
||||
@Excel(name = "环境雨量")
|
||||
private Double rainfall;
|
||||
|
||||
/**
|
||||
* 环境温度
|
||||
*/
|
||||
@Excel(name = "环境温度")
|
||||
private Double environmentTemperature;
|
||||
|
||||
/**
|
||||
* 环境湿度
|
||||
*/
|
||||
@Excel(name = "环境湿度")
|
||||
private Double environmentHumidity;
|
||||
|
||||
// ========== 网络信息区域 ==========
|
||||
|
||||
/**
|
||||
* 网络类型
|
||||
*/
|
||||
@Excel(name = "网络类型")
|
||||
private String networkType;
|
||||
|
||||
/**
|
||||
* 网络延迟
|
||||
*/
|
||||
@Excel(name = "网络延迟")
|
||||
private Integer networkDelay;
|
||||
|
||||
// ========== 硬件状态区域 ==========
|
||||
|
||||
/**
|
||||
* 空调状态
|
||||
*/
|
||||
@Excel(name = "空调状态")
|
||||
private String airConditionerStatus;
|
||||
|
||||
/**
|
||||
* 舱门状态
|
||||
*/
|
||||
@Excel(name = "舱门状态")
|
||||
private String cabinDoorStatus;
|
||||
|
||||
/**
|
||||
* 机场状态
|
||||
*/
|
||||
@Excel(name = "机场运行状态")
|
||||
private String dockRunStatus;
|
||||
|
||||
/**
|
||||
* 舱内摄像头
|
||||
*/
|
||||
@Excel(name = "舱内摄像头")
|
||||
private String internalCamera;
|
||||
|
||||
/**
|
||||
* 舱外摄像头
|
||||
*/
|
||||
@Excel(name = "舱外摄像头")
|
||||
private String externalCamera;
|
||||
|
||||
/**
|
||||
* 充放电状态
|
||||
*/
|
||||
@Excel(name = "充放电状态")
|
||||
private String chargingStatus;
|
||||
|
||||
/**
|
||||
* 舱内温度
|
||||
*/
|
||||
@Excel(name = "舱内温度")
|
||||
private Double cabinTemperature;
|
||||
|
||||
/**
|
||||
* 舱内湿度
|
||||
*/
|
||||
@Excel(name = "舱内湿度")
|
||||
private Double cabinHumidity;
|
||||
|
||||
/**
|
||||
* 升降架位置
|
||||
*/
|
||||
@Excel(name = "升降架位置")
|
||||
private String elevatorPosition;
|
||||
|
||||
/**
|
||||
* X轴夹状态
|
||||
*/
|
||||
@Excel(name = "X轴夹状态")
|
||||
private String xAxisClampStatus;
|
||||
|
||||
/**
|
||||
* Y轴夹状态
|
||||
*/
|
||||
@Excel(name = "Y轴夹状态")
|
||||
private String yAxisClampStatus;
|
||||
|
||||
/**
|
||||
*纬度
|
||||
*/
|
||||
private String latitude;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String longitude;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 机场更新请求对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-22
|
||||
*/
|
||||
@Data
|
||||
public class DockUpdateRequest
|
||||
{
|
||||
/** 机场ID */
|
||||
private Long dockId;
|
||||
|
||||
/** 机场名称 */
|
||||
private String dockName;
|
||||
|
||||
/** 机场地址 */
|
||||
private String dockLocation;
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机场VO对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class DockVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 机场ID */
|
||||
@Excel(name = "机场ID")
|
||||
private Long dockId;
|
||||
|
||||
/** 机场IOT ID */
|
||||
@Excel(name = "机场IOT ID")
|
||||
private String dockIotId;
|
||||
|
||||
/** 机场名称 */
|
||||
@Excel(name = "机场名称")
|
||||
private String dockName;
|
||||
|
||||
/** 机场位置 */
|
||||
@Excel(name = "机场位置")
|
||||
private String dockLocation;
|
||||
|
||||
/** 机场厂商 */
|
||||
@Excel(name = "机场厂商")
|
||||
private String dockManufacturer;
|
||||
|
||||
/** 机场型号 */
|
||||
@Excel(name = "机场型号")
|
||||
private String dockModel;
|
||||
|
||||
/** 机场状态 */
|
||||
@Excel(name = "机场状态")
|
||||
private String dockStatus;
|
||||
|
||||
/** 无人机ID */
|
||||
@Excel(name = "无人机ID")
|
||||
private Long aircraftId;
|
||||
|
||||
/** 无人机IOT ID */
|
||||
@Excel(name = "无人机IOT ID")
|
||||
private String aircraftIotId;
|
||||
|
||||
/** 无人机名称 */
|
||||
@Excel(name = "无人机名称")
|
||||
private String aircraftName;
|
||||
|
||||
/** 无人机厂商 */
|
||||
@Excel(name = "无人机厂商")
|
||||
private String aircraftManufacturer;
|
||||
|
||||
/** 无人机型号 */
|
||||
@Excel(name = "无人机型号")
|
||||
private String aircraftModel;
|
||||
|
||||
/** 无人机状态 */
|
||||
@Excel(name = "无人机状态")
|
||||
private String aircraftStatus;
|
||||
|
||||
/** 挂载列表 */
|
||||
private List<PayloadVO> payloadList;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机场VO对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class DockWithGPSVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 机场ID */
|
||||
@Excel(name = "机场ID")
|
||||
private Long dockId;
|
||||
|
||||
/** 机场IOT ID */
|
||||
@Excel(name = "机场IOT ID")
|
||||
private String dockIotId;
|
||||
|
||||
/** 机场名称 */
|
||||
@Excel(name = "机场名称")
|
||||
private String dockName;
|
||||
|
||||
/** 机场位置 */
|
||||
@Excel(name = "机场位置")
|
||||
private String dockLocation;
|
||||
|
||||
/** 机场厂商 */
|
||||
@Excel(name = "机场厂商")
|
||||
private String dockManufacturer;
|
||||
|
||||
/** 机场型号 */
|
||||
@Excel(name = "机场型号")
|
||||
private String dockModel;
|
||||
|
||||
/** 机场状态 */
|
||||
@Excel(name = "机场状态")
|
||||
private String dockStatus;
|
||||
|
||||
/** 无人机ID */
|
||||
@Excel(name = "无人机ID")
|
||||
private Long aircraftId;
|
||||
|
||||
/** 无人机IOT ID */
|
||||
@Excel(name = "无人机IOT ID")
|
||||
private String aircraftIotId;
|
||||
|
||||
/** 无人机名称 */
|
||||
@Excel(name = "无人机名称")
|
||||
private String aircraftName;
|
||||
|
||||
/** 无人机厂商 */
|
||||
@Excel(name = "无人机厂商")
|
||||
private String aircraftManufacturer;
|
||||
|
||||
/** 无人机型号 */
|
||||
@Excel(name = "无人机型号")
|
||||
private String aircraftModel;
|
||||
|
||||
/** 无人机状态 */
|
||||
@Excel(name = "无人机状态")
|
||||
private String aircraftStatus;
|
||||
|
||||
/** 挂载列表 */
|
||||
private List<PayloadVO> payloadList;
|
||||
|
||||
/** 纬度 */
|
||||
private String latitude;
|
||||
|
||||
/** 经度 */
|
||||
private String longitude;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 分组创建请求对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class GroupCreateRequest
|
||||
{
|
||||
private String groupName;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 分组更新请求对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-22
|
||||
*/
|
||||
@Data
|
||||
public class GroupUpdateRequest
|
||||
{
|
||||
/** 分组ID */
|
||||
private Long groupId;
|
||||
|
||||
/** 分组名称 */
|
||||
private String groupName;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分组VO对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class GroupVO implements Serializable
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 分组ID */
|
||||
@Excel(name = "分组ID")
|
||||
private Long groupId;
|
||||
|
||||
/** 分组名称 */
|
||||
@Excel(name = "分组名称")
|
||||
private String groupName;
|
||||
|
||||
/** 无人机个数 */
|
||||
@Excel(name = "机场个数")
|
||||
private Integer dockCount;
|
||||
|
||||
/** 机场列表 */
|
||||
private List<DockVO> dockList;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 网络信息VO对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class NetworkVO implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 网络类型 */
|
||||
@Excel(name = "网络类型")
|
||||
private String networkType;
|
||||
|
||||
/** 网络延迟 */
|
||||
@Excel(name = "网络延迟")
|
||||
private Integer networkDelay;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 挂载详情VO对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class PayloadDetailVO implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 挂载类型 */
|
||||
@Excel(name = "挂载类型")
|
||||
private String payloadType;
|
||||
|
||||
/** 挂载型号 */
|
||||
@Excel(name = "挂载型号")
|
||||
private String payloadModel;
|
||||
|
||||
/** 固件版本 */
|
||||
@Excel(name = "固件版本")
|
||||
private String firmwareVersion;
|
||||
|
||||
/** 是否在线 */
|
||||
@Excel(name = "是否在线")
|
||||
private String onlineStatus;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 挂载VO对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class PayloadVO implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 挂载ID */
|
||||
@Excel(name = "挂载ID")
|
||||
private Long payloadId;
|
||||
|
||||
/** 挂载名称 */
|
||||
@Excel(name = "挂载名称")
|
||||
private String payloadName;
|
||||
|
||||
/** 挂载类型 */
|
||||
@Excel(name = "挂载类型")
|
||||
private String payloadType;
|
||||
|
||||
/** 挂载状态 */
|
||||
@Excel(name = "挂载状态")
|
||||
private String payloadStatus;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.ruoyi.device.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 切换机场分组请求对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Data
|
||||
public class SwitchDockGroupRequest
|
||||
{
|
||||
@Excel(name = "机场ID")
|
||||
private Long dockId;
|
||||
|
||||
@Excel(name = "分组ID")
|
||||
private Long groupId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.ruoyi.device.api.enums;
|
||||
|
||||
/**
|
||||
* 空调状态枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
public enum AirConditionerStatusEnum {
|
||||
|
||||
/**
|
||||
* 空闲模式
|
||||
*/
|
||||
IDLE("IDLE", "空闲模式"),
|
||||
|
||||
/**
|
||||
* 制冷模式
|
||||
*/
|
||||
COOLING("COOLING", "制冷模式"),
|
||||
|
||||
/**
|
||||
* 制热模式
|
||||
*/
|
||||
HEATING("HEATING", "制热模式"),
|
||||
|
||||
/**
|
||||
* 除湿模式
|
||||
*/
|
||||
DEHUMIDIFYING("DEHUMIDIFYING", "除湿模式");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
AirConditionerStatusEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.ruoyi.device.api.enums;
|
||||
|
||||
/**
|
||||
* 无人机状态枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
public enum AircraftStatusEnum {
|
||||
|
||||
/**
|
||||
* 舱内开机
|
||||
*/
|
||||
POWER_ON_IN_CABIN("POWER_ON_IN_CABIN", "舱内开机"),
|
||||
|
||||
/**
|
||||
* 舱内关机
|
||||
*/
|
||||
POWER_OFF_IN_CABIN("POWER_OFF_IN_CABIN", "舱内关机"),
|
||||
|
||||
/**
|
||||
* 舱外开机
|
||||
*/
|
||||
POWER_ON_OUT_CABIN("POWER_ON_OUT_CABIN", "舱外开机"),
|
||||
|
||||
/**
|
||||
* 舱外关机
|
||||
*/
|
||||
POWER_OFF_OUT_CABIN("POWER_OFF_OUT_CABIN", "舱外关机"),
|
||||
|
||||
/**
|
||||
* 任务中
|
||||
*/
|
||||
IN_MISSION("IN_MISSION", "任务中"),
|
||||
|
||||
/**
|
||||
* 调试
|
||||
*/
|
||||
DEBUGGING("DEBUGGING", "调试"),
|
||||
|
||||
/**
|
||||
* 离线
|
||||
*/
|
||||
OFFLINE("OFFLINE", "离线");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
AircraftStatusEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.ruoyi.device.api.enums;
|
||||
|
||||
/**
|
||||
* 舱门状态枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-21
|
||||
*/
|
||||
public enum CabinDoorStatusEnum {
|
||||
|
||||
/**
|
||||
* 关闭
|
||||
*/
|
||||
CLOSED("CLOSED", "关闭"),
|
||||
|
||||
/**
|
||||
* 打开
|
||||
*/
|
||||
OPEN("OPEN", "打开"),
|
||||
|
||||
/**
|
||||
* 半开
|
||||
*/
|
||||
HALF_OPEN("HALF_OPEN", "半开"),
|
||||
|
||||
/**
|
||||
* 舱盖状态异常
|
||||
*/
|
||||
ABNORMAL("ABNORMAL", "舱盖状态异常");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
CabinDoorStatusEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.ruoyi.device.api.enums;
|
||||
|
||||
/**
|
||||
* 轴夹状态枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
public enum ClampStatusEnum {
|
||||
|
||||
/**
|
||||
* 开启
|
||||
*/
|
||||
OPEN("OPEN", "开启"),
|
||||
|
||||
/**
|
||||
* 关闭
|
||||
*/
|
||||
CLOSE("CLOSE", "关闭");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
ClampStatusEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.ruoyi.device.api.enums;
|
||||
|
||||
/**
|
||||
* 机场状态枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
public enum DockStatusEnum {
|
||||
|
||||
/**
|
||||
* 空闲中
|
||||
*/
|
||||
IDLE("IDLE", "空闲中"),
|
||||
|
||||
/**
|
||||
* 现场调试/远程调试
|
||||
*/
|
||||
Debugging("Debugging", "现场调试/远程调试"),
|
||||
|
||||
/**
|
||||
* 固件升级中
|
||||
*/
|
||||
FIRMWARE_UPGRADING("Upgrading", "固件升级中"),
|
||||
|
||||
/**
|
||||
* 作业中
|
||||
*/
|
||||
WORKING("Working", "作业中"),
|
||||
|
||||
/**
|
||||
* 待标定/未知
|
||||
*/
|
||||
UNKNOWN("UNKNOWN", "待标定");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
DockStatusEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.ruoyi.device.api.enums;
|
||||
|
||||
/**
|
||||
* 升降架位置枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
public enum ElevatorPositionEnum {
|
||||
|
||||
/**
|
||||
* 底部
|
||||
*/
|
||||
BOTTOM("BOTTOM", "底部"),
|
||||
|
||||
/**
|
||||
* 顶部
|
||||
*/
|
||||
TOP("TOP", "顶部");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
ElevatorPositionEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.ruoyi.device.api.enums;
|
||||
|
||||
/**
|
||||
* 网络类型枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
public enum NetworkTypeEnum {
|
||||
|
||||
/**
|
||||
* 4G
|
||||
*/
|
||||
FOUR_G("FOUR_G", "4G"),
|
||||
|
||||
/**
|
||||
* 以太网
|
||||
*/
|
||||
ETHERNET("ETHERNET", "以太网"),
|
||||
|
||||
/**
|
||||
* 有线
|
||||
*/
|
||||
WIRED("WIRED", "有线"),
|
||||
|
||||
/**
|
||||
* 5G
|
||||
*/
|
||||
FIVE_G("FIVE_G", "5G"),
|
||||
|
||||
/**
|
||||
* 2.4G
|
||||
*/
|
||||
TWO_POINT_FOUR_G("TWO_POINT_FOUR_G", "2.4G");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
NetworkTypeEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.ruoyi.device.api.enums;
|
||||
|
||||
/**
|
||||
* 挂载状态枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
public enum PayloadStatusEnum {
|
||||
|
||||
/**
|
||||
* 在线
|
||||
*/
|
||||
ONLINE("ONLINE", "在线"),
|
||||
|
||||
/**
|
||||
* 离线
|
||||
*/
|
||||
OFFLINE("OFFLINE", "离线");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
PayloadStatusEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package com.ruoyi.device.api.enums;
|
||||
|
||||
/**
|
||||
* 挂载类型枚举
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-21
|
||||
*/
|
||||
public enum PayloadTypeEnum {
|
||||
|
||||
/**
|
||||
* 喊话器
|
||||
*/
|
||||
SPEAKER("SPEAKER", "喊话器"),
|
||||
|
||||
/**
|
||||
* 相机
|
||||
*/
|
||||
CAMERA("CAMERA", "相机"),
|
||||
|
||||
/**
|
||||
* 其他挂载
|
||||
*/
|
||||
OTHER("OTHER", "其他");
|
||||
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
PayloadTypeEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.device.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.device.api.RemoteAircraftService;
|
||||
import com.ruoyi.device.api.domain.AircraftDetailVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 无人机服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Component
|
||||
public class RemoteAircraftFallbackFactory implements FallbackFactory<RemoteAircraftService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteAircraftFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteAircraftService create(Throwable throwable)
|
||||
{
|
||||
log.error("无人机服务调用失败:", throwable.getMessage());
|
||||
return new RemoteAircraftService()
|
||||
{
|
||||
@Override
|
||||
public R<AircraftDetailVO> getAircraftDetail(Long aircraftId, String source)
|
||||
{
|
||||
return R.fail("查看无人机详情失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.device.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.device.api.RemoteDeviceService;
|
||||
import com.ruoyi.device.api.domain.DeviceTempVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 设备服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-15
|
||||
*/
|
||||
@Component
|
||||
public class RemoteDeviceFallbackFactory implements FallbackFactory<RemoteDeviceService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteDeviceFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteDeviceService create(Throwable throwable)
|
||||
{
|
||||
log.error("设备服务调用失败:", throwable.getMessage());
|
||||
return new RemoteDeviceService()
|
||||
{
|
||||
@Override
|
||||
public R<DeviceTempVO> getDeviceById(String id, String source)
|
||||
{
|
||||
return R.fail("获取设备信息失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.ruoyi.device.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.device.api.RemoteDockService;
|
||||
import com.ruoyi.device.api.domain.DockVO;
|
||||
import com.ruoyi.device.api.domain.DockDetailVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 机场服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Component
|
||||
public class RemoteDockFallbackFactory implements FallbackFactory<RemoteDockService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteDockFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteDockService create(Throwable throwable)
|
||||
{
|
||||
log.error("机场服务调用失败:", throwable.getMessage());
|
||||
return new RemoteDockService()
|
||||
{
|
||||
@Override
|
||||
public R<List<DockVO>> searchDocks(String dockStatus, Long dockId, String source)
|
||||
{
|
||||
return R.fail("搜索机场失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<DockDetailVO> getDockDetail(Long dockId, String source)
|
||||
{
|
||||
return R.fail("查看机场详情失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.ruoyi.device.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.device.api.RemoteGroupService;
|
||||
import com.ruoyi.device.api.domain.GroupVO;
|
||||
import com.ruoyi.device.api.domain.GroupCreateRequest;
|
||||
import com.ruoyi.device.api.domain.DockVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分组服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-20
|
||||
*/
|
||||
@Component
|
||||
public class RemoteGroupFallbackFactory implements FallbackFactory<RemoteGroupService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteGroupFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteGroupService create(Throwable throwable)
|
||||
{
|
||||
log.error("分组服务调用失败:", throwable.getMessage());
|
||||
return new RemoteGroupService()
|
||||
{
|
||||
@Override
|
||||
public R<Long> createGroup(GroupCreateRequest request, String source)
|
||||
{
|
||||
return R.fail("创建分组失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Void> deleteGroup(Long groupId, String source)
|
||||
{
|
||||
return R.fail("删除分组失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Void> switchDockGroup(Long dockId, Long groupId, String source)
|
||||
{
|
||||
return R.fail("切换机场分组失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<DockVO>> getDocksByGroupId(Long groupId, String source)
|
||||
{
|
||||
return R.fail("查看分组下的机场失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<Long>> getAllGroupIds(String source)
|
||||
{
|
||||
return R.fail("查看所有分组失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?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.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
<version>3.6.7</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>tuoheng-api-fms</artifactId>
|
||||
|
||||
<description>
|
||||
tuoheng-api-fms飞行管理接口模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- RuoYi Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.ruoyi.fms.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.fms.api.domain.FmsTempVO;
|
||||
import com.ruoyi.fms.api.factory.RemoteFmsFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
/**
|
||||
* FMS服务
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@FeignClient(contextId = "remoteFmsService", value = ServiceNameConstants.FMS_SERVICE, fallbackFactory = RemoteFmsFallbackFactory.class)
|
||||
public interface RemoteFmsService
|
||||
{
|
||||
/**
|
||||
* 根据ID查询FMS信息
|
||||
*
|
||||
* @param id FMS ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/fms/temp/{id}")
|
||||
R<FmsTempVO> getFmsById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.fms.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 飞行管理临时表对象 tuoheng_fms_temp
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
public class FmsTempVO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private String id;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "FmsTemp{" +
|
||||
"id='" + id + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.fms.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.fms.api.RemoteFmsService;
|
||||
import com.ruoyi.fms.api.domain.FmsTempVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* FMS服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@Component
|
||||
public class RemoteFmsFallbackFactory implements FallbackFactory<RemoteFmsService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteFmsFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteFmsService create(Throwable throwable)
|
||||
{
|
||||
log.error("FMS服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteFmsService()
|
||||
{
|
||||
@Override
|
||||
public R<FmsTempVO> getFmsById(String id, String source)
|
||||
{
|
||||
return R.fail("获取FMS信息失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?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.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
<version>3.6.7</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>tuoheng-api-media</artifactId>
|
||||
|
||||
<description>
|
||||
tuoheng-api-media媒体接口模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- RuoYi Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.ruoyi.media.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.media.api.domain.MediaTempVO;
|
||||
import com.ruoyi.media.api.factory.RemoteMediaFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
/**
|
||||
* 媒体服务
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@FeignClient(contextId = "remoteMediaService", value = ServiceNameConstants.MEDIA_SERVICE, fallbackFactory = RemoteMediaFallbackFactory.class)
|
||||
public interface RemoteMediaService
|
||||
{
|
||||
/**
|
||||
* 根据ID查询媒体信息
|
||||
*
|
||||
* @param id 媒体ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/media/temp/{id}")
|
||||
R<MediaTempVO> getMediaById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.media.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 媒体临时表对象 tuoheng_media_temp
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
public class MediaTempVO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private String id;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "MediaTemp{" +
|
||||
"id='" + id + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.media.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.media.api.RemoteMediaService;
|
||||
import com.ruoyi.media.api.domain.MediaTempVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 媒体服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@Component
|
||||
public class RemoteMediaFallbackFactory implements FallbackFactory<RemoteMediaService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteMediaFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteMediaService create(Throwable throwable)
|
||||
{
|
||||
log.error("媒体服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteMediaService()
|
||||
{
|
||||
@Override
|
||||
public R<MediaTempVO> getMediaById(String id, String source)
|
||||
{
|
||||
return R.fail("获取媒体信息失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?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.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
<version>3.6.7</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>tuoheng-api-task</artifactId>
|
||||
|
||||
<description>
|
||||
tuoheng-api-task任务接口模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- RuoYi Common Core-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.ruoyi.task.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.task.api.domain.TaskTempVO;
|
||||
import com.ruoyi.task.api.factory.RemoteTaskFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
/**
|
||||
* 任务服务
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@FeignClient(contextId = "remoteTaskService", value = ServiceNameConstants.TASK_SERVICE, fallbackFactory = RemoteTaskFallbackFactory.class)
|
||||
public interface RemoteTaskService
|
||||
{
|
||||
/**
|
||||
* 根据ID查询任务信息
|
||||
*
|
||||
* @param id 任务ID
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/task/temp/{id}")
|
||||
R<TaskTempVO> getTaskById(@PathVariable("id") String id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.task.api.domain;
|
||||
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 任务临时表对象 tuoheng_task_temp
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
public class TaskTempVO extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private String id;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "TaskTemp{" +
|
||||
"id='" + id + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.task.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.task.api.RemoteTaskService;
|
||||
import com.ruoyi.task.api.domain.TaskTempVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 任务服务降级处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-17
|
||||
*/
|
||||
@Component
|
||||
public class RemoteTaskFallbackFactory implements FallbackFactory<RemoteTaskService>
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(RemoteTaskFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemoteTaskService create(Throwable throwable)
|
||||
{
|
||||
log.error("任务服务调用失败:{}", throwable.getMessage());
|
||||
return new RemoteTaskService()
|
||||
{
|
||||
@Override
|
||||
public R<TaskTempVO> getTaskById(String id, String source)
|
||||
{
|
||||
return R.fail("获取任务信息失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit ae8dd1783ae479fbe803e27147a0da4354476c1e
|
||||
Subproject commit 33a04b067b29865102832c5c75e76d28d61d921d
|
||||
|
|
@ -21,4 +21,34 @@ public class ServiceNameConstants
|
|||
* 文件服务的serviceid
|
||||
*/
|
||||
public static final String FILE_SERVICE = "ruoyi-file";
|
||||
|
||||
/**
|
||||
* 设备服务的serviceid
|
||||
*/
|
||||
public static final String DEVICE_SERVICE = "tuoheng-device";
|
||||
|
||||
/**
|
||||
* 航线服务的serviceid
|
||||
*/
|
||||
public static final String AIRLINE_SERVICE = "tuoheng-airline";
|
||||
|
||||
/**
|
||||
* 审批服务的serviceid
|
||||
*/
|
||||
public static final String APPROVAL_SERVICE = "tuoheng-approval";
|
||||
|
||||
/**
|
||||
* FMS服务的serviceid
|
||||
*/
|
||||
public static final String FMS_SERVICE = "tuoheng-fms";
|
||||
|
||||
/**
|
||||
* 媒体服务的serviceid
|
||||
*/
|
||||
public static final String MEDIA_SERVICE = "tuoheng-media";
|
||||
|
||||
/**
|
||||
* 任务服务的serviceid
|
||||
*/
|
||||
public static final String TASK_SERVICE = "tuoheng-task";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,56 @@
|
|||
package com.ruoyi.common.core.utils;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 通用转换器基类
|
||||
*
|
||||
* @param <F> Source类型
|
||||
* @param <T> Target类型
|
||||
* @author ruoyi
|
||||
*/
|
||||
public abstract class BaseConvert<F, T> {
|
||||
|
||||
private final Class<F> sourceClass;
|
||||
private final Class<T> targetClass;
|
||||
|
||||
protected BaseConvert(Class<F> sourceClass, Class<T> targetClass) {
|
||||
this.sourceClass = sourceClass;
|
||||
this.targetClass = targetClass;
|
||||
}
|
||||
|
||||
protected T innerFrom(F source) {
|
||||
if (source == null) return null;
|
||||
try {
|
||||
T target = targetClass.getDeclaredConstructor().newInstance();
|
||||
BeanUtils.copyProperties(source, target);
|
||||
return target;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected F innerTo(T target) {
|
||||
if (target == null) return null;
|
||||
try {
|
||||
F source = sourceClass.getDeclaredConstructor().newInstance();
|
||||
BeanUtils.copyProperties(target, source);
|
||||
return source;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected List<T> innerFromList(List<F> sourceList) {
|
||||
if (sourceList == null) return null;
|
||||
return sourceList.stream().map(this::innerFrom).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
protected List<F> innerToList(List<T> targetList) {
|
||||
if (targetList == null) return null;
|
||||
return targetList.stream().map(this::innerTo).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit d735138af013a4771b120712b975d61fafcc1899
|
||||
Subproject commit e7a33e89a63a89b6ee4b661bd3a8d9bb893ee4d1
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit bc468b502fac84e6e4146bc48028b15281eceb4f
|
||||
Subproject commit 2a0b7ecbfb5167fbc6be12bf12b49d7bbd2b9bc0
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit f61f434512731190b6949ec851bef4d0a2b54f41
|
||||
Subproject commit 7260fb807d04c692c4c2d485e06fb6c37454bbd6
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 0e362237f575fcd76b899eb0fa38976b39c166b2
|
||||
Subproject commit 4d80e679589cd1c51f3fb066958f79bd9e4085b2
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 984a84e2ccebfb8536da25047d2f7e80a1f1373d
|
||||
Subproject commit 2390d0d2b0df028a4fea5ffeb596c0347c8eb028
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 99fdf1c00dfb49e7b2faa87edefbdb31b29d507b
|
||||
Subproject commit a11dd15ce89cf8f42c0e7822d1f01ecc0db368f1
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 93c9d6b0cf9f26093445769ccf4d602813f0cb15
|
||||
Subproject commit 5d38c23c4c8d2b8293ccc691b7429c4eee1abc6c
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 7a89488c3d5216a4d54a13769e5355ba56fa943b
|
||||
Subproject commit c57f66e0b7e793bba93fbd697fcb8bc556c8ff4d
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 5a342fbae805e547533fb3806e8b6b4dc441bcaa
|
||||
Subproject commit f4905f1ae18e316c7ef92d3cb3466d723ed2bfed
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue