Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92cf598941 | ||
|
|
343028ade5 | ||
|
|
597b5dad01 | ||
|
|
e818c0319e | ||
|
|
6d3b5201e0 | ||
|
|
9a81408ada | ||
|
|
f3bdfbc6bf | ||
|
|
2eaf62ea82 | ||
|
|
13e51c11e1 | ||
|
|
1f133e8c05 | ||
|
|
cd8cafaf3f | ||
|
|
cbf017a8e2 | ||
|
|
802e668d9a | ||
|
|
9dee067a87 | ||
|
|
a5b5f5b08d | ||
|
|
a40a6f344e | ||
|
|
7d26d2fb3b | ||
|
|
ed6c0a4c80 | ||
|
|
2f8fd79de5 | ||
|
|
31e1f7f8dc | ||
|
|
afbf1eead0 | ||
|
|
a0b0b57110 | ||
|
|
de49404116 |
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2020 若依
|
Copyright (c) 2020 彤然
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,52 +1,29 @@
|
|||||||
<p align="center">
|
|
||||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-b99b286755aef70355a7084753f89cdb7c9.png">
|
|
||||||
</p>
|
|
||||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.6.6</h1>
|
|
||||||
<h4 align="center">基于 Vue/Element UI 和 Spring Boot/Spring Cloud & Alibaba 前后端分离的分布式微服务架构</h4>
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/stargazers"><img src="https://gitee.com/y_project/RuoYi-Cloud/badge/star.svg?theme=dark"></a>
|
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Cloud"><img src="https://img.shields.io/badge/RuoYi-v3.6.6-brightgreen.svg"></a>
|
|
||||||
<a href="https://gitee.com/y_project/RuoYi-Cloud/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## 平台简介
|
|
||||||
|
|
||||||
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
|
||||||
|
|
||||||
* 采用前后端分离的模式,微服务版本前端(基于 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue))。
|
|
||||||
* 后端采用Spring Boot、Spring Cloud & Alibaba。
|
|
||||||
* 注册中心、配置中心选型Nacos,权限认证使用Redis。
|
|
||||||
* 流量控制框架选型Sentinel,分布式事务选型Seata。
|
|
||||||
* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Cloud-Vue3](https://gitcode.com/yangzongzhuan/RuoYi-Cloud-Vue3),保持同步更新。
|
|
||||||
* 如需不分离应用,请移步 [RuoYi](https://gitee.com/y_project/RuoYi),如需分离应用,请移步 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)
|
|
||||||
* 阿里云优惠券:[点我进入](http://aly.ruoyi.vip),腾讯云优惠券:[点我进入](http://txy.ruoyi.vip)
|
|
||||||
|
|
||||||
## 系统模块
|
## 系统模块
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
com.ruoyi
|
com.tongran
|
||||||
├── ruoyi-ui // 前端框架 [80]
|
├── tongran-ui // 前端框架 [80]
|
||||||
├── ruoyi-gateway // 网关模块 [8080]
|
├── tongran-gateway // 网关模块 [8080]
|
||||||
├── ruoyi-auth // 认证中心 [9200]
|
├── tongran-auth // 认证中心 [9200]
|
||||||
├── ruoyi-api // 接口模块
|
├── tongran-api // 接口模块
|
||||||
│ └── ruoyi-api-system // 系统接口
|
│ └── tongran-api-system // 系统接口
|
||||||
├── ruoyi-common // 通用模块
|
├── tongran-common // 通用模块
|
||||||
│ └── ruoyi-common-core // 核心模块
|
│ └── tongran-common-core // 核心模块
|
||||||
│ └── ruoyi-common-datascope // 权限范围
|
│ └── tongran-common-datascope // 权限范围
|
||||||
│ └── ruoyi-common-datasource // 多数据源
|
│ └── tongran-common-datasource // 多数据源
|
||||||
│ └── ruoyi-common-log // 日志记录
|
│ └── tongran-common-log // 日志记录
|
||||||
│ └── ruoyi-common-redis // 缓存服务
|
│ └── tongran-common-redis // 缓存服务
|
||||||
│ └── ruoyi-common-seata // 分布式事务
|
│ └── tongran-common-seata // 分布式事务
|
||||||
│ └── ruoyi-common-security // 安全模块
|
│ └── tongran-common-security // 安全模块
|
||||||
│ └── ruoyi-common-sensitive // 数据脱敏
|
│ └── tongran-common-sensitive // 数据脱敏
|
||||||
│ └── ruoyi-common-swagger // 系统接口
|
│ └── tongran-common-swagger // 系统接口
|
||||||
├── ruoyi-modules // 业务模块
|
├── tongran-modules // 业务模块
|
||||||
│ └── ruoyi-system // 系统模块 [9201]
|
│ └── tongran-system // 系统模块 [9201]
|
||||||
│ └── ruoyi-gen // 代码生成 [9202]
|
│ └── tongran-gen // 代码生成 [9202]
|
||||||
│ └── ruoyi-job // 定时任务 [9203]
|
│ └── tongran-job // 定时任务 [9203]
|
||||||
│ └── ruoyi-file // 文件服务 [9300]
|
│ └── tongran-file // 文件服务 [9300]
|
||||||
├── ruoyi-visual // 图形化管理模块
|
├── tongran-visual // 图形化管理模块
|
||||||
│ └── ruoyi-visual-monitor // 监控中心 [9100]
|
│ └── tongran-visual-monitor // 监控中心 [9100]
|
||||||
├──pom.xml // 公共依赖
|
├──pom.xml // 公共依赖
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
@@ -73,57 +50,3 @@ com.ruoyi
|
|||||||
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
||||||
16. 在线构建器:拖动表单元素生成相应的HTML代码。
|
16. 在线构建器:拖动表单元素生成相应的HTML代码。
|
||||||
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
||||||
|
|
||||||
## 在线体验
|
|
||||||
|
|
||||||
- admin/admin123
|
|
||||||
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
|
||||||
|
|
||||||
演示地址:http://ruoyi.vip
|
|
||||||
文档地址:http://doc.ruoyi.vip
|
|
||||||
|
|
||||||
## 演示图
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-4148b24f58660a9dc347761e4cf6162f28f.png"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-ece3fd37a3d4bb75a3926e905a3c5629055.png"/></td>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-92ffb7f3835855cff100fa0f754a6be0d99.png"/></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-ff9e3066561574aca73005c5730c6a41f15.png"/></td>
|
|
||||||
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
## 若依微服务交流群
|
|
||||||
|
|
||||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=yqInfq0S) [](https://jq.qq.com/?_wv=1027&k=Oy1mb3p8) [](https://jq.qq.com/?_wv=1027&k=rvxkJtXK) [](https://jq.qq.com/?_wv=1027&k=0Ck3PvTe) [](https://jq.qq.com/?_wv=1027&k=FnHHP4TT) [](https://jq.qq.com/?_wv=1027&k=qdT1Ojpz) [](https://jq.qq.com/?_wv=1027&k=nw3OiyXs) [](https://jq.qq.com/?_wv=1027&k=kiU5WDls) [](https://jq.qq.com/?_wv=1027&k=MtBy6YfT) [](https://jq.qq.com/?_wv=1027&k=FqImHgH2) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=G4jZ4EtdT50PhnMBudTnEwgonxkXOscJ&authKey=FkGHYfoTKlGE6wHdKdjH9bVoOgQjtLP9WM%2Fj7pqGY1msoqw9uxDiBo39E2mLgzYg&noverify=0&group_code=128355254) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=irnwcXhbLOQEv1g-TwGifjNTA_f4wZiA&authKey=4bpzEwhcUY%2FvsPDHvzYn6xfoS%2FtOArvZ%2BGXzfr7O0%2FEqLfkKA%2BuCDXlzHIFg8t93&noverify=0&group_code=179219821) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=lx1uEdEDuxeM7rUvF3qmlFdqKqdJ5Z-R&authKey=rgyPW9yhhh4IIURKVFa6NgP3qiqH04WAzrJ0trsgkr3pjzm6sKIOGyA58oOjoj%2FJ&noverify=0&group_code=158753145) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Kuaw0Xdlw2Nlgn6s8h9elzuquHGxGObD&authKey=cSrQcWQ%2BzQZAFFrwxaR%2BbzcumX4WRduZnd1O6JO1dlclQMiu%2BKwxAy8t2JfNp67V&noverify=0&group_code=112869560) 点击按钮入群。
|
|
||||||
+3
-3
@@ -1,14 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
echo [信息] 使用Jar命令运行Auth工程。
|
echo [��Ϣ] ʹ��Jar��������Auth���̡�
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../ruoyi-auth/target
|
cd ../tongran-auth/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-auth.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar tongran-auth.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
+3
-3
@@ -1,14 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
echo [信息] 使用Jar命令运行Gateway工程。
|
echo [��Ϣ] ʹ��Jar��������Gateway���̡�
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../ruoyi-gateway/target
|
cd ../tongran-gateway/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-gateway.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar tongran-gateway.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
echo [信息] 使用Jar命令运行Modules-File工程。
|
echo [��Ϣ] ʹ��Jar��������Modules-File���̡�
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../ruoyi-modules/ruoyi-file/target
|
cd ../tongran-modules/tongran-file/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-file.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar tongran-modules-file.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
echo [信息] 使用Jar命令运行Modules-Gen工程。
|
echo [��Ϣ] ʹ��Jar��������Modules-Gen���̡�
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../ruoyi-modules/ruoyi-gen/target
|
cd ../tongran-modules/tongran-gen/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-gen.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar tongran-modules-gen.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
echo [信息] 使用Jar命令运行Modules-Job工程。
|
echo [��Ϣ] ʹ��Jar��������Modules-Job���̡�
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../ruoyi-modules/ruoyi-job/target
|
cd ../tongran-modules/tongran-job/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-job.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar tongran-modules-job.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
echo [信息] 使用Jar命令运行Modules-System工程。
|
echo [��Ϣ] ʹ��Jar��������Modules-System���̡�
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../ruoyi-modules/ruoyi-system/target
|
cd ../tongran-modules/tongran-system/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-modules-system.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar tongran-modules-system.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
+3
-3
@@ -1,14 +1,14 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo.
|
echo.
|
||||||
echo [信息] 使用Jar命令运行Monitor工程。
|
echo [��Ϣ] ʹ��Jar��������Monitor���̡�
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
cd %~dp0
|
cd %~dp0
|
||||||
cd ../ruoyi-visual/ruoyi-monitor/target
|
cd ../tongran-visual/tongran-monitor/target
|
||||||
|
|
||||||
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||||
|
|
||||||
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar ruoyi-visual-monitor.jar
|
java -Dfile.encoding=utf-8 %JAVA_OPTS% -jar tongran-visual-monitor.jar
|
||||||
|
|
||||||
cd bin
|
cd bin
|
||||||
pause
|
pause
|
||||||
+15
-15
@@ -14,28 +14,28 @@ cp ../sql/ry_config_20250224.sql ./mysql/db
|
|||||||
|
|
||||||
# copy html
|
# copy html
|
||||||
echo "begin copy html "
|
echo "begin copy html "
|
||||||
cp -r ../ruoyi-ui/dist/** ./nginx/html/dist
|
cp -r ../tongran-ui/dist/** ./nginx/html/dist
|
||||||
|
|
||||||
|
|
||||||
# copy jar
|
# copy jar
|
||||||
echo "begin copy ruoyi-gateway "
|
echo "begin copy tongran-gateway "
|
||||||
cp ../ruoyi-gateway/target/ruoyi-gateway.jar ./ruoyi/gateway/jar
|
cp ../tongran-gateway/target/tongran-gateway.jar ./tongran/gateway/jar
|
||||||
|
|
||||||
echo "begin copy ruoyi-auth "
|
echo "begin copy tongran-auth "
|
||||||
cp ../ruoyi-auth/target/ruoyi-auth.jar ./ruoyi/auth/jar
|
cp ../tongran-auth/target/tongran-auth.jar ./tongran/auth/jar
|
||||||
|
|
||||||
echo "begin copy ruoyi-visual "
|
echo "begin copy tongran-visual "
|
||||||
cp ../ruoyi-visual/ruoyi-monitor/target/ruoyi-visual-monitor.jar ./ruoyi/visual/monitor/jar
|
cp ../tongran-visual/tongran-monitor/target/tongran-visual-monitor.jar ./tongran/visual/monitor/jar
|
||||||
|
|
||||||
echo "begin copy ruoyi-modules-system "
|
echo "begin copy tongran-modules-system "
|
||||||
cp ../ruoyi-modules/ruoyi-system/target/ruoyi-modules-system.jar ./ruoyi/modules/system/jar
|
cp ../tongran-modules/tongran-system/target/tongran-modules-system.jar ./tongran/modules/system/jar
|
||||||
|
|
||||||
echo "begin copy ruoyi-modules-file "
|
echo "begin copy tongran-modules-file "
|
||||||
cp ../ruoyi-modules/ruoyi-file/target/ruoyi-modules-file.jar ./ruoyi/modules/file/jar
|
cp ../tongran-modules/tongran-file/target/tongran-modules-file.jar ./tongran/modules/file/jar
|
||||||
|
|
||||||
echo "begin copy ruoyi-modules-job "
|
echo "begin copy tongran-modules-job "
|
||||||
cp ../ruoyi-modules/ruoyi-job/target/ruoyi-modules-job.jar ./ruoyi/modules/job/jar
|
cp ../tongran-modules/tongran-job/target/tongran-modules-job.jar ./tongran/modules/job/jar
|
||||||
|
|
||||||
echo "begin copy ruoyi-modules-gen "
|
echo "begin copy tongran-modules-gen "
|
||||||
cp ../ruoyi-modules/ruoyi-gen/target/ruoyi-modules-gen.jar ./ruoyi/modules/gen/jar
|
cp ../tongran-modules/tongran-gen/target/tongran-modules-gen.jar ./tongran/modules/gen/jar
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -26,12 +26,12 @@ port(){
|
|||||||
|
|
||||||
# 启动基础环境(必须)
|
# 启动基础环境(必须)
|
||||||
base(){
|
base(){
|
||||||
docker-compose up -d ruoyi-mysql ruoyi-redis ruoyi-nacos
|
docker-compose up -d tongran-mysql tongran-redis tongran-nacos
|
||||||
}
|
}
|
||||||
|
|
||||||
# 启动程序模块(必须)
|
# 启动程序模块(必须)
|
||||||
modules(){
|
modules(){
|
||||||
docker-compose up -d ruoyi-nginx ruoyi-gateway ruoyi-auth ruoyi-modules-system
|
docker-compose up -d tongran-nginx tongran-gateway tongran-auth tongran-modules-system
|
||||||
}
|
}
|
||||||
|
|
||||||
# 关闭所有环境/模块
|
# 关闭所有环境/模块
|
||||||
|
|||||||
+48
-48
@@ -1,7 +1,7 @@
|
|||||||
version : '3.8'
|
version : '3.8'
|
||||||
services:
|
services:
|
||||||
ruoyi-nacos:
|
tongran-nacos:
|
||||||
container_name: ruoyi-nacos
|
container_name: tongran-nacos
|
||||||
image: nacos/nacos-server
|
image: nacos/nacos-server
|
||||||
build:
|
build:
|
||||||
context: ./nacos
|
context: ./nacos
|
||||||
@@ -15,9 +15,9 @@ services:
|
|||||||
- "9848:9848"
|
- "9848:9848"
|
||||||
- "9849:9849"
|
- "9849:9849"
|
||||||
depends_on:
|
depends_on:
|
||||||
- ruoyi-mysql
|
- tongran-mysql
|
||||||
ruoyi-mysql:
|
tongran-mysql:
|
||||||
container_name: ruoyi-mysql
|
container_name: tongran-mysql
|
||||||
image: mysql:5.7
|
image: mysql:5.7
|
||||||
build:
|
build:
|
||||||
context: ./mysql
|
context: ./mysql
|
||||||
@@ -38,103 +38,103 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
MYSQL_DATABASE: 'ry-cloud'
|
MYSQL_DATABASE: 'ry-cloud'
|
||||||
MYSQL_ROOT_PASSWORD: password
|
MYSQL_ROOT_PASSWORD: password
|
||||||
ruoyi-redis:
|
tongran-redis:
|
||||||
container_name: ruoyi-redis
|
container_name: tongran-redis
|
||||||
image: redis
|
image: redis
|
||||||
build:
|
build:
|
||||||
context: ./redis
|
context: ./redis
|
||||||
ports:
|
ports:
|
||||||
- "6379:6379"
|
- "6379:6379"
|
||||||
volumes:
|
volumes:
|
||||||
- ./redis/conf/redis.conf:/home/ruoyi/redis/redis.conf
|
- ./redis/conf/redis.conf:/home/tongran/redis/redis.conf
|
||||||
- ./redis/data:/data
|
- ./redis/data:/data
|
||||||
command: redis-server /home/ruoyi/redis/redis.conf
|
command: redis-server /home/tongran/redis/redis.conf
|
||||||
ruoyi-nginx:
|
tongran-nginx:
|
||||||
container_name: ruoyi-nginx
|
container_name: tongran-nginx
|
||||||
image: nginx
|
image: nginx
|
||||||
build:
|
build:
|
||||||
context: ./nginx
|
context: ./nginx
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/html/dist:/home/ruoyi/projects/ruoyi-ui
|
- ./nginx/html/dist:/home/tongran/projects/tongran-ui
|
||||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||||
- ./nginx/logs:/var/log/nginx
|
- ./nginx/logs:/var/log/nginx
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||||
depends_on:
|
depends_on:
|
||||||
- ruoyi-gateway
|
- tongran-gateway
|
||||||
links:
|
links:
|
||||||
- ruoyi-gateway
|
- tongran-gateway
|
||||||
ruoyi-gateway:
|
tongran-gateway:
|
||||||
container_name: ruoyi-gateway
|
container_name: tongran-gateway
|
||||||
build:
|
build:
|
||||||
context: ./ruoyi/gateway
|
context: ./tongran/gateway
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
depends_on:
|
depends_on:
|
||||||
- ruoyi-redis
|
- tongran-redis
|
||||||
links:
|
links:
|
||||||
- ruoyi-redis
|
- tongran-redis
|
||||||
ruoyi-auth:
|
tongran-auth:
|
||||||
container_name: ruoyi-auth
|
container_name: tongran-auth
|
||||||
build:
|
build:
|
||||||
context: ./ruoyi/auth
|
context: ./tongran/auth
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9200:9200"
|
- "9200:9200"
|
||||||
depends_on:
|
depends_on:
|
||||||
- ruoyi-redis
|
- tongran-redis
|
||||||
links:
|
links:
|
||||||
- ruoyi-redis
|
- tongran-redis
|
||||||
ruoyi-modules-system:
|
tongran-modules-system:
|
||||||
container_name: ruoyi-modules-system
|
container_name: tongran-modules-system
|
||||||
build:
|
build:
|
||||||
context: ./ruoyi/modules/system
|
context: ./tongran/modules/system
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9201:9201"
|
- "9201:9201"
|
||||||
depends_on:
|
depends_on:
|
||||||
- ruoyi-redis
|
- tongran-redis
|
||||||
- ruoyi-mysql
|
- tongran-mysql
|
||||||
links:
|
links:
|
||||||
- ruoyi-redis
|
- tongran-redis
|
||||||
- ruoyi-mysql
|
- tongran-mysql
|
||||||
ruoyi-modules-gen:
|
tongran-modules-gen:
|
||||||
container_name: ruoyi-modules-gen
|
container_name: tongran-modules-gen
|
||||||
build:
|
build:
|
||||||
context: ./ruoyi/modules/gen
|
context: ./tongran/modules/gen
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9202:9202"
|
- "9202:9202"
|
||||||
depends_on:
|
depends_on:
|
||||||
- ruoyi-mysql
|
- tongran-mysql
|
||||||
links:
|
links:
|
||||||
- ruoyi-mysql
|
- tongran-mysql
|
||||||
ruoyi-modules-job:
|
tongran-modules-job:
|
||||||
container_name: ruoyi-modules-job
|
container_name: tongran-modules-job
|
||||||
build:
|
build:
|
||||||
context: ./ruoyi/modules/job
|
context: ./tongran/modules/job
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9203:9203"
|
- "9203:9203"
|
||||||
depends_on:
|
depends_on:
|
||||||
- ruoyi-mysql
|
- tongran-mysql
|
||||||
links:
|
links:
|
||||||
- ruoyi-mysql
|
- tongran-mysql
|
||||||
ruoyi-modules-file:
|
tongran-modules-file:
|
||||||
container_name: ruoyi-modules-file
|
container_name: tongran-modules-file
|
||||||
build:
|
build:
|
||||||
context: ./ruoyi/modules/file
|
context: ./tongran/modules/file
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9300:9300"
|
- "9300:9300"
|
||||||
volumes:
|
volumes:
|
||||||
- ./ruoyi/uploadPath:/home/ruoyi/uploadPath
|
- ./tongran/uploadPath:/home/tongran/uploadPath
|
||||||
ruoyi-visual-monitor:
|
tongran-visual-monitor:
|
||||||
container_name: ruoyi-visual-monitor
|
container_name: tongran-visual-monitor
|
||||||
build:
|
build:
|
||||||
context: ./ruoyi/visual/monitor
|
context: ./tongran/visual/monitor
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "9100:9100"
|
- "9100:9100"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM mysql:5.7
|
FROM mysql:5.7
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 执行sql脚本
|
# 执行sql脚本
|
||||||
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
ADD ./db/*.sql /docker-entrypoint-initdb.d/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
spring.datasource.platform=mysql
|
spring.datasource.platform=mysql
|
||||||
db.num=1
|
db.num=1
|
||||||
db.url.0=jdbc:mysql://ruoyi-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
db.url.0=jdbc:mysql://tongran-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
|
||||||
db.user=root
|
db.user=root
|
||||||
db.password=123456
|
db.password=123456
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ management.metrics.export.influx.enabled=false
|
|||||||
server.tomcat.accesslog.enabled=true
|
server.tomcat.accesslog.enabled=true
|
||||||
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
|
||||||
|
|
||||||
server.tomcat.basedir=/home/ruoyi/nacos/tomcat/logs
|
server.tomcat.basedir=/home/tongran/nacos/tomcat/logs
|
||||||
|
|
||||||
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM nacos/nacos-server
|
FROM nacos/nacos-server
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 复制conf文件到路径
|
# 复制conf文件到路径
|
||||||
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
COPY ./conf/application.properties /home/nacos/conf/application.properties
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ http {
|
|||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /home/ruoyi/projects/ruoyi-ui;
|
root /home/tongran/projects/tongran-ui;
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ http {
|
|||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header REMOTE-HOST $remote_addr;
|
proxy_set_header REMOTE-HOST $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_pass http://ruoyi-gateway:8080/;
|
proxy_pass http://tongran-gateway:8080/;
|
||||||
}
|
}
|
||||||
|
|
||||||
# 避免actuator暴露
|
# 避免actuator暴露
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM nginx
|
FROM nginx
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/ruoyi/projects/ruoyi-ui
|
VOLUME /home/tongran/projects/tongran-ui
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/ruoyi/projects/ruoyi-ui
|
RUN mkdir -p /home/tongran/projects/tongran-ui
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/ruoyi/projects/ruoyi-ui
|
WORKDIR /home/tongran/projects/tongran-ui
|
||||||
# 复制conf文件到路径
|
# 复制conf文件到路径
|
||||||
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
|
||||||
# 复制html文件到路径
|
# 复制html文件到路径
|
||||||
COPY ./html/dist /home/ruoyi/projects/ruoyi-ui
|
COPY ./html/dist /home/tongran/projects/tongran-ui
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM redis
|
FROM redis
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/ruoyi/redis
|
VOLUME /home/tongran/redis
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/ruoyi/redis
|
RUN mkdir -p /home/tongran/redis
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/ruoyi/redis
|
WORKDIR /home/tongran/redis
|
||||||
# 复制conf文件到路径
|
# 复制conf文件到路径
|
||||||
COPY ./conf/redis.conf /home/ruoyi/redis/redis.conf
|
COPY ./conf/redis.conf /home/tongran/redis/redis.conf
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/ruoyi
|
VOLUME /home/tongran
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/ruoyi
|
RUN mkdir -p /home/tongran
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/ruoyi
|
WORKDIR /home/tongran
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/ruoyi-auth.jar /home/ruoyi/ruoyi-auth.jar
|
COPY ./jar/tongran-auth.jar /home/tongran/tongran-auth.jar
|
||||||
# 启动认证服务
|
# 启动认证服务
|
||||||
ENTRYPOINT ["java","-jar","ruoyi-auth.jar"]
|
ENTRYPOINT ["java","-jar","tongran-auth.jar"]
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/ruoyi
|
VOLUME /home/tongran
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/ruoyi
|
RUN mkdir -p /home/tongran
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/ruoyi
|
WORKDIR /home/tongran
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/ruoyi-gateway.jar /home/ruoyi/ruoyi-gateway.jar
|
COPY ./jar/tongran-gateway.jar /home/tongran/tongran-gateway.jar
|
||||||
# 启动网关服务
|
# 启动网关服务
|
||||||
ENTRYPOINT ["java","-jar","ruoyi-gateway.jar"]
|
ENTRYPOINT ["java","-jar","tongran-gateway.jar"]
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/ruoyi
|
VOLUME /home/tongran
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/ruoyi
|
RUN mkdir -p /home/tongran
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/ruoyi
|
WORKDIR /home/tongran
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/ruoyi-modules-file.jar /home/ruoyi/ruoyi-modules-file.jar
|
COPY ./jar/tongran-modules-file.jar /home/tongran/tongran-modules-file.jar
|
||||||
# 启动文件服务
|
# 启动文件服务
|
||||||
ENTRYPOINT ["java","-jar","ruoyi-modules-file.jar"]
|
ENTRYPOINT ["java","-jar","tongran-modules-file.jar"]
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/ruoyi
|
VOLUME /home/tongran
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/ruoyi
|
RUN mkdir -p /home/tongran
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/ruoyi
|
WORKDIR /home/tongran
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/ruoyi-modules-gen.jar /home/ruoyi/ruoyi-modules-gen.jar
|
COPY ./jar/tongran-modules-gen.jar /home/tongran/tongran-modules-gen.jar
|
||||||
# 启动代码生成服务
|
# 启动代码生成服务
|
||||||
ENTRYPOINT ["java","-jar","ruoyi-modules-gen.jar"]
|
ENTRYPOINT ["java","-jar","tongran-modules-gen.jar"]
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/ruoyi
|
VOLUME /home/tongran
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/ruoyi
|
RUN mkdir -p /home/tongran
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/ruoyi
|
WORKDIR /home/tongran
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/ruoyi-modules-job.jar /home/ruoyi/ruoyi-modules-job.jar
|
COPY ./jar/tongran-modules-job.jar /home/tongran/tongran-modules-job.jar
|
||||||
# 启动定时任务服务
|
# 启动定时任务服务
|
||||||
ENTRYPOINT ["java","-jar","ruoyi-modules-job.jar"]
|
ENTRYPOINT ["java","-jar","tongran-modules-job.jar"]
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/ruoyi
|
VOLUME /home/tongran
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/ruoyi
|
RUN mkdir -p /home/tongran
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/ruoyi
|
WORKDIR /home/tongran
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/ruoyi-modules-system.jar /home/ruoyi/ruoyi-modules-system.jar
|
COPY ./jar/tongran-modules-system.jar /home/tongran/tongran-modules-system.jar
|
||||||
# 启动系统服务
|
# 启动系统服务
|
||||||
ENTRYPOINT ["java","-jar","ruoyi-modules-system.jar"]
|
ENTRYPOINT ["java","-jar","tongran-modules-system.jar"]
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
# 基础镜像
|
# 基础镜像
|
||||||
FROM openjdk:8-jre
|
FROM openjdk:8-jre
|
||||||
# author
|
# author
|
||||||
MAINTAINER ruoyi
|
MAINTAINER tongran
|
||||||
|
|
||||||
# 挂载目录
|
# 挂载目录
|
||||||
VOLUME /home/ruoyi
|
VOLUME /home/tongran
|
||||||
# 创建目录
|
# 创建目录
|
||||||
RUN mkdir -p /home/ruoyi
|
RUN mkdir -p /home/tongran
|
||||||
# 指定路径
|
# 指定路径
|
||||||
WORKDIR /home/ruoyi
|
WORKDIR /home/tongran
|
||||||
# 复制jar文件到路径
|
# 复制jar文件到路径
|
||||||
COPY ./jar/ruoyi-visual-monitor.jar /home/ruoyi/ruoyi-visual-monitor.jar
|
COPY ./jar/tongran-visual-monitor.jar /home/tongran/tongran-visual-monitor.jar
|
||||||
# 启动系统服务
|
# 启动系统服务
|
||||||
ENTRYPOINT ["java","-jar","ruoyi-visual-monitor.jar"]
|
ENTRYPOINT ["java","-jar","tongran-visual-monitor.jar"]
|
||||||
@@ -4,16 +4,15 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>tongran</artifactId>
|
||||||
<version>3.6.6</version>
|
<version>3.6.6</version>
|
||||||
|
|
||||||
<name>ruoyi</name>
|
<name>tongran</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<description>彤然微服务系统</description>
|
||||||
<description>若依微服务系统</description>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<ruoyi.version>3.6.6</ruoyi.version>
|
<tongran.version>3.6.6</tongran.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
@@ -184,85 +183,85 @@
|
|||||||
|
|
||||||
<!-- 核心模块 -->
|
<!-- 核心模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-core</artifactId>
|
<artifactId>tongran-common-core</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 接口模块 -->
|
<!-- 接口模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-swagger</artifactId>
|
<artifactId>tongran-common-swagger</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 安全模块 -->
|
<!-- 安全模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-security</artifactId>
|
<artifactId>tongran-common-security</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 数据脱敏 -->
|
<!-- 数据脱敏 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-sensitive</artifactId>
|
<artifactId>tongran-common-sensitive</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 权限范围 -->
|
<!-- 权限范围 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-datascope</artifactId>
|
<artifactId>tongran-common-datascope</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 多数据源 -->
|
<!-- 多数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-datasource</artifactId>
|
<artifactId>tongran-common-datasource</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 分布式事务 -->
|
<!-- 分布式事务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-seata</artifactId>
|
<artifactId>tongran-common-seata</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 日志记录 -->
|
<!-- 日志记录 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-log</artifactId>
|
<artifactId>tongran-common-log</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 缓存服务 -->
|
<!-- 缓存服务 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-redis</artifactId>
|
<artifactId>tongran-common-redis</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 系统接口 -->
|
<!-- 系统接口 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-api-system</artifactId>
|
<artifactId>tongran-api-system</artifactId>
|
||||||
<version>${ruoyi.version}</version>
|
<version>${tongran.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>ruoyi-auth</module>
|
<module>tongran-auth</module>
|
||||||
<module>ruoyi-gateway</module>
|
<module>tongran-gateway</module>
|
||||||
<module>ruoyi-visual</module>
|
<module>tongran-visual</module>
|
||||||
<module>ruoyi-modules</module>
|
<module>tongran-modules</module>
|
||||||
<module>ruoyi-rocketmq</module>
|
<module>tongran-rocketmq</module>
|
||||||
<module>ruoyi-api</module>
|
<module>tongran-api</module>
|
||||||
<module>ruoyi-common</module>
|
<module>tongran-common</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
com.ruoyi.system.api.factory.RemoteUserFallbackFactory
|
|
||||||
com.ruoyi.system.api.factory.RemoteLogFallbackFactory
|
|
||||||
com.ruoyi.system.api.factory.RemoteFileFallbackFactory
|
|
||||||
com.ruoyi.system.api.factory.RemoteRevenueConfigFallbackFactory
|
|
||||||
com.ruoyi.system.api.factory.RemoteRocketMqFallbackFactory
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>com.ruoyi</groupId>
|
|
||||||
<artifactId>ruoyi</artifactId>
|
|
||||||
<version>3.6.6</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>ruoyi-common-log</module>
|
|
||||||
<module>ruoyi-common-core</module>
|
|
||||||
<module>ruoyi-common-redis</module>
|
|
||||||
<module>ruoyi-common-seata</module>
|
|
||||||
<module>ruoyi-common-swagger</module>
|
|
||||||
<module>ruoyi-common-security</module>
|
|
||||||
<module>ruoyi-common-sensitive</module>
|
|
||||||
<module>ruoyi-common-datascope</module>
|
|
||||||
<module>ruoyi-common-datasource</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<artifactId>ruoyi-common</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
ruoyi-common通用模块
|
|
||||||
</description>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
-29
@@ -1,29 +0,0 @@
|
|||||||
package com.ruoyi.common.core.constant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 服务名称
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
public class ServiceNameConstants
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 认证服务的serviceid
|
|
||||||
*/
|
|
||||||
public static final String AUTH_SERVICE = "ruoyi-auth";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 系统模块的serviceid
|
|
||||||
*/
|
|
||||||
public static final String SYSTEM_SERVICE = "ruoyi-system";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件服务的serviceid
|
|
||||||
*/
|
|
||||||
public static final String FILE_SERVICE = "ruoyi-file";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* rocketMq的serviceid
|
|
||||||
*/
|
|
||||||
public static final String ROCKETMQ_SERVICE = "ruoyi-rocketmq";
|
|
||||||
}
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
com.ruoyi.common.core.utils.SpringUtils
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
com.ruoyi.common.datascope.aspect.DataScopeAspect
|
|
||||||
-2
@@ -1,2 +0,0 @@
|
|||||||
com.ruoyi.common.log.service.AsyncLogService
|
|
||||||
com.ruoyi.common.log.aspect.LogAspect
|
|
||||||
-2
@@ -1,2 +0,0 @@
|
|||||||
com.ruoyi.common.redis.configure.RedisConfig
|
|
||||||
com.ruoyi.common.redis.service.RedisService
|
|
||||||
-89
@@ -1,89 +0,0 @@
|
|||||||
package com.ruoyi.common.security.aspect;
|
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import org.aspectj.lang.ProceedingJoinPoint;
|
|
||||||
import org.aspectj.lang.annotation.Around;
|
|
||||||
import org.aspectj.lang.annotation.Aspect;
|
|
||||||
import org.aspectj.lang.annotation.Pointcut;
|
|
||||||
import org.aspectj.lang.reflect.MethodSignature;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import com.ruoyi.common.security.annotation.RequiresLogin;
|
|
||||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
|
||||||
import com.ruoyi.common.security.annotation.RequiresRoles;
|
|
||||||
import com.ruoyi.common.security.auth.AuthUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 基于 Spring Aop 的注解鉴权
|
|
||||||
*
|
|
||||||
* @author kong
|
|
||||||
*/
|
|
||||||
@Aspect
|
|
||||||
@Component
|
|
||||||
public class PreAuthorizeAspect
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 构建
|
|
||||||
*/
|
|
||||||
public PreAuthorizeAspect()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 定义AOP签名 (切入所有使用鉴权注解的方法)
|
|
||||||
*/
|
|
||||||
public static final String POINTCUT_SIGN = " @annotation(com.ruoyi.common.security.annotation.RequiresLogin) || "
|
|
||||||
+ "@annotation(com.ruoyi.common.security.annotation.RequiresPermissions) || "
|
|
||||||
+ "@annotation(com.ruoyi.common.security.annotation.RequiresRoles)";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 声明AOP签名
|
|
||||||
*/
|
|
||||||
@Pointcut(POINTCUT_SIGN)
|
|
||||||
public void pointcut()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 环绕切入
|
|
||||||
*
|
|
||||||
* @param joinPoint 切面对象
|
|
||||||
* @return 底层方法执行后的返回值
|
|
||||||
* @throws Throwable 底层方法抛出的异常
|
|
||||||
*/
|
|
||||||
@Around("pointcut()")
|
|
||||||
public Object around(ProceedingJoinPoint joinPoint) throws Throwable
|
|
||||||
{
|
|
||||||
// 注解鉴权
|
|
||||||
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
|
|
||||||
checkMethodAnnotation(signature.getMethod());
|
|
||||||
// 执行原有逻辑
|
|
||||||
return joinPoint.proceed();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 对一个Method对象进行注解检查
|
|
||||||
*/
|
|
||||||
public void checkMethodAnnotation(Method method)
|
|
||||||
{
|
|
||||||
// 校验 @RequiresLogin 注解
|
|
||||||
RequiresLogin requiresLogin = method.getAnnotation(RequiresLogin.class);
|
|
||||||
if (requiresLogin != null)
|
|
||||||
{
|
|
||||||
AuthUtil.checkLogin();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 校验 @RequiresRoles 注解
|
|
||||||
RequiresRoles requiresRoles = method.getAnnotation(RequiresRoles.class);
|
|
||||||
if (requiresRoles != null)
|
|
||||||
{
|
|
||||||
AuthUtil.checkRole(requiresRoles);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 校验 @RequiresPermissions 注解
|
|
||||||
RequiresPermissions requiresPermissions = method.getAnnotation(RequiresPermissions.class);
|
|
||||||
if (requiresPermissions != null)
|
|
||||||
{
|
|
||||||
AuthUtil.checkPermi(requiresPermissions);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-5
@@ -1,5 +0,0 @@
|
|||||||
com.ruoyi.common.security.config.WebMvcConfig
|
|
||||||
com.ruoyi.common.security.service.TokenService
|
|
||||||
com.ruoyi.common.security.aspect.PreAuthorizeAspect
|
|
||||||
com.ruoyi.common.security.aspect.InnerAuthAspect
|
|
||||||
com.ruoyi.common.security.handler.GlobalExceptionHandler
|
|
||||||
-1
@@ -1 +0,0 @@
|
|||||||
com.ruoyi.common.swagger.config.SpringDocAutoConfiguration
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/ruoyi-job" />
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
|
||||||
<logger name="com.ruoyi" level="info" />
|
|
||||||
<!-- Spring日志级别控制 -->
|
|
||||||
<logger name="org.springframework" level="warn" />
|
|
||||||
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="console" />
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="file_info" />
|
|
||||||
<appender-ref ref="file_error" />
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
package com.ruoyi.mtragent;
|
|
||||||
|
|
||||||
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
|
||||||
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 平台管理模块
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
*/
|
|
||||||
@EnableCustomConfig
|
|
||||||
@EnableRyFeignClients
|
|
||||||
@SpringBootApplication
|
|
||||||
@EnableAsync
|
|
||||||
public class RuoYiMtragentApplication
|
|
||||||
{
|
|
||||||
public static void main(String[] args)
|
|
||||||
{
|
|
||||||
SpringApplication.run(RuoYiMtragentApplication.class, args);
|
|
||||||
System.out.println("(♥◠‿◠)ノ゙ RuoYiMtragent模块启动成功 ლ(´ڡ`ლ)゙");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-86
@@ -1,86 +0,0 @@
|
|||||||
package com.ruoyi.mtragent.domain;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* mtr探测丢包clinetId记录对象 all_mtr_client
|
|
||||||
*
|
|
||||||
* @author gyt
|
|
||||||
* @date 2025-11-24
|
|
||||||
*/
|
|
||||||
public class AllMtrClient extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 主键ID */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** MTR客户端ID */
|
|
||||||
@Excel(name = "MTR客户端ID")
|
|
||||||
private String mtrClientId;
|
|
||||||
|
|
||||||
/** 客户端ID */
|
|
||||||
@Excel(name = "客户端ID")
|
|
||||||
private String clientId;
|
|
||||||
|
|
||||||
/** 公网IP地址 */
|
|
||||||
@Excel(name = "公网IP地址")
|
|
||||||
private String publicIp;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMtrClientId(String mtrClientId)
|
|
||||||
{
|
|
||||||
this.mtrClientId = mtrClientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMtrClientId()
|
|
||||||
{
|
|
||||||
return mtrClientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClientId(String clientId)
|
|
||||||
{
|
|
||||||
this.clientId = clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClientId()
|
|
||||||
{
|
|
||||||
return clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPublicIp(String publicIp)
|
|
||||||
{
|
|
||||||
this.publicIp = publicIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPublicIp()
|
|
||||||
{
|
|
||||||
return publicIp;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("mtrClientId", getMtrClientId())
|
|
||||||
.append("clientId", getClientId())
|
|
||||||
.append("publicIp", getPublicIp())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-65
@@ -1,65 +0,0 @@
|
|||||||
package com.ruoyi.mtragent.mapper;
|
|
||||||
|
|
||||||
|
|
||||||
import com.ruoyi.mtragent.domain.RmNetworkInterface;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 客户端网络接口信息Mapper接口
|
|
||||||
*
|
|
||||||
* @author gyt
|
|
||||||
* @date 2025-10-14
|
|
||||||
*/
|
|
||||||
public interface RmNetworkInterfaceMapper
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param id 客户端网络接口信息主键
|
|
||||||
* @return 客户端网络接口信息
|
|
||||||
*/
|
|
||||||
public RmNetworkInterface selectRmNetworkInterfaceById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询客户端网络接口信息列表
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 客户端网络接口信息集合
|
|
||||||
*/
|
|
||||||
public List<RmNetworkInterface> selectRmNetworkInterfaceList(RmNetworkInterface rmNetworkInterface);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertRmNetworkInterface(RmNetworkInterface rmNetworkInterface);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateRmNetworkInterface(RmNetworkInterface rmNetworkInterface);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param id 客户端网络接口信息主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteRmNetworkInterfaceById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteRmNetworkInterfaceByIds(Long[] ids);
|
|
||||||
|
|
||||||
int updateRmNetworkInterfaceByMac(RmNetworkInterface rmNetworkInterface);
|
|
||||||
}
|
|
||||||
-182
@@ -1,182 +0,0 @@
|
|||||||
package com.ruoyi.mtragent.service.impl;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.ruoyi.common.core.enums.MsgEnum;
|
|
||||||
import com.ruoyi.common.core.utils.DateUtils;
|
|
||||||
import com.ruoyi.mtragent.domain.DeviceMessage;
|
|
||||||
import com.ruoyi.mtragent.domain.RmNetworkInterface;
|
|
||||||
import com.ruoyi.mtragent.domain.vo.PolicyTypeVo;
|
|
||||||
import com.ruoyi.mtragent.mapper.RmNetworkInterfaceMapper;
|
|
||||||
import com.ruoyi.mtragent.model.ProducerMode;
|
|
||||||
import com.ruoyi.mtragent.producer.MessageProducer;
|
|
||||||
import com.ruoyi.mtragent.service.IRmNetworkInterfaceService;
|
|
||||||
import com.ruoyi.system.api.domain.RouteMsg;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.time.Instant;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 客户端网络接口信息Service业务层处理
|
|
||||||
*
|
|
||||||
* @author gyt
|
|
||||||
* @date 2025-10-14
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class RmNetworkInterfaceServiceImpl implements IRmNetworkInterfaceService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private RmNetworkInterfaceMapper rmNetworkInterfaceMapper;
|
|
||||||
@Autowired
|
|
||||||
private ProducerMode producerMode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param id 客户端网络接口信息主键
|
|
||||||
* @return 客户端网络接口信息
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public RmNetworkInterface selectRmNetworkInterfaceById(Long id)
|
|
||||||
{
|
|
||||||
return rmNetworkInterfaceMapper.selectRmNetworkInterfaceById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询客户端网络接口信息列表
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 客户端网络接口信息
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<RmNetworkInterface> selectRmNetworkInterfaceList(RmNetworkInterface rmNetworkInterface)
|
|
||||||
{
|
|
||||||
return rmNetworkInterfaceMapper.selectRmNetworkInterfaceList(rmNetworkInterface);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertRmNetworkInterface(RmNetworkInterface rmNetworkInterface)
|
|
||||||
{
|
|
||||||
rmNetworkInterface.setCreateTime(DateUtils.getNowDate());
|
|
||||||
return rmNetworkInterfaceMapper.insertRmNetworkInterface(rmNetworkInterface);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateRmNetworkInterface(RmNetworkInterface rmNetworkInterface)
|
|
||||||
{
|
|
||||||
rmNetworkInterface.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
return rmNetworkInterfaceMapper.updateRmNetworkInterface(rmNetworkInterface);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateRmNetworkInterfaceByMac(RmNetworkInterface rmNetworkInterface) {
|
|
||||||
rmNetworkInterface.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
return rmNetworkInterfaceMapper.updateRmNetworkInterfaceByMac(rmNetworkInterface);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的客户端网络接口信息主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteRmNetworkInterfaceByIds(Long[] ids)
|
|
||||||
{
|
|
||||||
return rmNetworkInterfaceMapper.deleteRmNetworkInterfaceByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除客户端网络接口信息信息
|
|
||||||
*
|
|
||||||
* @param id 客户端网络接口信息主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteRmNetworkInterfaceById(Long id)
|
|
||||||
{
|
|
||||||
return rmNetworkInterfaceMapper.deleteRmNetworkInterfaceById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定公网ip
|
|
||||||
* @param rmNetworkInterface
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int bindPublicIp(RmNetworkInterface rmNetworkInterface) {
|
|
||||||
return rmNetworkInterfaceMapper.updateRmNetworkInterface(rmNetworkInterface);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新路由信息
|
|
||||||
* @param clientId
|
|
||||||
*/
|
|
||||||
public void updateRouteMsg(String clientId){
|
|
||||||
MessageProducer messageProducer = new MessageProducer();
|
|
||||||
// 查询路由是否有变化
|
|
||||||
RmNetworkInterface rmNetworkInterface = new RmNetworkInterface();
|
|
||||||
rmNetworkInterface.setClientId(clientId);
|
|
||||||
rmNetworkInterface.setBindIp("2");
|
|
||||||
List<RmNetworkInterface> networkInterfaces = rmNetworkInterfaceMapper.selectRmNetworkInterfaceList(rmNetworkInterface);
|
|
||||||
if(!networkInterfaces.isEmpty()){
|
|
||||||
List<RmNetworkInterface> oldList = networkInterfaces.stream()
|
|
||||||
.filter(networkInterface -> networkInterface.getNewFlag() == 0)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
if(!oldList.isEmpty()){
|
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
|
||||||
// 增加静态路由
|
|
||||||
RmNetworkInterface oldMsg = oldList.get(0);
|
|
||||||
RouteMsg oldRouteMsg = new RouteMsg();
|
|
||||||
oldRouteMsg.setGateway(oldMsg.getGateway());
|
|
||||||
oldRouteMsg.setName(oldMsg.getInterfaceName());
|
|
||||||
resultMap.put("delRoute", oldRouteMsg);
|
|
||||||
List<RmNetworkInterface> newList = networkInterfaces.stream()
|
|
||||||
.filter(networkInterface -> networkInterface.getNewFlag() == 1)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
RmNetworkInterface newMsg = newList.get(0);
|
|
||||||
RouteMsg newRouteMsg = new RouteMsg();
|
|
||||||
newRouteMsg.setGateway(newMsg.getGateway());
|
|
||||||
newRouteMsg.setName(newMsg.getInterfaceName());
|
|
||||||
resultMap.put("addRoute", newRouteMsg);
|
|
||||||
resultMap.put("upTime", Instant.now().getEpochSecond());
|
|
||||||
PolicyTypeVo policyTypeVo = new PolicyTypeVo();
|
|
||||||
policyTypeVo.setRoutes(JSONObject.toJSONString(resultMap));
|
|
||||||
String configJson = JSONObject.toJSONString(policyTypeVo);
|
|
||||||
// 构建发送消息
|
|
||||||
DeviceMessage message = new DeviceMessage();
|
|
||||||
message.setClientId(clientId);
|
|
||||||
message.setData(configJson);
|
|
||||||
message.setDataType(MsgEnum.获取最新策略应答.getValue());
|
|
||||||
|
|
||||||
messageProducer.sendAsyncProducerMessage(
|
|
||||||
producerMode.getAgentTopic(),
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
JSONObject.toJSONString(message)
|
|
||||||
);
|
|
||||||
// 更新网卡信息表
|
|
||||||
RmNetworkInterface updateQuery = new RmNetworkInterface();
|
|
||||||
updateQuery.setNewFlag(999);
|
|
||||||
updateQuery.setMacAddress(networkInterfaces.get(0).getMacAddress());
|
|
||||||
rmNetworkInterfaceMapper.updateRmNetworkInterfaceByMac(updateQuery);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/ruoyi-system" />
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
|
||||||
<logger name="com.ruoyi" level="info" />
|
|
||||||
<!-- Spring日志级别控制 -->
|
|
||||||
<logger name="org.springframework" level="warn" />
|
|
||||||
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="console" />
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="file_info" />
|
|
||||||
<appender-ref ref="file_error" />
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
||||||
-420
@@ -1,420 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.system.mapper.RmResourceRegistrationMapper">
|
|
||||||
|
|
||||||
<resultMap type="RmResourceRegistration" id="RmResourceRegistrationResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="hardwareSn" column="hardware_sn" />
|
|
||||||
<result property="resourceType" column="resource_type" />
|
|
||||||
<result property="resourceName" column="resource_name" />
|
|
||||||
<result property="ipAddress" column="ip_address" />
|
|
||||||
<result property="resourcePort" column="resource_port" />
|
|
||||||
<result property="otherPortName" column="other_port_name" />
|
|
||||||
<result property="agentVersion" column="agent_version" />
|
|
||||||
<result property="protocol" column="protocol" />
|
|
||||||
<result property="resourceVersion" column="resource_version" />
|
|
||||||
<result property="rwPermission" column="rw_permission" />
|
|
||||||
<result property="snmpDetect" column="snmp_detect" />
|
|
||||||
<result property="teamName" column="team_name" />
|
|
||||||
<result property="snmpCollectAddr" column="snmp_collect_addr" />
|
|
||||||
<result property="snmpCollectPort" column="snmp_collect_port" />
|
|
||||||
<result property="securityLevel" column="security_level" />
|
|
||||||
<result property="encryption" column="encryption" />
|
|
||||||
<result property="resourceUserName" column="resource_user_name" />
|
|
||||||
<result property="resourcePwd" column="resource_pwd" />
|
|
||||||
<result property="registrationStatus" column="registration_status" />
|
|
||||||
<result property="onlineStatus" column="online_status" />
|
|
||||||
<result property="switchOnlineStatus" column="switch_online_status" />
|
|
||||||
<result property="description" column="description" />
|
|
||||||
<result property="customerId" column="customer_id" />
|
|
||||||
<result property="customerName" column="customer_name" />
|
|
||||||
<result property="serviceNumber" column="service_number" />
|
|
||||||
<result property="createTime" column="create_time" />
|
|
||||||
<result property="updateTime" column="update_time" />
|
|
||||||
<result property="creatorId" column="creator_id" />
|
|
||||||
<result property="creatorName" column="creator_name" />
|
|
||||||
<result property="updaterId" column="updater_id" />
|
|
||||||
<result property="updaterName" column="updater_name" />
|
|
||||||
<result property="clientId" column="client_id" />
|
|
||||||
<result property="operator" column="operator" />
|
|
||||||
<result property="province" column="province" />
|
|
||||||
<result property="publicIp" column="public_ip" />
|
|
||||||
<result property="businessName" column="business_name" />
|
|
||||||
<result property="logicalNodeId" column="logical_node_id" />
|
|
||||||
<result property="multiPublicIpStatus" column="multi_public_ip_status" />
|
|
||||||
<result property="heartbeatCount" column="heartbeat_count" />
|
|
||||||
<result property="heartbeatInterval" column="heartbeat_interval" />
|
|
||||||
<result property="onboardTime" column="onboard_time" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectRmResourceRegistrationVo">
|
|
||||||
select id, hardware_sn, resource_type, resource_name, ip_address, resource_port, other_port_name,
|
|
||||||
agent_version, protocol, resource_version, rw_permission, snmp_detect, team_name, snmp_collect_addr,
|
|
||||||
snmp_collect_port, security_level, encryption, resource_user_name, resource_pwd, registration_status,
|
|
||||||
online_status, switch_online_status, description, customer_id, customer_name, service_number,
|
|
||||||
create_time, update_time, creator_id, creator_name, updater_id, updater_name, client_id, operator,
|
|
||||||
province, public_ip, business_name, logical_node_id, multi_public_ip_status, heartbeat_count,
|
|
||||||
heartbeat_interval, onboard_time from rm_resource_registration
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectRmResourceRegistrationList" parameterType="RmResourceRegistration" resultMap="RmResourceRegistrationResult">
|
|
||||||
<include refid="selectRmResourceRegistrationVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
|
||||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
|
||||||
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
|
|
||||||
<if test="resourcePort != null and resourcePort != ''"> and resource_port = #{resourcePort}</if>
|
|
||||||
<if test="otherPortName != null and otherPortName != ''"> and other_port_name like concat('%', #{otherPortName}, '%')</if>
|
|
||||||
<if test="agentVersion != null and agentVersion != ''"> and agent_version = #{agentVersion}</if>
|
|
||||||
<if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
|
|
||||||
<if test="resourceVersion != null and resourceVersion != ''"> and resource_version = #{resourceVersion}</if>
|
|
||||||
<if test="rwPermission != null and rwPermission != ''"> and rw_permission = #{rwPermission}</if>
|
|
||||||
<if test="snmpDetect != null and snmpDetect != ''"> and snmp_detect = #{snmpDetect}</if>
|
|
||||||
<if test="teamName != null and teamName != ''"> and team_name like concat('%', #{teamName}, '%')</if>
|
|
||||||
<if test="snmpCollectAddr != null and snmpCollectAddr != ''"> and snmp_collect_addr = #{snmpCollectAddr}</if>
|
|
||||||
<if test="snmpCollectPort != null "> and snmp_collect_port = #{snmpCollectPort}</if>
|
|
||||||
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
|
|
||||||
<if test="encryption != null and encryption != ''"> and encryption = #{encryption}</if>
|
|
||||||
<if test="resourceUserName != null and resourceUserName != ''"> and resource_user_name like concat('%', #{resourceUserName}, '%')</if>
|
|
||||||
<if test="resourcePwd != null and resourcePwd != ''"> and resource_pwd = #{resourcePwd}</if>
|
|
||||||
<if test="registrationStatus != null and registrationStatus != ''"> and registration_status = #{registrationStatus}</if>
|
|
||||||
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
|
||||||
<if test="switchOnlineStatus != null and switchOnlineStatus != ''"> and switch_online_status = #{switchOnlineStatus}</if>
|
|
||||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
|
||||||
<if test="customerId != null "> and customer_id = #{customerId}</if>
|
|
||||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
|
||||||
<if test="serviceNumber != null and serviceNumber != ''"> and service_number = #{serviceNumber}</if>
|
|
||||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
|
||||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
|
||||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
|
||||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
|
||||||
<if test="queryName != null and queryName != ''"> and (hardware_sn = #{queryName} or resource_name like concat('%', #{queryName}, '%')) </if>
|
|
||||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
|
||||||
<if test="operator != null and operator != ''"> and operator = #{operator}</if>
|
|
||||||
<if test="province != null and province != ''"> and province = #{province}</if>
|
|
||||||
<if test="publicIp != null and publicIp != ''"> and public_ip = #{publicIp}</if>
|
|
||||||
<if test="businessName != null and businessName != ''"> and business_name like concat('%', #{businessName}, '%')</if>
|
|
||||||
<if test="logicalNodeId != null and logicalNodeId != ''"> and logical_node_id = #{logicalNodeId}</if>
|
|
||||||
<if test="multiPublicIpStatus != null and multiPublicIpStatus != ''"> and multi_public_ip_status = #{multiPublicIpStatus}</if>
|
|
||||||
</where>
|
|
||||||
order by create_time desc
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectRmResourceRegistrationById" parameterType="Long" resultMap="RmResourceRegistrationResult">
|
|
||||||
<include refid="selectRmResourceRegistrationVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertRmResourceRegistration" parameterType="RmResourceRegistration" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
insert into rm_resource_registration
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="hardwareSn != null">hardware_sn,</if>
|
|
||||||
<if test="resourceType != null">resource_type,</if>
|
|
||||||
<if test="resourceName != null">resource_name,</if>
|
|
||||||
<if test="ipAddress != null">ip_address,</if>
|
|
||||||
<if test="resourcePort != null">resource_port,</if>
|
|
||||||
<if test="otherPortName != null">other_port_name,</if>
|
|
||||||
<if test="agentVersion != null">agent_version,</if>
|
|
||||||
<if test="protocol != null">protocol,</if>
|
|
||||||
<if test="resourceVersion != null">resource_version,</if>
|
|
||||||
<if test="rwPermission != null">rw_permission,</if>
|
|
||||||
<if test="snmpDetect != null">snmp_detect,</if>
|
|
||||||
<if test="teamName != null">team_name,</if>
|
|
||||||
<if test="snmpCollectAddr != null">snmp_collect_addr,</if>
|
|
||||||
<if test="snmpCollectPort != null">snmp_collect_port,</if>
|
|
||||||
<if test="securityLevel != null">security_level,</if>
|
|
||||||
<if test="encryption != null">encryption,</if>
|
|
||||||
<if test="resourceUserName != null">resource_user_name,</if>
|
|
||||||
<if test="resourcePwd != null">resource_pwd,</if>
|
|
||||||
<if test="registrationStatus != null">registration_status,</if>
|
|
||||||
<if test="onlineStatus != null">online_status,</if>
|
|
||||||
<if test="switchOnlineStatus != null">switch_online_status,</if>
|
|
||||||
<if test="description != null">description,</if>
|
|
||||||
<if test="customerId != null">customer_id,</if>
|
|
||||||
<if test="customerName != null">customer_name,</if>
|
|
||||||
<if test="serviceNumber != null">service_number,</if>
|
|
||||||
<if test="createTime != null">create_time,</if>
|
|
||||||
<if test="updateTime != null">update_time,</if>
|
|
||||||
<if test="creatorId != null">creator_id,</if>
|
|
||||||
<if test="creatorName != null">creator_name,</if>
|
|
||||||
<if test="updaterId != null">updater_id,</if>
|
|
||||||
<if test="updaterName != null">updater_name,</if>
|
|
||||||
<if test="clientId != null">client_id,</if>
|
|
||||||
<if test="operator != null">operator,</if>
|
|
||||||
<if test="province != null">province,</if>
|
|
||||||
<if test="publicIp != null">public_ip,</if>
|
|
||||||
<if test="businessName != null">business_name,</if>
|
|
||||||
<if test="logicalNodeId != null">logical_node_id,</if>
|
|
||||||
<if test="multiPublicIpStatus != null">multi_public_ip_status,</if>
|
|
||||||
<if test="heartbeatCount != null">heartbeat_count,</if>
|
|
||||||
<if test="heartbeatInterval != null">heartbeat_interval,</if>
|
|
||||||
<if test="onboardTime != null">onboard_time,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="hardwareSn != null">#{hardwareSn},</if>
|
|
||||||
<if test="resourceType != null">#{resourceType},</if>
|
|
||||||
<if test="resourceName != null">#{resourceName},</if>
|
|
||||||
<if test="ipAddress != null">#{ipAddress},</if>
|
|
||||||
<if test="resourcePort != null">#{resourcePort},</if>
|
|
||||||
<if test="otherPortName != null">#{otherPortName},</if>
|
|
||||||
<if test="agentVersion != null">#{agentVersion},</if>
|
|
||||||
<if test="protocol != null">#{protocol},</if>
|
|
||||||
<if test="resourceVersion != null">#{resourceVersion},</if>
|
|
||||||
<if test="rwPermission != null">#{rwPermission},</if>
|
|
||||||
<if test="snmpDetect != null">#{snmpDetect},</if>
|
|
||||||
<if test="teamName != null">#{teamName},</if>
|
|
||||||
<if test="snmpCollectAddr != null">#{snmpCollectAddr},</if>
|
|
||||||
<if test="snmpCollectPort != null">#{snmpCollectPort},</if>
|
|
||||||
<if test="securityLevel != null">#{securityLevel},</if>
|
|
||||||
<if test="encryption != null">#{encryption},</if>
|
|
||||||
<if test="resourceUserName != null">#{resourceUserName},</if>
|
|
||||||
<if test="resourcePwd != null">#{resourcePwd},</if>
|
|
||||||
<if test="registrationStatus != null">#{registrationStatus},</if>
|
|
||||||
<if test="onlineStatus != null">#{onlineStatus},</if>
|
|
||||||
<if test="switchOnlineStatus != null">#{switchOnlineStatus},</if>
|
|
||||||
<if test="description != null">#{description},</if>
|
|
||||||
<if test="customerId != null">#{customerId},</if>
|
|
||||||
<if test="customerName != null">#{customerName},</if>
|
|
||||||
<if test="serviceNumber != null">#{serviceNumber},</if>
|
|
||||||
<if test="createTime != null">#{createTime},</if>
|
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
|
||||||
<if test="creatorId != null">#{creatorId},</if>
|
|
||||||
<if test="creatorName != null">#{creatorName},</if>
|
|
||||||
<if test="updaterId != null">#{updaterId},</if>
|
|
||||||
<if test="updaterName != null">#{updaterName},</if>
|
|
||||||
<if test="clientId != null">#{clientId},</if>
|
|
||||||
<if test="operator != null">#{operator},</if>
|
|
||||||
<if test="province != null">#{province},</if>
|
|
||||||
<if test="publicIp != null">#{publicIp},</if>
|
|
||||||
<if test="businessName != null">#{businessName},</if>
|
|
||||||
<if test="logicalNodeId != null">#{logicalNodeId},</if>
|
|
||||||
<if test="multiPublicIpStatus != null">#{multiPublicIpStatus},</if>
|
|
||||||
<if test="heartbeatCount != null">#{heartbeatCount},</if>
|
|
||||||
<if test="heartbeatInterval != null">#{heartbeatInterval},</if>
|
|
||||||
<if test="onboardTime != null">#{onboardTime},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateRmResourceRegistration" parameterType="RmResourceRegistration">
|
|
||||||
update rm_resource_registration
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="hardwareSn != null">hardware_sn = #{hardwareSn},</if>
|
|
||||||
<if test="resourceType != null">resource_type = #{resourceType},</if>
|
|
||||||
<if test="resourceName != null">resource_name = #{resourceName},</if>
|
|
||||||
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
|
|
||||||
<if test="resourcePort != null">resource_port = #{resourcePort},</if>
|
|
||||||
<if test="otherPortName != null">other_port_name = #{otherPortName},</if>
|
|
||||||
<if test="agentVersion != null">agent_version = #{agentVersion},</if>
|
|
||||||
<if test="protocol != null">protocol = #{protocol},</if>
|
|
||||||
<if test="resourceVersion != null">resource_version = #{resourceVersion},</if>
|
|
||||||
<if test="rwPermission != null">rw_permission = #{rwPermission},</if>
|
|
||||||
<if test="snmpDetect != null">snmp_detect = #{snmpDetect},</if>
|
|
||||||
<if test="teamName != null">team_name = #{teamName},</if>
|
|
||||||
<if test="snmpCollectAddr != null">snmp_collect_addr = #{snmpCollectAddr},</if>
|
|
||||||
<if test="snmpCollectPort != null">snmp_collect_port = #{snmpCollectPort},</if>
|
|
||||||
<if test="securityLevel != null">security_level = #{securityLevel},</if>
|
|
||||||
<if test="encryption != null">encryption = #{encryption},</if>
|
|
||||||
<if test="resourceUserName != null">resource_user_name = #{resourceUserName},</if>
|
|
||||||
<if test="resourcePwd != null">resource_pwd = #{resourcePwd},</if>
|
|
||||||
<if test="registrationStatus != null">registration_status = #{registrationStatus},</if>
|
|
||||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
|
||||||
<if test="switchOnlineStatus != null">switch_online_status = #{switchOnlineStatus},</if>
|
|
||||||
<if test="description != null">description = #{description},</if>
|
|
||||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
|
||||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
|
||||||
<if test="serviceNumber != null">service_number = #{serviceNumber},</if>
|
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
||||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
|
||||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
|
||||||
<if test="updaterId != null">updater_id = #{updaterId},</if>
|
|
||||||
<if test="updaterName != null">updater_name = #{updaterName},</if>
|
|
||||||
<if test="clientId != null">client_id = #{clientId},</if>
|
|
||||||
<if test="operator != null">operator = #{operator},</if>
|
|
||||||
<if test="province != null">province = #{province},</if>
|
|
||||||
<if test="publicIp != null">public_ip = #{publicIp},</if>
|
|
||||||
<if test="businessName != null">business_name = #{businessName},</if>
|
|
||||||
<if test="logicalNodeId != null">logical_node_id = #{logicalNodeId},</if>
|
|
||||||
<if test="multiPublicIpStatus != null">multi_public_ip_status = #{multiPublicIpStatus},</if>
|
|
||||||
<if test="heartbeatCount != null">heartbeat_count = #{heartbeatCount},</if>
|
|
||||||
<if test="heartbeatInterval != null">heartbeat_interval = #{heartbeatInterval},</if>
|
|
||||||
<if test="onboardTime != null">onboard_time = #{onboardTime},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteRmResourceRegistrationById" parameterType="Long">
|
|
||||||
delete from rm_resource_registration where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteRmResourceRegistrationByIds" parameterType="String">
|
|
||||||
delete from rm_resource_registration where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
<!-- 查询所有资源名称(包含设备使用)-->
|
|
||||||
<select id="selectAllResourceName" resultType="java.util.Map">
|
|
||||||
select id id,resource_name resourceName from rm_resource_registration
|
|
||||||
<where>
|
|
||||||
and registration_status = 1
|
|
||||||
</where>
|
|
||||||
group by id
|
|
||||||
</select>
|
|
||||||
<!-- 查询所有资源名称-->
|
|
||||||
<select id="selectAllResourceNameByType" parameterType="RmResourceRegistration" resultType="java.util.Map">
|
|
||||||
SELECT
|
|
||||||
resource_name AS resourceName,
|
|
||||||
CASE
|
|
||||||
WHEN resource_type = '1' THEN ip_address
|
|
||||||
WHEN resource_type = '2' THEN snmp_collect_addr
|
|
||||||
END AS ipAddress,
|
|
||||||
hardware_sn AS hardwareSn
|
|
||||||
FROM rm_resource_registration
|
|
||||||
<where>
|
|
||||||
and registration_status = 1
|
|
||||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
|
||||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
|
||||||
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
|
|
||||||
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if>
|
|
||||||
<if test="resourcePort != null and resourcePort != ''"> and resource_port = #{resourcePort}</if>
|
|
||||||
<if test="otherPortName != null and otherPortName != ''"> and other_port_name = #{otherPortName}</if>
|
|
||||||
<if test="protocol != null and protocol != ''"> and protocol = #{protocol}</if>
|
|
||||||
<if test="resourceVersion != null and resourceVersion != ''"> and resource_version = #{resourceVersion}</if>
|
|
||||||
<if test="rwPermission != null and rwPermission != ''"> and rw_permission = #{rwPermission}</if>
|
|
||||||
<if test="securityLevel != null and securityLevel != ''"> and security_level = #{securityLevel}</if>
|
|
||||||
<if test="encryption != null and encryption != ''"> and encryption = #{encryption}</if>
|
|
||||||
<if test="resourceUserName != null and resourceUserName != ''"> and resource_user_name = #{resourceUserName}</if>
|
|
||||||
<if test="resourcePwd != null and resourcePwd != ''"> and resource_pwd = #{resourcePwd}</if>
|
|
||||||
<if test="registrationStatus != null and registrationStatus != ''"> and registration_status = #{registrationStatus}</if>
|
|
||||||
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
|
||||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
|
||||||
<if test="customerId != null "> and customer_id = #{customerId}</if>
|
|
||||||
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
|
||||||
<if test="serviceNumber != null and serviceNumber != ''"> and service_number = #{serviceNumber}</if>
|
|
||||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
|
||||||
<if test="creatorName != null and creatorName != ''"> and creator_name like concat('%', #{creatorName}, '%')</if>
|
|
||||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
|
||||||
<if test="updaterName != null and updaterName != ''"> and updater_name like concat('%', #{updaterName}, '%')</if>
|
|
||||||
</where>
|
|
||||||
group by resource_name
|
|
||||||
</select>
|
|
||||||
<select id="countBySn" parameterType="String">
|
|
||||||
select count(1) from rm_resource_registration
|
|
||||||
where hardware_sn = #{hardwareSn}
|
|
||||||
</select>
|
|
||||||
<update id="updateStatusByResource" parameterType="RmResourceRegistration">
|
|
||||||
update rm_resource_registration
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="resourceType != null">resource_type = #{resourceType},</if>
|
|
||||||
<if test="resourceName != null">resource_name = #{resourceName},</if>
|
|
||||||
<if test="ipAddress != null">ip_address = #{ipAddress},</if>
|
|
||||||
<if test="resourcePort != null">resource_port = #{resourcePort},</if>
|
|
||||||
<if test="otherPortName != null">other_port_name = #{otherPortName},</if>
|
|
||||||
<if test="agentVersion != null">agent_version = #{agentVersion},</if>
|
|
||||||
<if test="protocol != null">protocol = #{protocol},</if>
|
|
||||||
<if test="resourceVersion != null">resource_version = #{resourceVersion},</if>
|
|
||||||
<if test="rwPermission != null">rw_permission = #{rwPermission},</if>
|
|
||||||
<if test="snmpDetect != null">snmp_detect = #{snmpDetect},</if>
|
|
||||||
<if test="teamName != null">team_name = #{teamName},</if>
|
|
||||||
<if test="snmpCollectAddr != null">snmp_collect_addr = #{snmpCollectAddr},</if>
|
|
||||||
<if test="snmpCollectPort != null">snmp_collect_port = #{snmpCollectPort},</if>
|
|
||||||
<if test="securityLevel != null">security_level = #{securityLevel},</if>
|
|
||||||
<if test="encryption != null">encryption = #{encryption},</if>
|
|
||||||
<if test="resourceUserName != null">resource_user_name = #{resourceUserName},</if>
|
|
||||||
<if test="resourcePwd != null">resource_pwd = #{resourcePwd},</if>
|
|
||||||
<if test="registrationStatus != null">registration_status = #{registrationStatus},</if>
|
|
||||||
<if test="onlineStatus != null">online_status = #{onlineStatus},</if>
|
|
||||||
<if test="switchOnlineStatus != null">switch_online_status = #{switchOnlineStatus},</if>
|
|
||||||
<if test="description != null">description = #{description},</if>
|
|
||||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
|
||||||
<if test="customerName != null">customer_name = #{customerName},</if>
|
|
||||||
<if test="serviceNumber != null">service_number = #{serviceNumber},</if>
|
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
||||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
|
||||||
<if test="creatorName != null">creator_name = #{creatorName},</if>
|
|
||||||
<if test="updaterId != null">updater_id = #{updaterId},</if>
|
|
||||||
<if test="updaterName != null">updater_name = #{updaterName},</if>
|
|
||||||
<if test="clientId != null">client_id = #{clientId},</if>
|
|
||||||
<if test="operator != null">operator = #{operator},</if>
|
|
||||||
<if test="province != null">province = #{province},</if>
|
|
||||||
<if test="publicIp != null">public_ip = #{publicIp},</if>
|
|
||||||
<if test="businessName != null">business_name = #{businessName},</if>
|
|
||||||
<if test="logicalNodeId != null">logical_node_id = #{logicalNodeId},</if>
|
|
||||||
<if test="multiPublicIpStatus != null">multi_public_ip_status = #{multiPublicIpStatus},</if>
|
|
||||||
<if test="heartbeatCount != null">heartbeat_count = #{heartbeatCount},</if>
|
|
||||||
<if test="heartbeatInterval != null">heartbeat_interval = #{heartbeatInterval},</if>
|
|
||||||
<if test="onboardTime != null">onboard_time = #{onboardTime},</if>
|
|
||||||
</trim>
|
|
||||||
<where>
|
|
||||||
<choose>
|
|
||||||
<when test="hardwareSn != null">
|
|
||||||
and hardware_sn = #{hardwareSn}
|
|
||||||
</when>
|
|
||||||
<when test="clientId != null">
|
|
||||||
and client_id = #{clientId}
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
and 1=0 <!-- 如果两个条件都不满足,则不更新任何记录 -->
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
</where>
|
|
||||||
</update>
|
|
||||||
<select id="getRegistrationByIds" parameterType="String" resultMap="RmResourceRegistrationResult">
|
|
||||||
<include refid="selectRmResourceRegistrationVo"/>
|
|
||||||
where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectRegistMsgByClientId" parameterType="RmResourceRegistration" resultMap="RmResourceRegistrationResult">
|
|
||||||
<include refid="selectRmResourceRegistrationVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="clientId != null and clientId != ''"> and client_id = #{clientId}</if>
|
|
||||||
</where>
|
|
||||||
order by create_time desc
|
|
||||||
</select>
|
|
||||||
<select id="getAllLogicalNodeId" parameterType="RmResourceRegistration" resultType="java.util.Map">
|
|
||||||
select logical_node_id logicalNodeId from rm_resource_registration where logical_node_id != ''
|
|
||||||
group by logical_node_id
|
|
||||||
</select>
|
|
||||||
<select id="getRegistrationTableInfoList" parameterType="RmResourceRegistration" resultType="RmResourceRegistration">
|
|
||||||
select
|
|
||||||
a.id,
|
|
||||||
a.hardware_sn as hardwareSn,
|
|
||||||
a.agent_version as agentVersion,
|
|
||||||
a.registration_status as registrationStatus,
|
|
||||||
a.online_status as onlineStatus,
|
|
||||||
a.create_time as createTime,
|
|
||||||
a.update_time as updateTime,
|
|
||||||
a.client_id as clientId,
|
|
||||||
a.business_name as businessName,
|
|
||||||
a.logical_node_id as logicalNodeId,
|
|
||||||
a.multi_public_ip_status as multiPublicIpStatus,
|
|
||||||
a.heartbeat_count as heartbeatCount,
|
|
||||||
a.heartbeat_interval as heartbeatInterval,
|
|
||||||
a.onboard_time as onboardTime,
|
|
||||||
b.machine_code as machineCode
|
|
||||||
from rm_resource_registration a
|
|
||||||
left join rm_registration_machine b on a.client_id = b.client_id
|
|
||||||
<where>
|
|
||||||
<if test="hardwareSn != null and hardwareSn != ''"> and a.hardware_sn = #{hardwareSn}</if>
|
|
||||||
<if test="resourceType != null and resourceType != ''"> and a.resource_type = #{resourceType}</if>
|
|
||||||
<if test="agentVersion != null and agentVersion != ''"> and a.agent_version = #{agentVersion}</if>
|
|
||||||
<if test="registrationStatus != null and registrationStatus != ''"> and a.registration_status = #{registrationStatus}</if>
|
|
||||||
<if test="onlineStatus != null and onlineStatus != ''"> and a.online_status = #{onlineStatus}</if>
|
|
||||||
<if test="clientId != null and clientId != ''"> and a.client_id = #{clientId}</if>
|
|
||||||
<if test="businessName != null and businessName != ''"> and a.business_name like concat('%', #{businessName}, '%')</if>
|
|
||||||
<if test="logicalNodeId != null and logicalNodeId != ''"> and a.logical_node_id = #{logicalNodeId}</if>
|
|
||||||
<if test="multiPublicIpStatus != null and multiPublicIpStatus != ''"> and a.multi_public_ip_status = #{multiPublicIpStatus}</if>
|
|
||||||
<if test="businessEmpty"> and a.business_name is null</if>
|
|
||||||
<if test="logicalNodeEmpty"> and a.logical_node_id is null</if>
|
|
||||||
</where>
|
|
||||||
order by a.create_time desc
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
-252
@@ -1,252 +0,0 @@
|
|||||||
package com.ruoyi.rocketmq.domain;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 初始带宽流量临时表对象 initial_bandwidth_traffic_temp
|
|
||||||
*
|
|
||||||
* @author gyt
|
|
||||||
* @date 2025-11-05
|
|
||||||
*/
|
|
||||||
public class InitialBandwidthTrafficTemp extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 唯一标识ID */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 接口名称 */
|
|
||||||
@Excel(name = "接口名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/** MAC地址 */
|
|
||||||
@Excel(name = "MAC地址")
|
|
||||||
private String mac;
|
|
||||||
|
|
||||||
/** 运行状态 */
|
|
||||||
@Excel(name = "运行状态")
|
|
||||||
private String status;
|
|
||||||
|
|
||||||
/** 接口类型 */
|
|
||||||
@Excel(name = "接口类型")
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
/** IPv4地址 */
|
|
||||||
@Excel(name = "IPv4地址")
|
|
||||||
private String ipV4;
|
|
||||||
|
|
||||||
/** 入站丢包率(%) */
|
|
||||||
@Excel(name = "入站丢包率(%)")
|
|
||||||
private BigDecimal inDropped;
|
|
||||||
|
|
||||||
/** 出站丢包率(%) */
|
|
||||||
@Excel(name = "出站丢包率(%)")
|
|
||||||
private BigDecimal outDropped;
|
|
||||||
|
|
||||||
/** 接收带宽(big) */
|
|
||||||
@Excel(name = "接收带宽(big)")
|
|
||||||
private String inSpeed;
|
|
||||||
|
|
||||||
/** 发送带宽(bit) */
|
|
||||||
@Excel(name = "发送带宽(bit)")
|
|
||||||
private String outSpeed;
|
|
||||||
|
|
||||||
/** 协商速度 */
|
|
||||||
@Excel(name = "协商速度")
|
|
||||||
private String speed;
|
|
||||||
|
|
||||||
/** 工作模式 */
|
|
||||||
@Excel(name = "工作模式")
|
|
||||||
private String duplex;
|
|
||||||
|
|
||||||
/** 设备唯一标识 */
|
|
||||||
@Excel(name = "设备唯一标识")
|
|
||||||
private String clientId;
|
|
||||||
|
|
||||||
/** 总接收带宽(bit) */
|
|
||||||
@Excel(name = "总接收带宽(bit)")
|
|
||||||
private String totalInSpeed;
|
|
||||||
|
|
||||||
/** 总发送带宽(bit) */
|
|
||||||
@Excel(name = "总发送带宽(bit)")
|
|
||||||
private String totalOutSpeed;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMac(String mac)
|
|
||||||
{
|
|
||||||
this.mac = mac;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMac()
|
|
||||||
{
|
|
||||||
return mac;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
|
||||||
this.status = status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatus()
|
|
||||||
{
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(String type)
|
|
||||||
{
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType()
|
|
||||||
{
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIpV4(String ipV4)
|
|
||||||
{
|
|
||||||
this.ipV4 = ipV4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIpV4()
|
|
||||||
{
|
|
||||||
return ipV4;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInDropped(BigDecimal inDropped)
|
|
||||||
{
|
|
||||||
this.inDropped = inDropped;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getInDropped()
|
|
||||||
{
|
|
||||||
return inDropped;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOutDropped(BigDecimal outDropped)
|
|
||||||
{
|
|
||||||
this.outDropped = outDropped;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getOutDropped()
|
|
||||||
{
|
|
||||||
return outDropped;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInSpeed(String inSpeed)
|
|
||||||
{
|
|
||||||
this.inSpeed = inSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getInSpeed()
|
|
||||||
{
|
|
||||||
return inSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOutSpeed(String outSpeed)
|
|
||||||
{
|
|
||||||
this.outSpeed = outSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOutSpeed()
|
|
||||||
{
|
|
||||||
return outSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSpeed(String speed)
|
|
||||||
{
|
|
||||||
this.speed = speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSpeed()
|
|
||||||
{
|
|
||||||
return speed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDuplex(String duplex)
|
|
||||||
{
|
|
||||||
this.duplex = duplex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDuplex()
|
|
||||||
{
|
|
||||||
return duplex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClientId(String clientId)
|
|
||||||
{
|
|
||||||
this.clientId = clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getClientId()
|
|
||||||
{
|
|
||||||
return clientId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalInSpeed(String totalInSpeed)
|
|
||||||
{
|
|
||||||
this.totalInSpeed = totalInSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTotalInSpeed()
|
|
||||||
{
|
|
||||||
return totalInSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTotalOutSpeed(String totalOutSpeed)
|
|
||||||
{
|
|
||||||
this.totalOutSpeed = totalOutSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTotalOutSpeed()
|
|
||||||
{
|
|
||||||
return totalOutSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("name", getName())
|
|
||||||
.append("mac", getMac())
|
|
||||||
.append("status", getStatus())
|
|
||||||
.append("type", getType())
|
|
||||||
.append("ipV4", getIpV4())
|
|
||||||
.append("inDropped", getInDropped())
|
|
||||||
.append("outDropped", getOutDropped())
|
|
||||||
.append("inSpeed", getInSpeed())
|
|
||||||
.append("outSpeed", getOutSpeed())
|
|
||||||
.append("speed", getSpeed())
|
|
||||||
.append("duplex", getDuplex())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.append("createBy", getCreateBy())
|
|
||||||
.append("updateBy", getUpdateBy())
|
|
||||||
.append("clientId", getClientId())
|
|
||||||
.append("totalInSpeed", getTotalInSpeed())
|
|
||||||
.append("totalOutSpeed", getTotalOutSpeed())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-82
@@ -1,82 +0,0 @@
|
|||||||
package com.ruoyi.rocketmq.service;
|
|
||||||
|
|
||||||
import com.ruoyi.rocketmq.domain.RmNetworkInterface;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 客户端网络接口信息Service接口
|
|
||||||
*
|
|
||||||
* @author gyt
|
|
||||||
* @date 2025-10-14
|
|
||||||
*/
|
|
||||||
public interface IRmNetworkInterfaceService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param id 客户端网络接口信息主键
|
|
||||||
* @return 客户端网络接口信息
|
|
||||||
*/
|
|
||||||
public RmNetworkInterface selectRmNetworkInterfaceById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询客户端网络接口信息列表
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 客户端网络接口信息集合
|
|
||||||
*/
|
|
||||||
public List<RmNetworkInterface> selectRmNetworkInterfaceList(RmNetworkInterface rmNetworkInterface);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertRmNetworkInterface(RmNetworkInterface rmNetworkInterface);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateRmNetworkInterface(RmNetworkInterface rmNetworkInterface);
|
|
||||||
/**
|
|
||||||
* 修改客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param rmNetworkInterface 客户端网络接口信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateRmNetworkInterfaceByMac(RmNetworkInterface rmNetworkInterface);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除客户端网络接口信息
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的客户端网络接口信息主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteRmNetworkInterfaceByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除客户端网络接口信息信息
|
|
||||||
*
|
|
||||||
* @param id 客户端网络接口信息主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteRmNetworkInterfaceById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定公网ip
|
|
||||||
* @param rmNetworkInterface
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
int bindPublicIp(RmNetworkInterface rmNetworkInterface);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新路由信息
|
|
||||||
* @param clientId
|
|
||||||
*/
|
|
||||||
void updateRouteMsg(String clientId);
|
|
||||||
}
|
|
||||||
-283
@@ -1,283 +0,0 @@
|
|||||||
package com.ruoyi.rocketmq.service.impl;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.utils.DateUtils;
|
|
||||||
import com.ruoyi.common.core.utils.EchartsDataUtils;
|
|
||||||
import com.ruoyi.common.core.utils.SpeedUtils;
|
|
||||||
import com.ruoyi.rocketmq.domain.InitialBandwidthTraffic;
|
|
||||||
import com.ruoyi.rocketmq.mapper.InitialBandwidthTrafficMapper;
|
|
||||||
import com.ruoyi.rocketmq.service.IInitialBandwidthTrafficService;
|
|
||||||
import com.ruoyi.rocketmq.utils.TableRouterUtil;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Isolation;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.math.RoundingMode;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 初始带宽流量Service业务层处理
|
|
||||||
*
|
|
||||||
* @author gyt
|
|
||||||
* @date 2025-08-20
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
|
||||||
public class InitialBandwidthTrafficServiceImpl implements IInitialBandwidthTrafficService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private InitialBandwidthTrafficMapper initialBandwidthTrafficMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询初始带宽流量
|
|
||||||
*
|
|
||||||
* @param id 初始带宽流量主键
|
|
||||||
* @return 初始带宽流量
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public InitialBandwidthTraffic selectInitialBandwidthTrafficById(Long id)
|
|
||||||
{
|
|
||||||
return initialBandwidthTrafficMapper.selectInitialBandwidthTrafficById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询初始带宽流量列表
|
|
||||||
*
|
|
||||||
* @param initialBandwidthTraffic 初始带宽流量
|
|
||||||
* @return 初始带宽流量
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<InitialBandwidthTraffic> selectInitialBandwidthTrafficList(InitialBandwidthTraffic initialBandwidthTraffic)
|
|
||||||
{
|
|
||||||
return initialBandwidthTrafficMapper.selectInitialBandwidthTrafficList(initialBandwidthTraffic);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增初始带宽流量
|
|
||||||
*
|
|
||||||
* @param initialBandwidthTraffic 初始带宽流量
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public int insertInitialBandwidthTraffic(InitialBandwidthTraffic initialBandwidthTraffic)
|
|
||||||
{
|
|
||||||
initialBandwidthTraffic.setCreateTime(DateUtils.getNowDate());
|
|
||||||
return initialBandwidthTrafficMapper.insertInitialBandwidthTraffic(initialBandwidthTraffic);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改初始带宽流量
|
|
||||||
*
|
|
||||||
* @param initialBandwidthTraffic 初始带宽流量
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateInitialBandwidthTraffic(InitialBandwidthTraffic initialBandwidthTraffic)
|
|
||||||
{
|
|
||||||
initialBandwidthTraffic.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
return initialBandwidthTrafficMapper.updateInitialBandwidthTraffic(initialBandwidthTraffic);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除初始带宽流量
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的初始带宽流量主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteInitialBandwidthTrafficByIds(Long[] ids)
|
|
||||||
{
|
|
||||||
return initialBandwidthTrafficMapper.deleteInitialBandwidthTrafficByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除初始带宽流量信息
|
|
||||||
*
|
|
||||||
* @param id 初始带宽流量主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteInitialBandwidthTrafficById(Long id)
|
|
||||||
{
|
|
||||||
return initialBandwidthTrafficMapper.deleteInitialBandwidthTrafficById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 保存单条数据到对应分表
|
|
||||||
* @param data 流量数据
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public void save(InitialBandwidthTraffic data) {
|
|
||||||
if (data.getCreateTime() == null) {
|
|
||||||
data.setCreateTime(DateUtils.getNowDate());
|
|
||||||
}
|
|
||||||
Date date = data.getCreateTime();
|
|
||||||
LocalDateTime createTime = date.toInstant()
|
|
||||||
.atZone(ZoneId.systemDefault())
|
|
||||||
.toLocalDateTime();
|
|
||||||
data.setTableName(TableRouterUtil.getTableName(createTime));
|
|
||||||
initialBandwidthTrafficMapper.insert(data);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 保存多条数据到对应分表
|
|
||||||
* @param initialBandwidthTraffic 流量数据
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
||||||
public void batchInsert(InitialBandwidthTraffic initialBandwidthTraffic) {
|
|
||||||
if (initialBandwidthTraffic == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
List<InitialBandwidthTraffic> dataList = initialBandwidthTraffic.getList();
|
|
||||||
if (dataList.isEmpty()){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 按表名分组批量插入
|
|
||||||
Map<String, List<InitialBandwidthTraffic>> groupedData = dataList.stream()
|
|
||||||
.map(data -> {
|
|
||||||
try {
|
|
||||||
InitialBandwidthTraffic processed = new InitialBandwidthTraffic();
|
|
||||||
BeanUtils.copyProperties(data,processed);
|
|
||||||
if (data.getCreateTime() == null) {
|
|
||||||
data.setCreateTime(DateUtils.getNowDate());
|
|
||||||
}
|
|
||||||
LocalDateTime createTime = data.getCreateTime().toInstant()
|
|
||||||
.atZone(ZoneId.systemDefault())
|
|
||||||
.toLocalDateTime();
|
|
||||||
processed.setTableName(TableRouterUtil.getTableName(createTime));
|
|
||||||
return processed;
|
|
||||||
} catch (Exception e){
|
|
||||||
log.error("数据处理失败",e.getMessage());
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}).collect(Collectors.groupingBy(
|
|
||||||
InitialBandwidthTraffic::getTableName,
|
|
||||||
LinkedHashMap::new, // 保持插入顺序
|
|
||||||
Collectors.toList()));
|
|
||||||
|
|
||||||
groupedData.forEach((tableName, list) -> {
|
|
||||||
try {
|
|
||||||
InitialBandwidthTraffic data = new InitialBandwidthTraffic();
|
|
||||||
BeanUtils.copyProperties(initialBandwidthTraffic,data);
|
|
||||||
data.setTableName(tableName);
|
|
||||||
data.setList(list);
|
|
||||||
initialBandwidthTrafficMapper.batchInsert(data);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("表{}插入失败", tableName, e);
|
|
||||||
throw new RuntimeException("批量插入失败", e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 网络接口基础信息
|
|
||||||
* @param initialBandwidthTraffic
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public InitialBandwidthTraffic getNetInterfaceDetailsMsg(InitialBandwidthTraffic initialBandwidthTraffic) {
|
|
||||||
if (initialBandwidthTraffic.getCreateTime() == null) {
|
|
||||||
initialBandwidthTraffic.setCreateTime(DateUtils.getNowDate());
|
|
||||||
}
|
|
||||||
LocalDateTime createTime = initialBandwidthTraffic.getCreateTime().toInstant()
|
|
||||||
.atZone(ZoneId.systemDefault())
|
|
||||||
.toLocalDateTime();
|
|
||||||
initialBandwidthTraffic.setTableName(TableRouterUtil.getTableName(createTime));
|
|
||||||
InitialBandwidthTraffic detailsMsg = initialBandwidthTrafficMapper.getNetInterfaceDetailsMsg(initialBandwidthTraffic);
|
|
||||||
return detailsMsg;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分表查询需要的信息
|
|
||||||
* @param initialBandwidthTraffic
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public List<InitialBandwidthTraffic> getListByTableName(InitialBandwidthTraffic initialBandwidthTraffic){
|
|
||||||
// 获取涉及的表名
|
|
||||||
Set<String> tableNames = TableRouterUtil.getTableNamesBetween(initialBandwidthTraffic.getStartTime(), initialBandwidthTraffic.getEndTime());
|
|
||||||
// 并行查询各表
|
|
||||||
List<InitialBandwidthTraffic> list = tableNames.parallelStream()
|
|
||||||
.flatMap(tableName -> {
|
|
||||||
InitialBandwidthTraffic condition = new InitialBandwidthTraffic();
|
|
||||||
condition.setTableName(tableName);
|
|
||||||
condition.setStartTime(initialBandwidthTraffic.getStartTime());
|
|
||||||
condition.setEndTime(initialBandwidthTraffic.getEndTime());
|
|
||||||
condition.setClientId(initialBandwidthTraffic.getClientId());
|
|
||||||
condition.setName(initialBandwidthTraffic.getName());
|
|
||||||
return initialBandwidthTrafficMapper.getNetTrafficList(condition).stream();
|
|
||||||
})
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 查询eth0流量信息并封装为多折线ECharts图表数据
|
|
||||||
* @param initialBandwidthTraffic
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> netInterfaceTrafficEcharts(InitialBandwidthTraffic initialBandwidthTraffic) {
|
|
||||||
// 流量信息
|
|
||||||
List<InitialBandwidthTraffic> list = getListByTableName(initialBandwidthTraffic);
|
|
||||||
try {
|
|
||||||
String unit = SpeedUtils.calculateUnitWithStringTraffic(list, "inSpeed", "outSpeed");
|
|
||||||
if(initialBandwidthTraffic.getUnit() != null){
|
|
||||||
unit = initialBandwidthTraffic.getUnit();
|
|
||||||
}
|
|
||||||
BigDecimal divisor = SpeedUtils.getDivisor(unit);
|
|
||||||
Map<String, Function<InitialBandwidthTraffic, ?>> extractors = new LinkedHashMap<>();
|
|
||||||
extractors.put("netInSpeedData", info ->
|
|
||||||
info != null && info.getInSpeed() != null ?
|
|
||||||
new BigDecimal(info.getInSpeed()).divide(divisor, 2, RoundingMode.HALF_UP) :
|
|
||||||
0);
|
|
||||||
|
|
||||||
extractors.put("netOutSpeedData", info ->
|
|
||||||
info != null && info.getOutSpeed() != null ?
|
|
||||||
new BigDecimal(info.getOutSpeed()).divide(divisor, 2, RoundingMode.HALF_UP) :
|
|
||||||
0);
|
|
||||||
Map<String, Object> resultMap = EchartsDataUtils.buildEchartsDataAutoPadding(
|
|
||||||
list, InitialBandwidthTraffic::getCreateTime, extractors,
|
|
||||||
initialBandwidthTraffic.getStartTime(), initialBandwidthTraffic.getEndTime()
|
|
||||||
);
|
|
||||||
resultMap.put("unit", unit);
|
|
||||||
return resultMap;
|
|
||||||
} catch (Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return new HashMap<>();
|
|
||||||
}
|
|
||||||
// 安全转换方法(处理可能的NumberFormatException)
|
|
||||||
private Double safeConvertToKB(String byteValue) {
|
|
||||||
try {
|
|
||||||
return byteValue == null ? 0.0 : Double.parseDouble(byteValue) / 1024.0;
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
return 0.0; // 或根据业务需求返回null/抛出异常
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 查询eth0流量信息丢包数并封装为折线ECharts图表数据
|
|
||||||
* @param initialBandwidthTraffic
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> netInterfaceDroppedEcharts(InitialBandwidthTraffic initialBandwidthTraffic) {
|
|
||||||
// 流量信息
|
|
||||||
List<InitialBandwidthTraffic> list = getListByTableName(initialBandwidthTraffic);
|
|
||||||
Map<String, Function<InitialBandwidthTraffic, ?>> extractors = new LinkedHashMap<>();
|
|
||||||
extractors.put("inDroppedData", info -> info.getInDropped());
|
|
||||||
extractors.put("outDroppedData", info -> info.getOutDropped());
|
|
||||||
|
|
||||||
return EchartsDataUtils.buildEchartsDataAutoPadding(
|
|
||||||
list, InitialBandwidthTraffic::getCreateTime, extractors,
|
|
||||||
initialBandwidthTraffic.getStartTime(), initialBandwidthTraffic.getEndTime()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/ruoyi-visual-monitor" />
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
|
||||||
<logger name="com.ruoyi" level="info" />
|
|
||||||
<!-- Spring日志级别控制 -->
|
|
||||||
<logger name="org.springframework" level="warn" />
|
|
||||||
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="console" />
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="file_info" />
|
|
||||||
<appender-ref ref="file_error" />
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
||||||
+15
-15
@@ -25,16 +25,16 @@ create table sys_dept (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-部门表数据
|
-- 初始化-部门表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(100, 0, '0', '彤然科技', 0, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '彤然', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@@ -68,8 +68,8 @@ create table sys_user (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-用户信息表数据
|
-- 初始化-用户信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_user values(1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '管理员');
|
insert into sys_user values(1, 103, 'admin', '彤然', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '管理员');
|
||||||
insert into sys_user values(2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '测试员');
|
insert into sys_user values(2, 105, 'ry', '彤然', '00', 'ry@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '测试员');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@@ -164,7 +164,7 @@ create table sys_menu (
|
|||||||
insert into sys_menu values('1', '系统管理', '0', '1', 'system', null, '', '', 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '系统管理目录');
|
insert into sys_menu values('1', '系统管理', '0', '1', 'system', null, '', '', 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '系统管理目录');
|
||||||
insert into sys_menu values('2', '系统监控', '0', '2', 'monitor', null, '', '', 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '系统监控目录');
|
insert into sys_menu values('2', '系统监控', '0', '2', 'monitor', null, '', '', 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '系统监控目录');
|
||||||
insert into sys_menu values('3', '系统工具', '0', '3', 'tool', null, '', '', 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '系统工具目录');
|
insert into sys_menu values('3', '系统工具', '0', '3', 'tool', null, '', '', 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '系统工具目录');
|
||||||
insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', null, '', '', 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, '若依官网地址');
|
insert into sys_menu values('4', '彤然官网', '0', '4', 'http://tongran.vip', null, '', '', 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, '彤然官网地址');
|
||||||
-- 二级菜单
|
-- 二级菜单
|
||||||
insert into sys_menu values('100', '用户管理', '1', '1', 'user', 'system/user/index', '', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '用户管理菜单');
|
insert into sys_menu values('100', '用户管理', '1', '1', 'user', 'system/user/index', '', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '用户管理菜单');
|
||||||
insert into sys_menu values('101', '角色管理', '1', '2', 'role', 'system/role/index', '', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '角色管理菜单');
|
insert into sys_menu values('101', '角色管理', '1', '2', 'role', 'system/role/index', '', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '角色管理菜单');
|
||||||
@@ -635,8 +635,8 @@ create table sys_notice (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-公告信息表数据
|
-- 初始化-公告信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_notice values('1', '温馨提醒:2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员');
|
insert into sys_notice values('1', '温馨提醒:2018-07-01 彤然新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员');
|
||||||
insert into sys_notice values('2', '维护通知:2018-07-01 若依系统凌晨维护', '1', '维护内容', '0', 'admin', sysdate(), '', null, '管理员');
|
insert into sys_notice values('2', '维护通知:2018-07-01 彤然系统凌晨维护', '1', '维护内容', '0', 'admin', sysdate(), '', null, '管理员');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|||||||
@@ -34,14 +34,14 @@ CREATE TABLE `config_info` (
|
|||||||
|
|
||||||
insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) values
|
insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) values
|
||||||
(1,'application-dev.yml','DEFAULT_GROUP','spring:\n autoconfigure:\n exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n min-request-size: 8192\n response:\n enabled: true\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n','9928f41dfb10386ad38b3254af5692e0','2020-05-20 12:00:00','2024-08-29 12:14:45','nacos','0:0:0:0:0:0:0:1','','','通用配置','null','null','yaml','',''),
|
(1,'application-dev.yml','DEFAULT_GROUP','spring:\n autoconfigure:\n exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n min-request-size: 8192\n response:\n enabled: true\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n','9928f41dfb10386ad38b3254af5692e0','2020-05-20 12:00:00','2024-08-29 12:14:45','nacos','0:0:0:0:0:0:0:1','','','通用配置','null','null','yaml','',''),
|
||||||
(2,'ruoyi-gateway-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password: \n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: ruoyi-auth\n uri: lb://ruoyi-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestBody\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: ruoyi-gen\n uri: lb://ruoyi-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: ruoyi-job\n uri: lb://ruoyi-job\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: ruoyi-system\n uri: lb://ruoyi-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 文件服务\n - id: ruoyi-file\n uri: lb://ruoyi-file\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n\n# 安全配置\nsecurity:\n # 验证码\n captcha:\n enabled: true\n type: math\n # 防止XSS攻击\n xss:\n enabled: true\n excludeUrls:\n - /system/notice\n\n # 不校验白名单\n ignore:\n whites:\n - /auth/logout\n - /auth/login\n - /auth/register\n - /*/v2/api-docs\n - /*/v3/api-docs\n - /csrf\n\n# springdoc配置\nspringdoc:\n webjars:\n # 访问前缀\n prefix:\n','4d329eb08a941a8dd9d26f542c6ac6c5','2020-05-14 14:17:55','2024-09-02 12:13:50','nacos','0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','',''),
|
(2,'tongran-gateway-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password: \n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: tongran-auth\n uri: lb://tongran-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestBody\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: tongran-gen\n uri: lb://tongran-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: tongran-job\n uri: lb://tongran-job\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: tongran-system\n uri: lb://tongran-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 文件服务\n - id: tongran-file\n uri: lb://tongran-file\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n\n# 安全配置\nsecurity:\n # 验证码\n captcha:\n enabled: true\n type: math\n # 防止XSS攻击\n xss:\n enabled: true\n excludeUrls:\n - /system/notice\n\n # 不校验白名单\n ignore:\n whites:\n - /auth/logout\n - /auth/login\n - /auth/register\n - /*/v2/api-docs\n - /*/v3/api-docs\n - /csrf\n\n# springdoc配置\nspringdoc:\n webjars:\n # 访问前缀\n prefix:\n','4d329eb08a941a8dd9d26f542c6ac6c5','2020-05-14 14:17:55','2024-09-02 12:13:50','nacos','0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','',''),
|
||||||
(3,'ruoyi-auth-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password: \n','a03e7632a0a74520eeb4fbedd6d82d97','2020-11-20 00:00:00','2024-09-02 12:13:58','nacos','0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','',''),
|
(3,'tongran-auth-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password: \n','a03e7632a0a74520eeb4fbedd6d82d97','2020-11-20 00:00:00','2024-09-02 12:13:58','nacos','0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','',''),
|
||||||
(4,'ruoyi-monitor-dev.yml','DEFAULT_GROUP','# spring\nspring:\n security:\n user:\n name: ruoyi\n password: 123456\n boot:\n admin:\n ui:\n title: 若依服务状态监控\n','6f122fd2bfb8d45f858e7d6529a9cd44','2020-11-20 00:00:00','2024-08-29 12:15:11','nacos','0:0:0:0:0:0:0:1','','','监控中心','null','null','yaml','',''),
|
(4,'tongran-monitor-dev.yml','DEFAULT_GROUP','# spring\nspring:\n security:\n user:\n name: tongran\n password: 123456\n boot:\n admin:\n ui:\n title: 彤然服务状态监控\n','6f122fd2bfb8d45f858e7d6529a9cd44','2020-11-20 00:00:00','2024-08-29 12:15:11','nacos','0:0:0:0:0:0:0:1','','','监控中心','null','null','yaml','',''),
|
||||||
(5,'ruoyi-system-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: ruoyi\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n connectTimeout: 30000\n socketTimeout: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.system\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# springdoc配置\nspringdoc:\n gatewayUrl: http://localhost:8080/${spring.application.name}\n api-docs:\n # 是否开启接口文档\n enabled: true\n info:\n # 标题\n title: \'系统模块接口文档\'\n # 描述\n description: \'系统模块接口描述\'\n # 作者信息\n contact:\n name: RuoYi\n url: https://ruoyi.vip\n','786c7daf4543411fc65c3e48dfb15243','2020-11-20 00:00:00','2024-09-02 12:14:33','nacos','0:0:0:0:0:0:0:1','','','系统模块','null','null','yaml','',''),
|
(5,'tongran-system-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: tongran\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n connectTimeout: 30000\n socketTimeout: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.tongran.system\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# springdoc配置\nspringdoc:\n gatewayUrl: http://localhost:8080/${spring.application.name}\n api-docs:\n # 是否开启接口文档\n enabled: true\n info:\n # 标题\n title: \'系统模块接口文档\'\n # 描述\n description: \'系统模块接口描述\'\n # 作者信息\n contact:\n name: tongran\n url: https://tongran.vip\n','786c7daf4543411fc65c3e48dfb15243','2020-11-20 00:00:00','2024-09-02 12:14:33','nacos','0:0:0:0:0:0:0:1','','','系统模块','null','null','yaml','',''),
|
||||||
(6,'ruoyi-gen-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.gen.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# springdoc配置\nspringdoc:\n gatewayUrl: http://localhost:8080/${spring.application.name}\n api-docs:\n # 是否开启接口文档\n enabled: true\n info:\n # 标题\n title: \'代码生成接口文档\'\n # 描述\n description: \'代码生成接口描述\'\n # 作者信息\n contact:\n name: RuoYi\n url: https://ruoyi.vip\n\n# 代码生成\ngen:\n # 作者\n author: ruoyi\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\n packageName: com.ruoyi.system\n # 自动去除表前缀,默认是false\n autoRemovePre: false\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\n tablePrefix: sys_\n # 是否允许生成文件覆盖到本地(自定义路径),默认不允许\n allowOverwrite: false','43d807aa0a4accbb193b6dc7e38ac8a3','2020-11-20 00:00:00','2024-12-25 08:29:33','nacos','0:0:0:0:0:0:0:1','','','代码生成','null','null','yaml','',''),
|
(6,'tongran-gen-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.tongran.gen.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# springdoc配置\nspringdoc:\n gatewayUrl: http://localhost:8080/${spring.application.name}\n api-docs:\n # 是否开启接口文档\n enabled: true\n info:\n # 标题\n title: \'代码生成接口文档\'\n # 描述\n description: \'代码生成接口描述\'\n # 作者信息\n contact:\n name: tongran\n url: https://tongran.vip\n\n# 代码生成\ngen:\n # 作者\n author: tongran\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\n packageName: com.tongran.system\n # 自动去除表前缀,默认是false\n autoRemovePre: false\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\n tablePrefix: sys_\n # 是否允许生成文件覆盖到本地(自定义路径),默认不允许\n allowOverwrite: false','43d807aa0a4accbb193b6dc7e38ac8a3','2020-11-20 00:00:00','2024-12-25 08:29:33','nacos','0:0:0:0:0:0:0:1','','','代码生成','null','null','yaml','',''),
|
||||||
(7,'ruoyi-job-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.job.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# springdoc配置\nspringdoc:\n gatewayUrl: http://localhost:8080/${spring.application.name}\n api-docs:\n # 是否开启接口文档\n enabled: true\n info:\n # 标题\n title: \'定时任务接口文档\'\n # 描述\n description: \'定时任务接口描述\'\n # 作者信息\n contact:\n name: RuoYi\n url: https://ruoyi.vip\n','f78483f845777335b9ed4a9f84758848','2020-11-20 00:00:00','2024-09-02 12:14:56','nacos','0:0:0:0:0:0:0:1','','','定时任务','null','null','yaml','',''),
|
(7,'tongran-job-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.tongran.job.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# springdoc配置\nspringdoc:\n gatewayUrl: http://localhost:8080/${spring.application.name}\n api-docs:\n # 是否开启接口文档\n enabled: true\n info:\n # 标题\n title: \'定时任务接口文档\'\n # 描述\n description: \'定时任务接口描述\'\n # 作者信息\n contact:\n name: tongran\n url: https://tongran.vip\n','f78483f845777335b9ed4a9f84758848','2020-11-20 00:00:00','2024-09-02 12:14:56','nacos','0:0:0:0:0:0:0:1','','','定时任务','null','null','yaml','',''),
|
||||||
(8,'ruoyi-file-dev.yml','DEFAULT_GROUP','# 本地文件上传 \r\nfile:\r\n domain: http://127.0.0.1:9300\r\n path: D:/ruoyi/uploadPath\r\n prefix: /statics\r\n\r\n# FastDFS配置\r\nfdfs:\r\n domain: http://8.129.231.12\r\n soTimeout: 3000\r\n connectTimeout: 2000\r\n trackerList: 8.129.231.12:22122\r\n\r\n# Minio配置\r\nminio:\r\n url: http://8.129.231.12:9000\r\n accessKey: minioadmin\r\n secretKey: minioadmin\r\n bucketName: test','5382b93f3d8059d6068c0501fdd41195','2020-11-20 00:00:00','2020-12-21 21:01:59',NULL,'0:0:0:0:0:0:0:1','','','文件服务','null','null','yaml',NULL,''),
|
(8,'tongran-file-dev.yml','DEFAULT_GROUP','# 本地文件上传 \r\nfile:\r\n domain: http://127.0.0.1:9300\r\n path: D:/tongran/uploadPath\r\n prefix: /statics\r\n\r\n# FastDFS配置\r\nfdfs:\r\n domain: http://8.129.231.12\r\n soTimeout: 3000\r\n connectTimeout: 2000\r\n trackerList: 8.129.231.12:22122\r\n\r\n# Minio配置\r\nminio:\r\n url: http://8.129.231.12:9000\r\n accessKey: minioadmin\r\n secretKey: minioadmin\r\n bucketName: test','5382b93f3d8059d6068c0501fdd41195','2020-11-20 00:00:00','2020-12-21 21:01:59',NULL,'0:0:0:0:0:0:0:1','','','文件服务','null','null','yaml',NULL,''),
|
||||||
(9,'sentinel-ruoyi-gateway','DEFAULT_GROUP','[\r\n {\r\n \"resource\": \"ruoyi-auth\",\r\n \"count\": 500,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"ruoyi-system\",\r\n \"count\": 1000,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"ruoyi-gen\",\r\n \"count\": 200,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"ruoyi-job\",\r\n \"count\": 300,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n }\r\n]','9f3a3069261598f74220bc47958ec252','2020-11-20 00:00:00','2020-11-20 00:00:00',NULL,'0:0:0:0:0:0:0:1','','','限流策略','null','null','json',NULL,'');
|
(9,'sentinel-tongran-gateway','DEFAULT_GROUP','[\r\n {\r\n \"resource\": \"tongran-auth\",\r\n \"count\": 500,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"tongran-system\",\r\n \"count\": 1000,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"tongran-gen\",\r\n \"count\": 200,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"tongran-job\",\r\n \"count\": 300,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n }\r\n]','9f3a3069261598f74220bc47958ec252','2020-11-20 00:00:00','2020-11-20 00:00:00',NULL,'0:0:0:0:0:0:0:1','','','限流策略','null','null','json',NULL,'');
|
||||||
|
|
||||||
|
|
||||||
/******************************************/
|
/******************************************/
|
||||||
|
|||||||
@@ -2,21 +2,21 @@
|
|||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
<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">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>tongran</artifactId>
|
||||||
<version>3.6.6</version>
|
<version>3.6.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>ruoyi-api-system</module>
|
<module>tongran-api-system</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>ruoyi-api</artifactId>
|
<artifactId>tongran-api</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
ruoyi-api系统接口
|
tongran-api系统接口
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -3,24 +3,24 @@
|
|||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
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">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-api</artifactId>
|
<artifactId>tongran-api</artifactId>
|
||||||
<version>3.6.6</version>
|
<version>3.6.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>ruoyi-api-system</artifactId>
|
<artifactId>tongran-api-system</artifactId>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
ruoyi-api-system系统接口模块
|
tongran-api-system系统接口模块
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- RuoYi Common Core-->
|
<!-- tongran Common Core-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-core</artifactId>
|
<artifactId>tongran-common-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
+6
-6
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.system.api;
|
package com.tongran.system.api;
|
||||||
|
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
@@ -7,15 +7,15 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.tongran.common.core.constant.ServiceNameConstants;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.domain.SysFile;
|
import com.tongran.system.api.domain.SysFile;
|
||||||
import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
|
import com.tongran.system.api.factory.RemoteFileFallbackFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件服务
|
* 文件服务
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
|
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
|
||||||
public interface RemoteFileService
|
public interface RemoteFileService
|
||||||
+8
-8
@@ -1,20 +1,20 @@
|
|||||||
package com.ruoyi.system.api;
|
package com.tongran.system.api;
|
||||||
|
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestHeader;
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
import com.tongran.common.core.constant.SecurityConstants;
|
||||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.tongran.common.core.constant.ServiceNameConstants;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.domain.SysLogininfor;
|
import com.tongran.system.api.domain.SysLogininfor;
|
||||||
import com.ruoyi.system.api.domain.SysOperLog;
|
import com.tongran.system.api.domain.SysOperLog;
|
||||||
import com.ruoyi.system.api.factory.RemoteLogFallbackFactory;
|
import com.tongran.system.api.factory.RemoteLogFallbackFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志服务
|
* 日志服务
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
|
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
|
||||||
public interface RemoteLogService
|
public interface RemoteLogService
|
||||||
+8
-8
@@ -1,11 +1,11 @@
|
|||||||
package com.ruoyi.system.api;
|
package com.tongran.system.api;
|
||||||
|
|
||||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
import com.tongran.common.core.constant.SecurityConstants;
|
||||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.tongran.common.core.constant.ServiceNameConstants;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
import com.tongran.common.core.web.page.TableDataInfo;
|
||||||
import com.ruoyi.system.api.domain.*;
|
import com.tongran.system.api.domain.*;
|
||||||
import com.ruoyi.system.api.factory.RemoteRevenueConfigFallbackFactory;
|
import com.tongran.system.api.factory.RemoteRevenueConfigFallbackFactory;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 用户服务
|
* 用户服务
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "remoteRevenueConfigService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteRevenueConfigFallbackFactory.class)
|
@FeignClient(contextId = "remoteRevenueConfigService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteRevenueConfigFallbackFactory.class)
|
||||||
public interface RemoteRevenueConfigService
|
public interface RemoteRevenueConfigService
|
||||||
+20
-12
@@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.api;
|
package com.tongran.system.api;
|
||||||
|
|
||||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
import com.tongran.common.core.constant.SecurityConstants;
|
||||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.tongran.common.core.constant.ServiceNameConstants;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.domain.RmAlarmRecordRemote;
|
import com.tongran.system.api.domain.RmAlarmRecordRemote;
|
||||||
import com.ruoyi.system.api.domain.RmDeployScriptRemote;
|
import com.tongran.system.api.domain.RmDeployScriptRemote;
|
||||||
import com.ruoyi.system.api.domain.RmMonitorPolicyRemote;
|
import com.tongran.system.api.domain.RmMonitorPolicyRemote;
|
||||||
import com.ruoyi.system.api.domain.RmNetworkInterfaceRemote;
|
import com.tongran.system.api.domain.RmNetworkInterfaceRemote;
|
||||||
import com.ruoyi.system.api.factory.RemoteRocketMqFallbackFactory;
|
import com.tongran.system.api.factory.RemoteRocketMqFallbackFactory;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ public interface RemoteRocketMqService {
|
|||||||
public R<List<RmNetworkInterfaceRemote>> getNetworkInterfaceList(@RequestBody RmNetworkInterfaceRemote rmNetworkInterfaceRemote, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
public R<List<RmNetworkInterfaceRemote>> getNetworkInterfaceList(@RequestBody RmNetworkInterfaceRemote rmNetworkInterfaceRemote, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取网卡接口列表
|
* 绑定业务网卡
|
||||||
* @param rmNetworkInterfaceRemote
|
* @param rmNetworkInterfaceRemote
|
||||||
* @param source
|
* @param source
|
||||||
* @return
|
* @return
|
||||||
@@ -70,7 +70,7 @@ public interface RemoteRocketMqService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/monitorPolicy/innerIssueSwitchPolicy")
|
@GetMapping("/monitorPolicy/innerIssueSwitchPolicy")
|
||||||
public R<String> innerIssueSwitchPolicy(Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
public R<String> innerIssueSwitchPolicy(@RequestParam("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
/**
|
/**
|
||||||
* 查询策略信息
|
* 查询策略信息
|
||||||
* @param rmMonitorPolicyRemote
|
* @param rmMonitorPolicyRemote
|
||||||
@@ -95,7 +95,15 @@ public interface RemoteRocketMqService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/monitorPolicy/issueDefaultPolicyByClientId")
|
@GetMapping("/monitorPolicy/issueDefaultPolicyByClientId")
|
||||||
public R<Integer> issueDefaultPolicyByClientId(String clientId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
public R<Integer> issueDefaultPolicyByClientId(@RequestParam("clientId") String clientId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
@PostMapping("policy/addDeployScript")
|
@PostMapping("policy/addDeployScript")
|
||||||
R<Integer> addDeployScript(@RequestBody RmDeployScriptRemote addData, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
R<Integer> addDeployScript(@RequestBody RmDeployScriptRemote addData, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
/**
|
||||||
|
* 获取子网卡接口列表
|
||||||
|
* @param rmNetworkInterfaceRemote
|
||||||
|
* @param source
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/networkInterfaceChild/innerGetChildList")
|
||||||
|
public R<List<RmNetworkInterfaceRemote>> innerGetChildList(@RequestBody RmNetworkInterfaceRemote rmNetworkInterfaceRemote, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
}
|
}
|
||||||
+10
-10
@@ -1,20 +1,20 @@
|
|||||||
package com.ruoyi.system.api;
|
package com.tongran.system.api;
|
||||||
|
|
||||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
import com.tongran.common.core.constant.SecurityConstants;
|
||||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.tongran.common.core.constant.ServiceNameConstants;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.domain.EpsInitialTrafficDataRemote;
|
import com.tongran.system.api.domain.EpsInitialTrafficDataRemote;
|
||||||
import com.ruoyi.system.api.domain.NodeBandwidth;
|
import com.tongran.system.api.domain.NodeBandwidth;
|
||||||
import com.ruoyi.system.api.domain.SysUser;
|
import com.tongran.system.api.domain.SysUser;
|
||||||
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
|
import com.tongran.system.api.factory.RemoteUserFallbackFactory;
|
||||||
import com.ruoyi.system.api.model.LoginUser;
|
import com.tongran.system.api.model.LoginUser;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户服务
|
* 用户服务
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
|
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
|
||||||
public interface RemoteUserService
|
public interface RemoteUserService
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
+13
-1
@@ -1,8 +1,10 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class NetworkInfo {
|
public class NetworkInfo {
|
||||||
// 运营商
|
// 运营商
|
||||||
@@ -17,6 +19,9 @@ public class NetworkInfo {
|
|||||||
// IPv4 地址
|
// IPv4 地址
|
||||||
@JsonProperty("ipv4")
|
@JsonProperty("ipv4")
|
||||||
private String ipv4;
|
private String ipv4;
|
||||||
|
// IPv4 地址
|
||||||
|
@JsonProperty("ipv6")
|
||||||
|
private String ipv6;
|
||||||
// MAC 地址
|
// MAC 地址
|
||||||
@JsonProperty("mac")
|
@JsonProperty("mac")
|
||||||
private String mac;
|
private String mac;
|
||||||
@@ -31,4 +36,11 @@ public class NetworkInfo {
|
|||||||
private String publicIp;
|
private String publicIp;
|
||||||
@JsonProperty("type")
|
@JsonProperty("type")
|
||||||
private String type;
|
private String type;
|
||||||
|
// 如果是子接口,存储父接口名称
|
||||||
|
@JsonProperty("parentInterface")
|
||||||
|
private String parentInterface;
|
||||||
|
|
||||||
|
// 如果是父接口,存储子接口列表
|
||||||
|
@JsonProperty("subInterfaces")
|
||||||
|
private List<NetworkInfo> subInterfaces;
|
||||||
}
|
}
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
+11
-4
@@ -1,7 +1,7 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -44,6 +44,8 @@ public class RmNetworkInterfaceRemote extends BaseEntity {
|
|||||||
/** IPv4地址 */
|
/** IPv4地址 */
|
||||||
@Excel(name = "IPv4地址")
|
@Excel(name = "IPv4地址")
|
||||||
private String ipv4Address;
|
private String ipv4Address;
|
||||||
|
/** IPv6地址 */
|
||||||
|
private String ipv6Address;
|
||||||
|
|
||||||
/** 网关 */
|
/** 网关 */
|
||||||
@Excel(name = "网关")
|
@Excel(name = "网关")
|
||||||
@@ -52,6 +54,11 @@ public class RmNetworkInterfaceRemote extends BaseEntity {
|
|||||||
private String bindIp;
|
private String bindIp;
|
||||||
/** 新旧标识 */
|
/** 新旧标识 */
|
||||||
private Integer newFlag;
|
private Integer newFlag;
|
||||||
/** 服务器clientId集合 */
|
/** 查询业务网卡或单个网卡的clientId集合 */
|
||||||
private String clientIds;
|
private String clientIds;
|
||||||
|
/** 查询所有网卡的clientId集合 */
|
||||||
|
private String allClientIds;
|
||||||
|
|
||||||
|
// 如果是子接口,存储父接口名称
|
||||||
|
private String parentInterface;
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -8,12 +8,12 @@ import javax.validation.constraints.NotNull;
|
|||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门表 sys_dept
|
* 部门表 sys_dept
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class SysDept extends BaseEntity
|
public class SysDept extends BaseEntity
|
||||||
{
|
{
|
||||||
+6
-6
@@ -1,18 +1,18 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.annotation.Excel.ColumnType;
|
import com.tongran.common.core.annotation.Excel.ColumnType;
|
||||||
import com.ruoyi.common.core.constant.UserConstants;
|
import com.tongran.common.core.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典数据表 sys_dict_data
|
* 字典数据表 sys_dict_data
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class SysDictData extends BaseEntity
|
public class SysDictData extends BaseEntity
|
||||||
{
|
{
|
||||||
+5
-5
@@ -1,18 +1,18 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Pattern;
|
import javax.validation.constraints.Pattern;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.annotation.Excel.ColumnType;
|
import com.tongran.common.core.annotation.Excel.ColumnType;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典类型表 sys_dict_type
|
* 字典类型表 sys_dict_type
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class SysDictType extends BaseEntity
|
public class SysDictType extends BaseEntity
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
@@ -6,7 +6,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||||||
/**
|
/**
|
||||||
* 文件信息
|
* 文件信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class SysFile
|
public class SysFile
|
||||||
{
|
{
|
||||||
+5
-5
@@ -1,15 +1,15 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.annotation.Excel.ColumnType;
|
import com.tongran.common.core.annotation.Excel.ColumnType;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统访问记录表 sys_logininfor
|
* 系统访问记录表 sys_logininfor
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class SysLogininfor extends BaseEntity
|
public class SysLogininfor extends BaseEntity
|
||||||
{
|
{
|
||||||
+5
-5
@@ -1,15 +1,15 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.annotation.Excel.ColumnType;
|
import com.tongran.common.core.annotation.Excel.ColumnType;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志记录表 oper_log
|
* 操作日志记录表 oper_log
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class SysOperLog extends BaseEntity
|
public class SysOperLog extends BaseEntity
|
||||||
{
|
{
|
||||||
+5
-5
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
@@ -6,14 +6,14 @@ import javax.validation.constraints.NotNull;
|
|||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.annotation.Excel.ColumnType;
|
import com.tongran.common.core.annotation.Excel.ColumnType;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色表 sys_role
|
* 角色表 sys_role
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class SysRole extends BaseEntity
|
public class SysRole extends BaseEntity
|
||||||
{
|
{
|
||||||
+9
-9
@@ -1,22 +1,22 @@
|
|||||||
package com.ruoyi.system.api.domain;
|
package com.tongran.system.api.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.annotation.Excel;
|
import com.tongran.common.core.annotation.Excel;
|
||||||
import com.ruoyi.common.core.annotation.Excel.ColumnType;
|
import com.tongran.common.core.annotation.Excel.ColumnType;
|
||||||
import com.ruoyi.common.core.annotation.Excel.Type;
|
import com.tongran.common.core.annotation.Excel.Type;
|
||||||
import com.ruoyi.common.core.constant.UserConstants;
|
import com.tongran.common.core.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.annotation.Excels;
|
import com.tongran.common.core.annotation.Excels;
|
||||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
import com.tongran.common.core.web.domain.BaseEntity;
|
||||||
import com.ruoyi.common.core.xss.Xss;
|
import com.tongran.common.core.xss.Xss;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户对象 sys_user
|
* 用户对象 sys_user
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class SysUser extends BaseEntity
|
public class SysUser extends BaseEntity
|
||||||
{
|
{
|
||||||
+5
-5
@@ -1,18 +1,18 @@
|
|||||||
package com.ruoyi.system.api.factory;
|
package com.tongran.system.api.factory;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.RemoteFileService;
|
import com.tongran.system.api.RemoteFileService;
|
||||||
import com.ruoyi.system.api.domain.SysFile;
|
import com.tongran.system.api.domain.SysFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件服务降级处理
|
* 文件服务降级处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService>
|
public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService>
|
||||||
+6
-6
@@ -1,18 +1,18 @@
|
|||||||
package com.ruoyi.system.api.factory;
|
package com.tongran.system.api.factory;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.RemoteLogService;
|
import com.tongran.system.api.RemoteLogService;
|
||||||
import com.ruoyi.system.api.domain.SysLogininfor;
|
import com.tongran.system.api.domain.SysLogininfor;
|
||||||
import com.ruoyi.system.api.domain.SysOperLog;
|
import com.tongran.system.api.domain.SysOperLog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志服务降级处理
|
* 日志服务降级处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogService>
|
public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogService>
|
||||||
+6
-6
@@ -1,9 +1,9 @@
|
|||||||
package com.ruoyi.system.api.factory;
|
package com.tongran.system.api.factory;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
import com.tongran.common.core.web.page.TableDataInfo;
|
||||||
import com.ruoyi.system.api.RemoteRevenueConfigService;
|
import com.tongran.system.api.RemoteRevenueConfigService;
|
||||||
import com.ruoyi.system.api.domain.*;
|
import com.tongran.system.api.domain.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
@@ -14,7 +14,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 用户服务降级处理
|
* 用户服务降级处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RemoteRevenueConfigFallbackFactory implements FallbackFactory<RemoteRevenueConfigService>
|
public class RemoteRevenueConfigFallbackFactory implements FallbackFactory<RemoteRevenueConfigService>
|
||||||
+13
-8
@@ -1,11 +1,11 @@
|
|||||||
package com.ruoyi.system.api.factory;
|
package com.tongran.system.api.factory;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.RemoteRocketMqService;
|
import com.tongran.system.api.RemoteRocketMqService;
|
||||||
import com.ruoyi.system.api.domain.RmAlarmRecordRemote;
|
import com.tongran.system.api.domain.RmAlarmRecordRemote;
|
||||||
import com.ruoyi.system.api.domain.RmDeployScriptRemote;
|
import com.tongran.system.api.domain.RmDeployScriptRemote;
|
||||||
import com.ruoyi.system.api.domain.RmMonitorPolicyRemote;
|
import com.tongran.system.api.domain.RmMonitorPolicyRemote;
|
||||||
import com.ruoyi.system.api.domain.RmNetworkInterfaceRemote;
|
import com.tongran.system.api.domain.RmNetworkInterfaceRemote;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
@@ -18,7 +18,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* 用户服务降级处理
|
* 用户服务降级处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RemoteRocketMqFallbackFactory implements FallbackFactory<RemoteRocketMqService>
|
public class RemoteRocketMqFallbackFactory implements FallbackFactory<RemoteRocketMqService>
|
||||||
@@ -83,6 +83,11 @@ public class RemoteRocketMqFallbackFactory implements FallbackFactory<RemoteRock
|
|||||||
public R<Integer> addDeployScript(RmDeployScriptRemote addData, String source) {
|
public R<Integer> addDeployScript(RmDeployScriptRemote addData, String source) {
|
||||||
return R.fail(throwable.getMessage());
|
return R.fail(throwable.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<List<RmNetworkInterfaceRemote>> innerGetChildList(RmNetworkInterfaceRemote rmNetworkInterfaceRemote, String source) {
|
||||||
|
return R.fail(throwable.getMessage());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+8
-8
@@ -1,11 +1,11 @@
|
|||||||
package com.ruoyi.system.api.factory;
|
package com.tongran.system.api.factory;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.system.api.RemoteUserService;
|
import com.tongran.system.api.RemoteUserService;
|
||||||
import com.ruoyi.system.api.domain.EpsInitialTrafficDataRemote;
|
import com.tongran.system.api.domain.EpsInitialTrafficDataRemote;
|
||||||
import com.ruoyi.system.api.domain.NodeBandwidth;
|
import com.tongran.system.api.domain.NodeBandwidth;
|
||||||
import com.ruoyi.system.api.domain.SysUser;
|
import com.tongran.system.api.domain.SysUser;
|
||||||
import com.ruoyi.system.api.model.LoginUser;
|
import com.tongran.system.api.model.LoginUser;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
|||||||
/**
|
/**
|
||||||
* 用户服务降级处理
|
* 用户服务降级处理
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserService>
|
public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserService>
|
||||||
+3
-3
@@ -1,13 +1,13 @@
|
|||||||
package com.ruoyi.system.api.model;
|
package com.tongran.system.api.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import com.ruoyi.system.api.domain.SysUser;
|
import com.tongran.system.api.domain.SysUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户信息
|
* 用户信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class LoginUser implements Serializable
|
public class LoginUser implements Serializable
|
||||||
{
|
{
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
com.tongran.system.api.factory.RemoteUserFallbackFactory
|
||||||
|
com.tongran.system.api.factory.RemoteLogFallbackFactory
|
||||||
|
com.tongran.system.api.factory.RemoteFileFallbackFactory
|
||||||
|
com.tongran.system.api.factory.RemoteRevenueConfigFallbackFactory
|
||||||
|
com.tongran.system.api.factory.RemoteRocketMqFallbackFactory
|
||||||
@@ -2,16 +2,16 @@
|
|||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi</artifactId>
|
<artifactId>tongran</artifactId>
|
||||||
<version>3.6.6</version>
|
<version>3.6.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>ruoyi-auth</artifactId>
|
<artifactId>tongran-auth</artifactId>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
ruoyi-auth认证授权中心
|
tongran-auth认证授权中心
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -46,10 +46,10 @@
|
|||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- RuoYi Common Security-->
|
<!-- tongran Common Security-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common-security</artifactId>
|
<artifactId>tongran-common-security</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
+5
-5
@@ -1,22 +1,22 @@
|
|||||||
package com.ruoyi.auth;
|
package com.tongran.auth;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
import com.tongran.common.security.annotation.EnableRyFeignClients;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 认证授权中心
|
* 认证授权中心
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@EnableRyFeignClients
|
@EnableRyFeignClients
|
||||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class })
|
||||||
public class RuoYiAuthApplication
|
public class TongRanAuthApplication
|
||||||
{
|
{
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
SpringApplication.run(RuoYiAuthApplication.class, args);
|
SpringApplication.run(TongRanAuthApplication.class, args);
|
||||||
System.out.println("(♥◠‿◠)ノ゙ 认证授权中心启动成功 ლ(´ڡ`ლ)゙ \n" +
|
System.out.println("(♥◠‿◠)ノ゙ 认证授权中心启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||||
" .-------. ____ __ \n" +
|
" .-------. ____ __ \n" +
|
||||||
" | _ _ \\ \\ \\ / / \n" +
|
" | _ _ \\ \\ \\ / / \n" +
|
||||||
+12
-12
@@ -1,4 +1,4 @@
|
|||||||
package com.ruoyi.auth.controller;
|
package com.tongran.auth.controller;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -6,21 +6,21 @@ import org.springframework.web.bind.annotation.DeleteMapping;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import com.ruoyi.auth.form.LoginBody;
|
import com.tongran.auth.form.LoginBody;
|
||||||
import com.ruoyi.auth.form.RegisterBody;
|
import com.tongran.auth.form.RegisterBody;
|
||||||
import com.ruoyi.auth.service.SysLoginService;
|
import com.tongran.auth.service.SysLoginService;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.utils.JwtUtils;
|
import com.tongran.common.core.utils.JwtUtils;
|
||||||
import com.ruoyi.common.core.utils.StringUtils;
|
import com.tongran.common.core.utils.StringUtils;
|
||||||
import com.ruoyi.common.security.auth.AuthUtil;
|
import com.tongran.common.security.auth.AuthUtil;
|
||||||
import com.ruoyi.common.security.service.TokenService;
|
import com.tongran.common.security.service.TokenService;
|
||||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
import com.tongran.common.security.utils.SecurityUtils;
|
||||||
import com.ruoyi.system.api.model.LoginUser;
|
import com.tongran.system.api.model.LoginUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* token 控制
|
* token 控制
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
public class TokenController
|
public class TokenController
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
package com.ruoyi.auth.form;
|
package com.tongran.auth.form;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户登录对象
|
* 用户登录对象
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class LoginBody
|
public class LoginBody
|
||||||
{
|
{
|
||||||
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
package com.ruoyi.auth.form;
|
package com.tongran.auth.form;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户注册对象
|
* 用户注册对象
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
public class RegisterBody extends LoginBody
|
public class RegisterBody extends LoginBody
|
||||||
{
|
{
|
||||||
+18
-18
@@ -1,28 +1,28 @@
|
|||||||
package com.ruoyi.auth.service;
|
package com.tongran.auth.service;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.core.constant.CacheConstants;
|
import com.tongran.common.core.constant.CacheConstants;
|
||||||
import com.ruoyi.common.core.constant.Constants;
|
import com.tongran.common.core.constant.Constants;
|
||||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
import com.tongran.common.core.constant.SecurityConstants;
|
||||||
import com.ruoyi.common.core.constant.UserConstants;
|
import com.tongran.common.core.constant.UserConstants;
|
||||||
import com.ruoyi.common.core.domain.R;
|
import com.tongran.common.core.domain.R;
|
||||||
import com.ruoyi.common.core.enums.UserStatus;
|
import com.tongran.common.core.enums.UserStatus;
|
||||||
import com.ruoyi.common.core.exception.ServiceException;
|
import com.tongran.common.core.exception.ServiceException;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.tongran.common.core.text.Convert;
|
||||||
import com.ruoyi.common.core.utils.DateUtils;
|
import com.tongran.common.core.utils.DateUtils;
|
||||||
import com.ruoyi.common.core.utils.StringUtils;
|
import com.tongran.common.core.utils.StringUtils;
|
||||||
import com.ruoyi.common.core.utils.ip.IpUtils;
|
import com.tongran.common.core.utils.ip.IpUtils;
|
||||||
import com.ruoyi.common.redis.service.RedisService;
|
import com.tongran.common.redis.service.RedisService;
|
||||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
import com.tongran.common.security.utils.SecurityUtils;
|
||||||
import com.ruoyi.system.api.RemoteUserService;
|
import com.tongran.system.api.RemoteUserService;
|
||||||
import com.ruoyi.system.api.domain.SysUser;
|
import com.tongran.system.api.domain.SysUser;
|
||||||
import com.ruoyi.system.api.model.LoginUser;
|
import com.tongran.system.api.model.LoginUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录校验方法
|
* 登录校验方法
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysLoginService
|
public class SysLoginService
|
||||||
+8
-8
@@ -1,19 +1,19 @@
|
|||||||
package com.ruoyi.auth.service;
|
package com.tongran.auth.service;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.core.constant.CacheConstants;
|
import com.tongran.common.core.constant.CacheConstants;
|
||||||
import com.ruoyi.common.core.constant.Constants;
|
import com.tongran.common.core.constant.Constants;
|
||||||
import com.ruoyi.common.core.exception.ServiceException;
|
import com.tongran.common.core.exception.ServiceException;
|
||||||
import com.ruoyi.common.redis.service.RedisService;
|
import com.tongran.common.redis.service.RedisService;
|
||||||
import com.ruoyi.common.security.utils.SecurityUtils;
|
import com.tongran.common.security.utils.SecurityUtils;
|
||||||
import com.ruoyi.system.api.domain.SysUser;
|
import com.tongran.system.api.domain.SysUser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录密码方法
|
* 登录密码方法
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysPasswordService
|
public class SysPasswordService
|
||||||
+8
-8
@@ -1,18 +1,18 @@
|
|||||||
package com.ruoyi.auth.service;
|
package com.tongran.auth.service;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import com.ruoyi.common.core.constant.Constants;
|
import com.tongran.common.core.constant.Constants;
|
||||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
import com.tongran.common.core.constant.SecurityConstants;
|
||||||
import com.ruoyi.common.core.utils.StringUtils;
|
import com.tongran.common.core.utils.StringUtils;
|
||||||
import com.ruoyi.common.core.utils.ip.IpUtils;
|
import com.tongran.common.core.utils.ip.IpUtils;
|
||||||
import com.ruoyi.system.api.RemoteLogService;
|
import com.tongran.system.api.RemoteLogService;
|
||||||
import com.ruoyi.system.api.domain.SysLogininfor;
|
import com.tongran.system.api.domain.SysLogininfor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 记录日志方法
|
* 记录日志方法
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author tongran
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysRecordLogService
|
public class SysRecordLogService
|
||||||
+4
-4
@@ -6,16 +6,15 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: ruoyi-auth
|
name: tongran-auth
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: dev
|
active: dev
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 172.16.15.52:8848
|
|
||||||
# 服务注册地址
|
# 服务注册地址
|
||||||
# server-addr: 172.16.15.103:8848
|
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||||
namespace: ${spring.cloud.nacos.config.namespace}
|
namespace: ${spring.cloud.nacos.config.namespace}
|
||||||
username: ${spring.cloud.nacos.config.username}
|
username: ${spring.cloud.nacos.config.username}
|
||||||
password: ${spring.cloud.nacos.config.password}
|
password: ${spring.cloud.nacos.config.password}
|
||||||
@@ -23,7 +22,8 @@ spring:
|
|||||||
# 配置中心地址
|
# 配置中心地址
|
||||||
server-addr: 172.16.15.52:8848
|
server-addr: 172.16.15.52:8848
|
||||||
# server-addr: 172.16.15.103:8848
|
# server-addr: 172.16.15.103:8848
|
||||||
namespace: saas-local
|
# namespace: public
|
||||||
|
namespace: saas-prod
|
||||||
username: nacos
|
username: nacos
|
||||||
password: nacos
|
password: nacos
|
||||||
# 配置文件格式
|
# 配置文件格式
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
<!-- 日志存放路径 -->
|
<!-- 日志存放路径 -->
|
||||||
<property name="log.path" value="logs/ruoyi-file" />
|
<property name="log.path" value="logs/tongran-auth" />
|
||||||
<!-- 日志输出格式 -->
|
<!-- 日志输出格式 -->
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
<!-- 系统模块日志级别控制 -->
|
||||||
<logger name="com.ruoyi" level="info" />
|
<logger name="com.tongran" level="info" />
|
||||||
<!-- Spring日志级别控制 -->
|
<!-- Spring日志级别控制 -->
|
||||||
<logger name="org.springframework" level="warn" />
|
<logger name="org.springframework" level="warn" />
|
||||||
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?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.tongran</groupId>
|
||||||
|
<artifactId>tongran</artifactId>
|
||||||
|
<version>3.6.6</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>tongran-common-log</module>
|
||||||
|
<module>tongran-common-core</module>
|
||||||
|
<module>tongran-common-redis</module>
|
||||||
|
<module>tongran-common-seata</module>
|
||||||
|
<module>tongran-common-swagger</module>
|
||||||
|
<module>tongran-common-security</module>
|
||||||
|
<module>tongran-common-sensitive</module>
|
||||||
|
<module>tongran-common-datascope</module>
|
||||||
|
<module>tongran-common-datasource</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<artifactId>tongran-common</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
tongran-common通用模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -3,16 +3,16 @@
|
|||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
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">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.tongran</groupId>
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>tongran-common</artifactId>
|
||||||
<version>3.6.6</version>
|
<version>3.6.6</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>ruoyi-common-core</artifactId>
|
<artifactId>tongran-common-core</artifactId>
|
||||||
|
|
||||||
<description>
|
<description>
|
||||||
ruoyi-common-core核心模块
|
tongran-common-core核心模块
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user