Author SHA1 Message Date
gaoyutao c918523a7a 增加服务器分配负责人功能 2026-04-07 17:36:39 +08:00
gaoyutao 4d39627d96 增加可选服务器所属交换机功能。 2026-04-03 09:39:43 +08:00
gaoyutao feaa0b4b97 1、交换机管理增加下架接口。
2、流量图改为有ipv6展示,没有就不展示。
2026-04-01 17:46:23 +08:00
gaoyutao 4839ea178b 区分配置文件、修复通知报错问题 2026-03-30 17:59:06 +08:00
gaoyutao 011a93585c 优化省市运营商信息处理。 2026-03-25 17:55:37 +08:00
gaoyutao 20d0af6dbd 业务流量对齐x轴 2026-03-24 13:05:54 +08:00
gaoyutao 8ed47cd95e 修复业务流量与时间轴错位问题。 2026-03-20 17:56:19 +08:00
gaoyutao fcd392ec10 1、优化ipv6判断.
2、优化业务流量数据统计。
2026-03-19 17:56:32 +08:00
gaoyutao 2e3b2af397 1、新增业务进程与名称对应表。
2、新增业务流量查询逻辑。
2026-03-18 18:06:11 +08:00
gaoyutao fb27c1c0e0 优化业务流量存储 2026-03-17 17:59:08 +08:00
gaoyutao 00b2230773 1、agent批量更新限制10台设备。 2026-03-13 17:58:45 +08:00
gaoyutao 268c0f319d 优化ping丢包率告警 2026-03-12 18:04:43 +08:00
gaoyutao 03a77cc741 增加ping丢包率告警 2026-03-11 17:55:42 +08:00
gaoyutao cffcb2efd3 saas平台联调agent存储业务流量。
优化ip存储,未探测到,保留上次结果。
2026-03-10 17:50:48 +08:00
gaoyutao d4902a488d 1、优化告警信息展示。
2、搜索栏增加备注搜索模糊查询。
2026-03-09 18:11:17 +08:00
gaoyutao bbb50ba56f 新增业务流量入库方法。
增加自动创建业务流量分表方法
2026-03-06 17:58:08 +08:00
gaoyutao 03f9609e28 修复个别机器出省流量统计失败问题。
增加日95利用率排序
2026-03-03 17:44:52 +08:00
gaoyutao a1552e34b4 补充磁盘自动建表字段 2026-03-02 17:58:47 +08:00
gaoyutao 67a627054b 流量补全消费者改为缓存排序处理,保证顺序。 2026-02-28 18:01:30 +08:00
gaoyutao 00fffd0aef 优化内存详细逻辑。 2026-02-27 17:50:43 +08:00
gaoyutao 05c67476e6 优化历史消息处理 2026-02-26 17:59:05 +08:00
gaoyutao 9fdafe542d 增加内存详细处理、优化历史消息处理 2026-02-26 14:07:37 +08:00
gaoyutao 00d574fb5f 新建公告用户表 2026-02-12 17:53:21 +08:00
gaoyutao 3c1edfcd2e 1、优化服务器管理列表ip分页展示。
2、集成rustfs SDK。
3、测试交换机数据IoTDB入库。
2026-02-11 18:02:55 +08:00
gaoyutao 8cc321bf14 1、增加对象存储初始模块
2、优化出省流量统计展示。
2026-02-10 18:19:22 +08:00
gaoyutao 5b28479625 1、优化服务器管理列表运营商、省、ip展示。
2、服务器管理列表搜索条件增加子网卡ip筛选。
2026-02-09 13:45:12 +08:00
gaoyutao 0fdce6b13b 处理磁盘健康数据 2026-02-06 17:11:00 +08:00
gaoyutao 60db343cb0 1、适配cpu信息表、容器信息表、挂载点信息表分表。
2、agent增加采集磁盘健康状态。
3、优化磁盘上报数据处理。
2026-02-05 18:04:34 +08:00
gaoyutao 0fb6a33f2e 增加出省流量占比过高告警 2026-02-05 11:17:21 +08:00
gaoyutao 5dd9004081 1、优化tcpdump解析速度。
2、补充tcpdump晚8点默认策略下发。
3、服务器管理列表增加出省流量占比列。
2026-02-04 17:41:00 +08:00
gaoyutao f8e0ab1b2a 1、内存利用率图标增加内存已用字段。
2、ping丢包率虚拟网卡模式累加。
2026-02-03 18:46:51 +08:00
gaoyutao 180c522ca3 增加历史消息消费接口 2026-02-03 14:07:55 +08:00
gaoyutao 180986ba16 修复磁盘NPE 2026-01-30 21:21:48 +08:00
gaoyutao f75a49474a 出省流量统计增加立即执行、增加占比总计、不同运营商也统计.
磁盘统计HDD改为所有磁盘、速率单位改为 MB/s、流量图开始时间修正。
流量95值收益优化
2026-01-30 19:17:00 +08:00
gaoyutao 9809ae673c 优化95值计算 2026-01-30 10:14:11 +08:00
gaoyutao 1dab9b1cf4 优化agent本地存储流量数据处理 2026-01-29 12:00:05 +08:00
gaoyutao 29a30b1f52 补充单位转化方法 2026-01-28 09:46:54 +08:00
gaoyutao 589c80fa6f 挂载点数据增加已用存储空间字段 2026-01-27 19:08:16 +08:00
gaoyutao 3ef0aacf0c 优化95值计算相关数据查看 2026-01-27 11:27:55 +08:00
gaoyutao 5dd1b90acb 1、修复虚拟网卡收益计算、流量图默认单位不正确问题。
2、联调告警阈值配置接口。
3、优化挂载点数据展示。
2026-01-26 18:52:52 +08:00
gaoyutao edddf77b6a 优化告警内容 2026-01-23 19:18:08 +08:00
gaoyutao 5564b03ed2 开发监控看板组管理CRUD
设计告警阈值配置功能
2026-01-23 18:39:20 +08:00
gaoyutao 493ecba0ba 1、优化agent本地存储流量文件删除逻辑。
2、开发tcpdump探测策略下发接口。
3、开发tcpdump探测接口。
4、开发出省流量计算统计接口。
2026-01-22 18:00:17 +08:00
gaoyutao fe0225012f 开发tcpdump策略表CRUD 2026-01-21 18:15:30 +08:00
gaoyutao b384aa8db5 开发tcpdump策略表CRUD 2026-01-21 18:11:14 +08:00
gaoyutao 31cf6dbb04 增加流量重试入库功能 2026-01-20 18:04:23 +08:00
gaoyutao 14a750a736 1、所有流量表新增字段ping丢包率。
2、开发ping丢包率图形接口。
2026-01-19 18:17:23 +08:00
gaoyutao 4ed1a66466 增加cpu温度处理 2026-01-16 18:11:16 +08:00
gaoyutao d62fe4b99a 1、增加磁盘HDD类型已用空间图形接口。
2、增加磁盘HDD类型总空间字段计算。
3、增加硬盘设备监控列表接口。
2026-01-16 15:10:31 +08:00
gaoyutao f39aa887c8 磁盘数据表分表,适配磁盘数据名称存储表。
磁盘相关功能
2026-01-15 18:14:17 +08:00
gaoyutao c921a83d27 磁盘表分表,增加磁盘名称存储CRUD 2026-01-15 10:27:40 +08:00
gaoyutao ac406d88fe 修复pppoe配置界面异常bug 2026-01-13 18:43:56 +08:00
gaoyutao 2b2f70a910 修复昨日95值没计算bug。 2026-01-13 10:05:54 +08:00
gaoyutao 5c9ae4fba4 pppoe配置增加5个字段。 2026-01-12 18:27:57 +08:00
gaoyutao 14b0e39d5b 优化详情升级到最新 2026-01-09 19:18:21 +08:00
gaoyutao 52090c6f37 优化平台ppoe和非平台ppoe配置方式的虚拟网卡上报带宽值处理.
优化pppoe虚拟网卡处理逻辑
2026-01-09 18:04:13 +08:00
gaoyutao f5f5a97744 优化pppoe数据处理
流量图改为只保留有ipv4的流量网卡流量。
流量图增加显示对应的ipv4。
2026-01-08 18:24:05 +08:00
gaoyutao d7432bc53f 补充注解 2026-01-08 09:34:57 +08:00
gaoyutao ea6caa0211 优化网卡名称变更处理
增加非saas平台拨号数据处理
优化详情信息
2026-01-07 19:20:01 +08:00
gaoyutao 86d7385c15 FRPC运行状态在服务器离线时改为未运行
时序数据库入库测试
网卡名称同步修改
2026-01-06 19:29:41 +08:00
gaoyutao a2659d0c6b 交换机数据采集唯一标识改为clientId。
优化收益计算
2026-01-05 18:32:49 +08:00
gaoyutao 2593c58741 服务器系统其他信息数据表分表。
交换机光模块信息数据表分表。
2026-01-04 18:10:13 +08:00
gaoyutao 4651da4fe4 开发庭与科技详情相关接口。
优化PppoE查询接口。
2025-12-31 17:59:33 +08:00
gaoyutao 08680bb46a 单网卡总流量、ipv4流量、ipv6流量合并到一个图
pppoe状态上报增加
2025-12-30 18:23:09 +08:00
gaoyutao 6e2ca8ac53 增加服务器下架处理,
服务器详情增加agent最新版本、cpu核数、内存字段。
开发pppoe主表及子表CRUD
2025-12-29 18:25:32 +08:00
gaoyutao c852fbd506 优化敏感词 2025-12-29 10:05:24 +08:00
gaoyutao 16a28f798b 优化敏感词、作者改为tongran 2025-12-26 19:00:41 +08:00
gaoyutao 30373bbb1e 交换机管理图形监控只展示端口为up的。
优化frp信息上报
2025-12-24 19:55:47 +08:00
gaoyutao 5eda46802e 开发frpc接口、增加网卡绑定触发逻辑。 2025-12-23 18:55:27 +08:00
gaoyutao 1af9d3fbc5 1、修复昨日95值不显示问题。
2、开发frpc端口自动分配功能。
2025-12-22 18:51:48 +08:00
gaoyutao 4e7a30ed61 增加取消告警闪烁功能 2025-12-19 18:45:15 +08:00
gaoyutao 5ab1b6e8a4 v1.3初始化 2025-12-18 16:45:31 +08:00
599 changed files with 18505 additions and 3163 deletions
-25
View File
@@ -25,28 +25,3 @@ com.tongran
├── tongran-visual // 图形化管理模块 ├── tongran-visual // 图形化管理模块
│ └── tongran-visual-monitor // 监控中心 [9100] │ └── tongran-visual-monitor // 监控中心 [9100]
├──pom.xml // 公共依赖 ├──pom.xml // 公共依赖
~~~
## 架构图
<img src="https://oscimg.oschina.net/oscnet/up-82e9722ecb846786405a904bafcf19f73f3.png"/>
## 内置功能
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
3. 岗位管理:配置系统用户所属担任职务。
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
7. 参数管理:对系统动态配置常用参数。
8. 通知公告:系统通知公告信息发布维护。
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
10. 登录日志:系统登录日志记录查询包含登录异常。
11. 在线用户:当前系统中活跃用户状态监控。
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
14. 系统接口:根据业务代码自动生成相关的api接口文档。
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
16. 在线构建器:拖动表单元素生成相应的HTML代码。
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
-41
View File
@@ -1,41 +0,0 @@
#!/bin/sh
# 复制项目的文件到对应docker路径,便于一键生成镜像。
usage() {
echo "Usage: sh copy.sh"
exit 1
}
# copy sql
echo "begin copy sql "
cp ../sql/ry_20250523.sql ./mysql/db
cp ../sql/ry_config_20250224.sql ./mysql/db
# copy html
echo "begin copy html "
cp -r ../tongran-ui/dist/** ./nginx/html/dist
# copy jar
echo "begin copy tongran-gateway "
cp ../tongran-gateway/target/tongran-gateway.jar ./tongran/gateway/jar
echo "begin copy tongran-auth "
cp ../tongran-auth/target/tongran-auth.jar ./tongran/auth/jar
echo "begin copy tongran-visual "
cp ../tongran-visual/tongran-monitor/target/tongran-visual-monitor.jar ./tongran/visual/monitor/jar
echo "begin copy tongran-modules-system "
cp ../tongran-modules/tongran-system/target/tongran-modules-system.jar ./tongran/modules/system/jar
echo "begin copy tongran-modules-file "
cp ../tongran-modules/tongran-file/target/tongran-modules-file.jar ./tongran/modules/file/jar
echo "begin copy tongran-modules-job "
cp ../tongran-modules/tongran-job/target/tongran-modules-job.jar ./tongran/modules/job/jar
echo "begin copy tongran-modules-gen "
cp ../tongran-modules/tongran-gen/target/tongran-modules-gen.jar ./tongran/modules/gen/jar
-67
View File
@@ -1,67 +0,0 @@
#!/bin/sh
# 使用说明,用来提示输入参数
usage() {
echo "Usage: sh 执行脚本.sh [port|base|modules|stop|rm]"
exit 1
}
# 开启所需端口
port(){
firewall-cmd --add-port=80/tcp --permanent
firewall-cmd --add-port=8080/tcp --permanent
firewall-cmd --add-port=8848/tcp --permanent
firewall-cmd --add-port=9848/tcp --permanent
firewall-cmd --add-port=9849/tcp --permanent
firewall-cmd --add-port=6379/tcp --permanent
firewall-cmd --add-port=3306/tcp --permanent
firewall-cmd --add-port=9100/tcp --permanent
firewall-cmd --add-port=9200/tcp --permanent
firewall-cmd --add-port=9201/tcp --permanent
firewall-cmd --add-port=9202/tcp --permanent
firewall-cmd --add-port=9203/tcp --permanent
firewall-cmd --add-port=9300/tcp --permanent
service firewalld restart
}
# 启动基础环境(必须)
base(){
docker-compose up -d tongran-mysql tongran-redis tongran-nacos
}
# 启动程序模块(必须)
modules(){
docker-compose up -d tongran-nginx tongran-gateway tongran-auth tongran-modules-system
}
# 关闭所有环境/模块
stop(){
docker-compose stop
}
# 删除所有环境/模块
rm(){
docker-compose rm
}
# 根据输入参数,选择执行对应方法,不输入则执行使用说明
case "$1" in
"port")
port
;;
"base")
base
;;
"modules")
modules
;;
"stop")
stop
;;
"rm")
rm
;;
*)
usage
;;
esac
-140
View File
@@ -1,140 +0,0 @@
version : '3.8'
services:
tongran-nacos:
container_name: tongran-nacos
image: nacos/nacos-server
build:
context: ./nacos
environment:
- MODE=standalone
volumes:
- ./nacos/logs/:/home/nacos/logs
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
ports:
- "8848:8848"
- "9848:9848"
- "9849:9849"
depends_on:
- tongran-mysql
tongran-mysql:
container_name: tongran-mysql
image: mysql:5.7
build:
context: ./mysql
ports:
- "3306:3306"
volumes:
- ./mysql/conf:/etc/mysql/conf.d
- ./mysql/logs:/logs
- ./mysql/data:/var/lib/mysql
command: [
'mysqld',
'--innodb-buffer-pool-size=80M',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_unicode_ci',
'--default-time-zone=+8:00',
'--lower-case-table-names=1'
]
environment:
MYSQL_DATABASE: 'ry-cloud'
MYSQL_ROOT_PASSWORD: password
tongran-redis:
container_name: tongran-redis
image: redis
build:
context: ./redis
ports:
- "6379:6379"
volumes:
- ./redis/conf/redis.conf:/home/tongran/redis/redis.conf
- ./redis/data:/data
command: redis-server /home/tongran/redis/redis.conf
tongran-nginx:
container_name: tongran-nginx
image: nginx
build:
context: ./nginx
ports:
- "80:80"
volumes:
- ./nginx/html/dist:/home/tongran/projects/tongran-ui
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/logs:/var/log/nginx
- ./nginx/conf.d:/etc/nginx/conf.d
depends_on:
- tongran-gateway
links:
- tongran-gateway
tongran-gateway:
container_name: tongran-gateway
build:
context: ./tongran/gateway
dockerfile: dockerfile
ports:
- "8080:8080"
depends_on:
- tongran-redis
links:
- tongran-redis
tongran-auth:
container_name: tongran-auth
build:
context: ./tongran/auth
dockerfile: dockerfile
ports:
- "9200:9200"
depends_on:
- tongran-redis
links:
- tongran-redis
tongran-modules-system:
container_name: tongran-modules-system
build:
context: ./tongran/modules/system
dockerfile: dockerfile
ports:
- "9201:9201"
depends_on:
- tongran-redis
- tongran-mysql
links:
- tongran-redis
- tongran-mysql
tongran-modules-gen:
container_name: tongran-modules-gen
build:
context: ./tongran/modules/gen
dockerfile: dockerfile
ports:
- "9202:9202"
depends_on:
- tongran-mysql
links:
- tongran-mysql
tongran-modules-job:
container_name: tongran-modules-job
build:
context: ./tongran/modules/job
dockerfile: dockerfile
ports:
- "9203:9203"
depends_on:
- tongran-mysql
links:
- tongran-mysql
tongran-modules-file:
container_name: tongran-modules-file
build:
context: ./tongran/modules/file
dockerfile: dockerfile
ports:
- "9300:9300"
volumes:
- ./tongran/uploadPath:/home/tongran/uploadPath
tongran-visual-monitor:
container_name: tongran-visual-monitor
build:
context: ./tongran/visual/monitor
dockerfile: dockerfile
ports:
- "9100:9100"
-1
View File
@@ -1 +0,0 @@
存放sql目录下的所有脚本,用于docker自动执行。
-7
View File
@@ -1,7 +0,0 @@
# 基础镜像
FROM mysql:5.7
# author
MAINTAINER tongran
# 执行sql脚本
ADD ./db/*.sql /docker-entrypoint-initdb.d/
-32
View File
@@ -1,32 +0,0 @@
spring.datasource.platform=mysql
db.num=1
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.password=123456
nacos.naming.empty-service.auto-clean=true
nacos.naming.empty-service.clean.initial-delay-ms=50000
nacos.naming.empty-service.clean.period-time-ms=30000
management.endpoints.web.exposure.include=*
management.metrics.export.elastic.enabled=false
management.metrics.export.influx.enabled=false
server.tomcat.accesslog.enabled=true
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
server.tomcat.basedir=/home/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.core.auth.system.type=nacos
nacos.core.auth.enabled=false
nacos.core.auth.default.token.expire.seconds=18000
nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
nacos.core.auth.caching.enabled=true
nacos.core.auth.enable.userAgentAuthWhite=false
nacos.core.auth.server.identity.key=serverIdentity
nacos.core.auth.server.identity.value=security
nacos.istio.mcp.server.enabled=false
-7
View File
@@ -1,7 +0,0 @@
# 基础镜像
FROM nacos/nacos-server
# author
MAINTAINER tongran
# 复制conf文件到路径
COPY ./conf/application.properties /home/nacos/conf/application.properties
-41
View File
@@ -1,41 +0,0 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /home/tongran/projects/tongran-ui;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
location /prod-api/{
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://tongran-gateway:8080/;
}
# 避免actuator暴露
if ($uri ~ "/actuator") {
return 403;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
-15
View File
@@ -1,15 +0,0 @@
# 基础镜像
FROM nginx
# author
MAINTAINER tongran
# 挂载目录
VOLUME /home/tongran/projects/tongran-ui
# 创建目录
RUN mkdir -p /home/tongran/projects/tongran-ui
# 指定路径
WORKDIR /home/tongran/projects/tongran-ui
# 复制conf文件到路径
COPY ./conf/nginx.conf /etc/nginx/nginx.conf
# 复制html文件到路径
COPY ./html/dist /home/tongran/projects/tongran-ui
-1
View File
@@ -1 +0,0 @@
# requirepass 123456
-13
View File
@@ -1,13 +0,0 @@
# 基础镜像
FROM redis
# author
MAINTAINER tongran
# 挂载目录
VOLUME /home/tongran/redis
# 创建目录
RUN mkdir -p /home/tongran/redis
# 指定路径
WORKDIR /home/tongran/redis
# 复制conf文件到路径
COPY ./conf/redis.conf /home/tongran/redis/redis.conf
-15
View File
@@ -1,15 +0,0 @@
# 基础镜像
FROM openjdk:8-jre
# author
MAINTAINER tongran
# 挂载目录
VOLUME /home/tongran
# 创建目录
RUN mkdir -p /home/tongran
# 指定路径
WORKDIR /home/tongran
# 复制jar文件到路径
COPY ./jar/tongran-auth.jar /home/tongran/tongran-auth.jar
# 启动认证服务
ENTRYPOINT ["java","-jar","tongran-auth.jar"]
-1
View File
@@ -1 +0,0 @@
存放认证中心打包好的jar文件,用于docker启动应用。
-15
View File
@@ -1,15 +0,0 @@
# 基础镜像
FROM openjdk:8-jre
# author
MAINTAINER tongran
# 挂载目录
VOLUME /home/tongran
# 创建目录
RUN mkdir -p /home/tongran
# 指定路径
WORKDIR /home/tongran
# 复制jar文件到路径
COPY ./jar/tongran-gateway.jar /home/tongran/tongran-gateway.jar
# 启动网关服务
ENTRYPOINT ["java","-jar","tongran-gateway.jar"]
-1
View File
@@ -1 +0,0 @@
存放网关模块打包好的jar文件,用于docker启动应用。
-15
View File
@@ -1,15 +0,0 @@
# 基础镜像
FROM openjdk:8-jre
# author
MAINTAINER tongran
# 挂载目录
VOLUME /home/tongran
# 创建目录
RUN mkdir -p /home/tongran
# 指定路径
WORKDIR /home/tongran
# 复制jar文件到路径
COPY ./jar/tongran-modules-file.jar /home/tongran/tongran-modules-file.jar
# 启动文件服务
ENTRYPOINT ["java","-jar","tongran-modules-file.jar"]
-1
View File
@@ -1 +0,0 @@
存放文件服务打包好的jar文件,用于docker启动应用。
-15
View File
@@ -1,15 +0,0 @@
# 基础镜像
FROM openjdk:8-jre
# author
MAINTAINER tongran
# 挂载目录
VOLUME /home/tongran
# 创建目录
RUN mkdir -p /home/tongran
# 指定路径
WORKDIR /home/tongran
# 复制jar文件到路径
COPY ./jar/tongran-modules-gen.jar /home/tongran/tongran-modules-gen.jar
# 启动代码生成服务
ENTRYPOINT ["java","-jar","tongran-modules-gen.jar"]
-1
View File
@@ -1 +0,0 @@
存放代码生成打包好的jar文件,用于docker启动应用。
-15
View File
@@ -1,15 +0,0 @@
# 基础镜像
FROM openjdk:8-jre
# author
MAINTAINER tongran
# 挂载目录
VOLUME /home/tongran
# 创建目录
RUN mkdir -p /home/tongran
# 指定路径
WORKDIR /home/tongran
# 复制jar文件到路径
COPY ./jar/tongran-modules-job.jar /home/tongran/tongran-modules-job.jar
# 启动定时任务服务
ENTRYPOINT ["java","-jar","tongran-modules-job.jar"]
-1
View File
@@ -1 +0,0 @@
存放定时任务打包好的jar文件,用于docker启动应用。
-15
View File
@@ -1,15 +0,0 @@
# 基础镜像
FROM openjdk:8-jre
# author
MAINTAINER tongran
# 挂载目录
VOLUME /home/tongran
# 创建目录
RUN mkdir -p /home/tongran
# 指定路径
WORKDIR /home/tongran
# 复制jar文件到路径
COPY ./jar/tongran-modules-system.jar /home/tongran/tongran-modules-system.jar
# 启动系统服务
ENTRYPOINT ["java","-jar","tongran-modules-system.jar"]
@@ -1 +0,0 @@
存放系统模块打包好的jar文件,用于docker启动应用。
-15
View File
@@ -1,15 +0,0 @@
# 基础镜像
FROM openjdk:8-jre
# author
MAINTAINER tongran
# 挂载目录
VOLUME /home/tongran
# 创建目录
RUN mkdir -p /home/tongran
# 指定路径
WORKDIR /home/tongran
# 复制jar文件到路径
COPY ./jar/tongran-visual-monitor.jar /home/tongran/tongran-visual-monitor.jar
# 启动系统服务
ENTRYPOINT ["java","-jar","tongran-visual-monitor.jar"]
@@ -1 +0,0 @@
存放监控中心打包好的jar文件,用于docker启动应用。
-174
View File
@@ -1,174 +0,0 @@
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
DROP TABLE IF EXISTS QRTZ_LOCKS;
DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_TRIGGERS;
DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
DROP TABLE IF EXISTS QRTZ_CALENDARS;
-- ----------------------------
-- 1、存储每一个已配置的 jobDetail 的详细信息
-- ----------------------------
create table QRTZ_JOB_DETAILS (
sched_name varchar(120) not null comment '调度名称',
job_name varchar(200) not null comment '任务名称',
job_group varchar(200) not null comment '任务组名',
description varchar(250) null comment '相关介绍',
job_class_name varchar(250) not null comment '执行任务类名称',
is_durable varchar(1) not null comment '是否持久化',
is_nonconcurrent varchar(1) not null comment '是否并发',
is_update_data varchar(1) not null comment '是否更新数据',
requests_recovery varchar(1) not null comment '是否接受恢复执行',
job_data blob null comment '存放持久化job对象',
primary key (sched_name, job_name, job_group)
) engine=innodb comment = '任务详细信息表';
-- ----------------------------
-- 2、 存储已配置的 Trigger 的信息
-- ----------------------------
create table QRTZ_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment '触发器的名字',
trigger_group varchar(200) not null comment '触发器所属组的名字',
job_name varchar(200) not null comment 'qrtz_job_details表job_name的外键',
job_group varchar(200) not null comment 'qrtz_job_details表job_group的外键',
description varchar(250) null comment '相关介绍',
next_fire_time bigint(13) null comment '上一次触发时间(毫秒)',
prev_fire_time bigint(13) null comment '下一次触发时间(默认为-1表示不触发)',
priority integer null comment '优先级',
trigger_state varchar(16) not null comment '触发器状态',
trigger_type varchar(8) not null comment '触发器的类型',
start_time bigint(13) not null comment '开始时间',
end_time bigint(13) null comment '结束时间',
calendar_name varchar(200) null comment '日程表名称',
misfire_instr smallint(2) null comment '补偿执行的策略',
job_data blob null comment '存放持久化job对象',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, job_name, job_group) references QRTZ_JOB_DETAILS(sched_name, job_name, job_group)
) engine=innodb comment = '触发器详细信息表';
-- ----------------------------
-- 3、 存储简单的 Trigger,包括重复次数,间隔,以及已触发的次数
-- ----------------------------
create table QRTZ_SIMPLE_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
repeat_count bigint(7) not null comment '重复的次数统计',
repeat_interval bigint(12) not null comment '重复的间隔时间',
times_triggered bigint(10) not null comment '已经触发的次数',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = '简单触发器的信息表';
-- ----------------------------
-- 4、 存储 Cron Trigger,包括 Cron 表达式和时区信息
-- ----------------------------
create table QRTZ_CRON_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
cron_expression varchar(200) not null comment 'cron表达式',
time_zone_id varchar(80) comment '时区',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = 'Cron类型的触发器表';
-- ----------------------------
-- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型,JobStore 并不知道如何存储实例的时候)
-- ----------------------------
create table QRTZ_BLOB_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
blob_data blob null comment '存放持久化Trigger对象',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = 'Blob类型的触发器表';
-- ----------------------------
-- 6、 以 Blob 类型存储存放日历信息, quartz可配置一个日历来指定一个时间范围
-- ----------------------------
create table QRTZ_CALENDARS (
sched_name varchar(120) not null comment '调度名称',
calendar_name varchar(200) not null comment '日历名称',
calendar blob not null comment '存放持久化calendar对象',
primary key (sched_name, calendar_name)
) engine=innodb comment = '日历信息表';
-- ----------------------------
-- 7、 存储已暂停的 Trigger 组的信息
-- ----------------------------
create table QRTZ_PAUSED_TRIGGER_GRPS (
sched_name varchar(120) not null comment '调度名称',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
primary key (sched_name, trigger_group)
) engine=innodb comment = '暂停的触发器表';
-- ----------------------------
-- 8、 存储与已触发的 Trigger 相关的状态信息,以及相联 Job 的执行信息
-- ----------------------------
create table QRTZ_FIRED_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
entry_id varchar(95) not null comment '调度器实例id',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
instance_name varchar(200) not null comment '调度器实例名',
fired_time bigint(13) not null comment '触发的时间',
sched_time bigint(13) not null comment '定时器制定的时间',
priority integer not null comment '优先级',
state varchar(16) not null comment '状态',
job_name varchar(200) null comment '任务名称',
job_group varchar(200) null comment '任务组名',
is_nonconcurrent varchar(1) null comment '是否并发',
requests_recovery varchar(1) null comment '是否接受恢复执行',
primary key (sched_name, entry_id)
) engine=innodb comment = '已触发的触发器表';
-- ----------------------------
-- 9、 存储少量的有关 Scheduler 的状态信息,假如是用于集群中,可以看到其他的 Scheduler 实例
-- ----------------------------
create table QRTZ_SCHEDULER_STATE (
sched_name varchar(120) not null comment '调度名称',
instance_name varchar(200) not null comment '实例名称',
last_checkin_time bigint(13) not null comment '上次检查时间',
checkin_interval bigint(13) not null comment '检查间隔时间',
primary key (sched_name, instance_name)
) engine=innodb comment = '调度器状态表';
-- ----------------------------
-- 10、 存储程序的悲观锁的信息(假如使用了悲观锁)
-- ----------------------------
create table QRTZ_LOCKS (
sched_name varchar(120) not null comment '调度名称',
lock_name varchar(40) not null comment '悲观锁名称',
primary key (sched_name, lock_name)
) engine=innodb comment = '存储的悲观锁信息表';
-- ----------------------------
-- 11、 Quartz集群实现同步机制的行锁表
-- ----------------------------
create table QRTZ_SIMPROP_TRIGGERS (
sched_name varchar(120) not null comment '调度名称',
trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键',
trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键',
str_prop_1 varchar(512) null comment 'String类型的trigger的第一个参数',
str_prop_2 varchar(512) null comment 'String类型的trigger的第二个参数',
str_prop_3 varchar(512) null comment 'String类型的trigger的第三个参数',
int_prop_1 int null comment 'int类型的trigger的第一个参数',
int_prop_2 int null comment 'int类型的trigger的第二个参数',
long_prop_1 bigint null comment 'long类型的trigger的第一个参数',
long_prop_2 bigint null comment 'long类型的trigger的第二个参数',
dec_prop_1 numeric(13,4) null comment 'decimal类型的trigger的第一个参数',
dec_prop_2 numeric(13,4) null comment 'decimal类型的trigger的第二个参数',
bool_prop_1 varchar(1) null comment 'Boolean类型的trigger的第一个参数',
bool_prop_2 varchar(1) null comment 'Boolean类型的trigger的第二个参数',
primary key (sched_name, trigger_name, trigger_group),
foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
) engine=innodb comment = '同步机制的行锁表';
commit;
-700
View File
@@ -1,700 +0,0 @@
SET NAMES utf8mb4;
-- ----------------------------
-- 1、部门表
-- ----------------------------
drop table if exists sys_dept;
create table sys_dept (
dept_id bigint(20) not null auto_increment comment '部门id',
parent_id bigint(20) default 0 comment '父部门id',
ancestors varchar(50) default '' comment '祖级列表',
dept_name varchar(30) default '' comment '部门名称',
order_num int(4) default 0 comment '显示顺序',
leader varchar(20) default null comment '负责人',
phone varchar(11) default null comment '联系电话',
email varchar(50) default null comment '邮箱',
status char(1) default '0' comment '部门状态(0正常 1停用)',
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
primary key (dept_id)
) engine=innodb auto_increment=200 comment = '部门表';
-- ----------------------------
-- 初始化-部门表数据
-- ----------------------------
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(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(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(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(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);
-- ----------------------------
-- 2、用户信息表
-- ----------------------------
drop table if exists sys_user;
create table sys_user (
user_id bigint(20) not null auto_increment comment '用户ID',
dept_id bigint(20) default null comment '部门ID',
user_name varchar(30) not null comment '用户账号',
nick_name varchar(30) not null comment '用户昵称',
user_type varchar(2) default '00' comment '用户类型(00系统用户)',
email varchar(50) default '' comment '用户邮箱',
phonenumber varchar(11) default '' comment '手机号码',
sex char(1) default '0' comment '用户性别(0男 1女 2未知)',
avatar varchar(100) default '' comment '头像地址',
password varchar(100) default '' comment '密码',
status char(1) default '0' comment '账号状态(0正常 1停用)',
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
login_ip varchar(128) default '' comment '最后登录IP',
login_date datetime comment '最后登录时间',
pwd_update_date datetime comment '密码最后更新时间',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (user_id)
) engine=innodb auto_increment=100 comment = '用户信息表';
-- ----------------------------
-- 初始化-用户信息表数据
-- ----------------------------
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, '测试员');
-- ----------------------------
-- 3、岗位信息表
-- ----------------------------
drop table if exists sys_post;
create table sys_post
(
post_id bigint(20) not null auto_increment comment '岗位ID',
post_code varchar(64) not null comment '岗位编码',
post_name varchar(50) not null comment '岗位名称',
post_sort int(4) not null comment '显示顺序',
status char(1) not null comment '状态(0正常 1停用)',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (post_id)
) engine=innodb comment = '岗位信息表';
-- ----------------------------
-- 初始化-岗位信息表数据
-- ----------------------------
insert into sys_post values(1, 'ceo', '董事长', 1, '0', 'admin', sysdate(), '', null, '');
insert into sys_post values(2, 'se', '项目经理', 2, '0', 'admin', sysdate(), '', null, '');
insert into sys_post values(3, 'hr', '人力资源', 3, '0', 'admin', sysdate(), '', null, '');
insert into sys_post values(4, 'user', '普通员工', 4, '0', 'admin', sysdate(), '', null, '');
-- ----------------------------
-- 4、角色信息表
-- ----------------------------
drop table if exists sys_role;
create table sys_role (
role_id bigint(20) not null auto_increment comment '角色ID',
role_name varchar(30) not null comment '角色名称',
role_key varchar(100) not null comment '角色权限字符串',
role_sort int(4) not null comment '显示顺序',
data_scope char(1) default '1' comment '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)',
menu_check_strictly tinyint(1) default 1 comment '菜单树选择项是否关联显示',
dept_check_strictly tinyint(1) default 1 comment '部门树选择项是否关联显示',
status char(1) not null comment '角色状态(0正常 1停用)',
del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (role_id)
) engine=innodb auto_increment=100 comment = '角色信息表';
-- ----------------------------
-- 初始化-角色信息表数据
-- ----------------------------
insert into sys_role values('1', '超级管理员', 'admin', 1, 1, 1, 1, '0', '0', 'admin', sysdate(), '', null, '超级管理员');
insert into sys_role values('2', '普通角色', 'common', 2, 2, 1, 1, '0', '0', 'admin', sysdate(), '', null, '普通角色');
-- ----------------------------
-- 5、菜单权限表
-- ----------------------------
drop table if exists sys_menu;
create table sys_menu (
menu_id bigint(20) not null auto_increment comment '菜单ID',
menu_name varchar(50) not null comment '菜单名称',
parent_id bigint(20) default 0 comment '父菜单ID',
order_num int(4) default 0 comment '显示顺序',
path varchar(200) default '' comment '路由地址',
component varchar(255) default null comment '组件路径',
query varchar(255) default null comment '路由参数',
route_name varchar(50) default '' comment '路由名称',
is_frame int(1) default 1 comment '是否为外链(0是 1否)',
is_cache int(1) default 0 comment '是否缓存(0缓存 1不缓存)',
menu_type char(1) default '' comment '菜单类型(M目录 C菜单 F按钮)',
visible char(1) default 0 comment '菜单状态(0显示 1隐藏)',
status char(1) default 0 comment '菜单状态(0正常 1停用)',
perms varchar(100) default null comment '权限标识',
icon varchar(100) default '#' comment '菜单图标',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default '' comment '备注',
primary key (menu_id)
) engine=innodb auto_increment=2000 comment = '菜单权限表';
-- ----------------------------
-- 初始化-菜单信息表数据
-- ----------------------------
-- 一级菜单
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('3', '系统工具', '0', '3', 'tool', null, '', '', 1, 0, 'M', '0', '0', '', 'tool', '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('101', '角色管理', '1', '2', 'role', 'system/role/index', '', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '角色管理菜单');
insert into sys_menu values('102', '菜单管理', '1', '3', 'menu', 'system/menu/index', '', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 'admin', sysdate(), '', null, '菜单管理菜单');
insert into sys_menu values('103', '部门管理', '1', '4', 'dept', 'system/dept/index', '', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 'admin', sysdate(), '', null, '部门管理菜单');
insert into sys_menu values('104', '岗位管理', '1', '5', 'post', 'system/post/index', '', '', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 'admin', sysdate(), '', null, '岗位管理菜单');
insert into sys_menu values('105', '字典管理', '1', '6', 'dict', 'system/dict/index', '', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', sysdate(), '', null, '字典管理菜单');
insert into sys_menu values('106', '参数设置', '1', '7', 'config', 'system/config/index', '', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', sysdate(), '', null, '参数设置菜单');
insert into sys_menu values('107', '通知公告', '1', '8', 'notice', 'system/notice/index', '', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', sysdate(), '', null, '通知公告菜单');
insert into sys_menu values('108', '日志管理', '1', '9', 'log', '', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, '日志管理菜单');
insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate(), '', null, '在线用户菜单');
insert into sys_menu values('110', '定时任务', '2', '2', 'job', 'monitor/job/index', '', '', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', sysdate(), '', null, '定时任务菜单');
insert into sys_menu values('111', 'Sentinel控制台', '2', '3', 'http://localhost:8718', '', '', '', 0, 0, 'C', '0', '0', 'monitor:sentinel:list', 'sentinel', 'admin', sysdate(), '', null, '流量控制菜单');
insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', '', 0, 0, 'C', '0', '0', 'monitor:nacos:list', 'nacos', 'admin', sysdate(), '', null, '服务治理菜单');
insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', '', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', sysdate(), '', null, '服务监控菜单');
insert into sys_menu values('114', '表单构建', '3', '1', 'build', 'tool/build/index', '', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '表单构建菜单');
insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate(), '', null, '代码生成菜单');
insert into sys_menu values('116', '系统接口', '3', '3', 'http://localhost:8080/swagger-ui/index.html', '', '', '', 0, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', sysdate(), '', null, '系统接口菜单');
-- 三级菜单
insert into sys_menu values('500', '操作日志', '108', '1', 'operlog', 'system/operlog/index', '', '', 1, 0, 'C', '0', '0', 'system:operlog:list', 'form', 'admin', sysdate(), '', null, '操作日志菜单');
insert into sys_menu values('501', '登录日志', '108', '2', 'logininfor', 'system/logininfor/index', '', '', 1, 0, 'C', '0', '0', 'system:logininfor:list', 'logininfor', 'admin', sysdate(), '', null, '登录日志菜单');
-- 用户管理按钮
insert into sys_menu values('1000', '用户查询', '100', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1001', '用户新增', '100', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1002', '用户修改', '100', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1003', '用户删除', '100', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1004', '用户导出', '100', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1005', '用户导入', '100', '6', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1006', '重置密码', '100', '7', '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', sysdate(), '', null, '');
-- 角色管理按钮
insert into sys_menu values('1007', '角色查询', '101', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1008', '角色新增', '101', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1009', '角色修改', '101', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1010', '角色删除', '101', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1011', '角色导出', '101', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', sysdate(), '', null, '');
-- 菜单管理按钮
insert into sys_menu values('1012', '菜单查询', '102', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1013', '菜单新增', '102', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1014', '菜单修改', '102', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1015', '菜单删除', '102', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', sysdate(), '', null, '');
-- 部门管理按钮
insert into sys_menu values('1016', '部门查询', '103', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1017', '部门新增', '103', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1018', '部门修改', '103', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1019', '部门删除', '103', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', sysdate(), '', null, '');
-- 岗位管理按钮
insert into sys_menu values('1020', '岗位查询', '104', '1', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1021', '岗位新增', '104', '2', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1022', '岗位修改', '104', '3', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1023', '岗位删除', '104', '4', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1024', '岗位导出', '104', '5', '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', sysdate(), '', null, '');
-- 字典管理按钮
insert into sys_menu values('1025', '字典查询', '105', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1026', '字典新增', '105', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1027', '字典修改', '105', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1028', '字典删除', '105', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1029', '字典导出', '105', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', sysdate(), '', null, '');
-- 参数设置按钮
insert into sys_menu values('1030', '参数查询', '106', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1031', '参数新增', '106', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1032', '参数修改', '106', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1033', '参数删除', '106', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1034', '参数导出', '106', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 'admin', sysdate(), '', null, '');
-- 通知公告按钮
insert into sys_menu values('1035', '公告查询', '107', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1036', '公告新增', '107', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1037', '公告修改', '107', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1038', '公告删除', '107', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 'admin', sysdate(), '', null, '');
-- 操作日志按钮
insert into sys_menu values('1039', '操作查询', '500', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:operlog:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1040', '操作删除', '500', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:operlog:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1041', '日志导出', '500', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:operlog:export', '#', 'admin', sysdate(), '', null, '');
-- 登录日志按钮
insert into sys_menu values('1042', '登录查询', '501', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1043', '登录删除', '501', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1044', '日志导出', '501', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:export', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1045', '账户解锁', '501', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:unlock', '#', 'admin', sysdate(), '', null, '');
-- 在线用户按钮
insert into sys_menu values('1046', '在线查询', '109', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1047', '批量强退', '109', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1048', '单条强退', '109', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, '');
-- 定时任务按钮
insert into sys_menu values('1049', '任务查询', '110', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1050', '任务新增', '110', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1051', '任务修改', '110', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1052', '任务删除', '110', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1053', '状态修改', '110', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1054', '任务导出', '110', '6', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', sysdate(), '', null, '');
-- 代码生成按钮
insert into sys_menu values('1055', '生成查询', '115', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1056', '生成修改', '115', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1057', '生成删除', '115', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1058', '导入代码', '115', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1059', '预览代码', '115', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, '');
insert into sys_menu values('1060', '生成代码', '115', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, '');
-- ----------------------------
-- 6、用户和角色关联表 用户N-1角色
-- ----------------------------
drop table if exists sys_user_role;
create table sys_user_role (
user_id bigint(20) not null comment '用户ID',
role_id bigint(20) not null comment '角色ID',
primary key(user_id, role_id)
) engine=innodb comment = '用户和角色关联表';
-- ----------------------------
-- 初始化-用户和角色关联表数据
-- ----------------------------
insert into sys_user_role values ('1', '1');
insert into sys_user_role values ('2', '2');
-- ----------------------------
-- 7、角色和菜单关联表 角色1-N菜单
-- ----------------------------
drop table if exists sys_role_menu;
create table sys_role_menu (
role_id bigint(20) not null comment '角色ID',
menu_id bigint(20) not null comment '菜单ID',
primary key(role_id, menu_id)
) engine=innodb comment = '角色和菜单关联表';
-- ----------------------------
-- 初始化-角色和菜单关联表数据
-- ----------------------------
insert into sys_role_menu values ('2', '1');
insert into sys_role_menu values ('2', '2');
insert into sys_role_menu values ('2', '3');
insert into sys_role_menu values ('2', '4');
insert into sys_role_menu values ('2', '100');
insert into sys_role_menu values ('2', '101');
insert into sys_role_menu values ('2', '102');
insert into sys_role_menu values ('2', '103');
insert into sys_role_menu values ('2', '104');
insert into sys_role_menu values ('2', '105');
insert into sys_role_menu values ('2', '106');
insert into sys_role_menu values ('2', '107');
insert into sys_role_menu values ('2', '108');
insert into sys_role_menu values ('2', '109');
insert into sys_role_menu values ('2', '110');
insert into sys_role_menu values ('2', '111');
insert into sys_role_menu values ('2', '112');
insert into sys_role_menu values ('2', '113');
insert into sys_role_menu values ('2', '114');
insert into sys_role_menu values ('2', '115');
insert into sys_role_menu values ('2', '116');
insert into sys_role_menu values ('2', '500');
insert into sys_role_menu values ('2', '501');
insert into sys_role_menu values ('2', '1000');
insert into sys_role_menu values ('2', '1001');
insert into sys_role_menu values ('2', '1002');
insert into sys_role_menu values ('2', '1003');
insert into sys_role_menu values ('2', '1004');
insert into sys_role_menu values ('2', '1005');
insert into sys_role_menu values ('2', '1006');
insert into sys_role_menu values ('2', '1007');
insert into sys_role_menu values ('2', '1008');
insert into sys_role_menu values ('2', '1009');
insert into sys_role_menu values ('2', '1010');
insert into sys_role_menu values ('2', '1011');
insert into sys_role_menu values ('2', '1012');
insert into sys_role_menu values ('2', '1013');
insert into sys_role_menu values ('2', '1014');
insert into sys_role_menu values ('2', '1015');
insert into sys_role_menu values ('2', '1016');
insert into sys_role_menu values ('2', '1017');
insert into sys_role_menu values ('2', '1018');
insert into sys_role_menu values ('2', '1019');
insert into sys_role_menu values ('2', '1020');
insert into sys_role_menu values ('2', '1021');
insert into sys_role_menu values ('2', '1022');
insert into sys_role_menu values ('2', '1023');
insert into sys_role_menu values ('2', '1024');
insert into sys_role_menu values ('2', '1025');
insert into sys_role_menu values ('2', '1026');
insert into sys_role_menu values ('2', '1027');
insert into sys_role_menu values ('2', '1028');
insert into sys_role_menu values ('2', '1029');
insert into sys_role_menu values ('2', '1030');
insert into sys_role_menu values ('2', '1031');
insert into sys_role_menu values ('2', '1032');
insert into sys_role_menu values ('2', '1033');
insert into sys_role_menu values ('2', '1034');
insert into sys_role_menu values ('2', '1035');
insert into sys_role_menu values ('2', '1036');
insert into sys_role_menu values ('2', '1037');
insert into sys_role_menu values ('2', '1038');
insert into sys_role_menu values ('2', '1039');
insert into sys_role_menu values ('2', '1040');
insert into sys_role_menu values ('2', '1041');
insert into sys_role_menu values ('2', '1042');
insert into sys_role_menu values ('2', '1043');
insert into sys_role_menu values ('2', '1044');
insert into sys_role_menu values ('2', '1045');
insert into sys_role_menu values ('2', '1046');
insert into sys_role_menu values ('2', '1047');
insert into sys_role_menu values ('2', '1048');
insert into sys_role_menu values ('2', '1049');
insert into sys_role_menu values ('2', '1050');
insert into sys_role_menu values ('2', '1051');
insert into sys_role_menu values ('2', '1052');
insert into sys_role_menu values ('2', '1053');
insert into sys_role_menu values ('2', '1054');
insert into sys_role_menu values ('2', '1055');
insert into sys_role_menu values ('2', '1056');
insert into sys_role_menu values ('2', '1057');
insert into sys_role_menu values ('2', '1058');
insert into sys_role_menu values ('2', '1059');
insert into sys_role_menu values ('2', '1060');
-- ----------------------------
-- 8、角色和部门关联表 角色1-N部门
-- ----------------------------
drop table if exists sys_role_dept;
create table sys_role_dept (
role_id bigint(20) not null comment '角色ID',
dept_id bigint(20) not null comment '部门ID',
primary key(role_id, dept_id)
) engine=innodb comment = '角色和部门关联表';
-- ----------------------------
-- 初始化-角色和部门关联表数据
-- ----------------------------
insert into sys_role_dept values ('2', '100');
insert into sys_role_dept values ('2', '101');
insert into sys_role_dept values ('2', '105');
-- ----------------------------
-- 9、用户与岗位关联表 用户1-N岗位
-- ----------------------------
drop table if exists sys_user_post;
create table sys_user_post
(
user_id bigint(20) not null comment '用户ID',
post_id bigint(20) not null comment '岗位ID',
primary key (user_id, post_id)
) engine=innodb comment = '用户与岗位关联表';
-- ----------------------------
-- 初始化-用户与岗位关联表数据
-- ----------------------------
insert into sys_user_post values ('1', '1');
insert into sys_user_post values ('2', '2');
-- ----------------------------
-- 10、操作日志记录
-- ----------------------------
drop table if exists sys_oper_log;
create table sys_oper_log (
oper_id bigint(20) not null auto_increment comment '日志主键',
title varchar(50) default '' comment '模块标题',
business_type int(2) default 0 comment '业务类型(0其它 1新增 2修改 3删除)',
method varchar(200) default '' comment '方法名称',
request_method varchar(10) default '' comment '请求方式',
operator_type int(1) default 0 comment '操作类别(0其它 1后台用户 2手机端用户)',
oper_name varchar(50) default '' comment '操作人员',
dept_name varchar(50) default '' comment '部门名称',
oper_url varchar(255) default '' comment '请求URL',
oper_ip varchar(128) default '' comment '主机地址',
oper_location varchar(255) default '' comment '操作地点',
oper_param varchar(2000) default '' comment '请求参数',
json_result varchar(2000) default '' comment '返回参数',
status int(1) default 0 comment '操作状态(0正常 1异常)',
error_msg varchar(2000) default '' comment '错误消息',
oper_time datetime comment '操作时间',
cost_time bigint(20) default 0 comment '消耗时间',
primary key (oper_id),
key idx_sys_oper_log_bt (business_type),
key idx_sys_oper_log_s (status),
key idx_sys_oper_log_ot (oper_time)
) engine=innodb auto_increment=100 comment = '操作日志记录';
-- ----------------------------
-- 11、字典类型表
-- ----------------------------
drop table if exists sys_dict_type;
create table sys_dict_type
(
dict_id bigint(20) not null auto_increment comment '字典主键',
dict_name varchar(100) default '' comment '字典名称',
dict_type varchar(100) default '' comment '字典类型',
status char(1) default '0' comment '状态(0正常 1停用)',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (dict_id),
unique (dict_type)
) engine=innodb auto_increment=100 comment = '字典类型表';
insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', sysdate(), '', null, '用户性别列表');
insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', sysdate(), '', null, '菜单状态列表');
insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', '0', 'admin', sysdate(), '', null, '系统开关列表');
insert into sys_dict_type values(4, '任务状态', 'sys_job_status', '0', 'admin', sysdate(), '', null, '任务状态列表');
insert into sys_dict_type values(5, '任务分组', 'sys_job_group', '0', 'admin', sysdate(), '', null, '任务分组列表');
insert into sys_dict_type values(6, '系统是否', 'sys_yes_no', '0', 'admin', sysdate(), '', null, '系统是否列表');
insert into sys_dict_type values(7, '通知类型', 'sys_notice_type', '0', 'admin', sysdate(), '', null, '通知类型列表');
insert into sys_dict_type values(8, '通知状态', 'sys_notice_status', '0', 'admin', sysdate(), '', null, '通知状态列表');
insert into sys_dict_type values(9, '操作类型', 'sys_oper_type', '0', 'admin', sysdate(), '', null, '操作类型列表');
insert into sys_dict_type values(10, '系统状态', 'sys_common_status', '0', 'admin', sysdate(), '', null, '登录状态列表');
-- ----------------------------
-- 12、字典数据表
-- ----------------------------
drop table if exists sys_dict_data;
create table sys_dict_data
(
dict_code bigint(20) not null auto_increment comment '字典编码',
dict_sort int(4) default 0 comment '字典排序',
dict_label varchar(100) default '' comment '字典标签',
dict_value varchar(100) default '' comment '字典键值',
dict_type varchar(100) default '' comment '字典类型',
css_class varchar(100) default null comment '样式属性(其他样式扩展)',
list_class varchar(100) default null comment '表格回显样式',
is_default char(1) default 'N' comment '是否默认(Y是 N否)',
status char(1) default '0' comment '状态(0正常 1停用)',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (dict_code)
) engine=innodb auto_increment=100 comment = '字典数据表';
insert into sys_dict_data values(1, 1, '', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', sysdate(), '', null, '性别男');
insert into sys_dict_data values(2, 2, '', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别女');
insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别未知');
insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '显示菜单');
insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '隐藏菜单');
insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态');
insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态');
insert into sys_dict_data values(10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', sysdate(), '', null, '默认分组');
insert into sys_dict_data values(11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', sysdate(), '', null, '系统分组');
insert into sys_dict_data values(12, 1, '', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '系统默认是');
insert into sys_dict_data values(13, 2, '', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '系统默认否');
insert into sys_dict_data values(14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', sysdate(), '', null, '通知');
insert into sys_dict_data values(15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', sysdate(), '', null, '公告');
insert into sys_dict_data values(16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
insert into sys_dict_data values(17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '关闭状态');
insert into sys_dict_data values(18, 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '其他操作');
insert into sys_dict_data values(19, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '新增操作');
insert into sys_dict_data values(20, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '修改操作');
insert into sys_dict_data values(21, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '删除操作');
insert into sys_dict_data values(22, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '授权操作');
insert into sys_dict_data values(23, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导出操作');
insert into sys_dict_data values(24, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导入操作');
insert into sys_dict_data values(25, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '强退操作');
insert into sys_dict_data values(26, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '生成操作');
insert into sys_dict_data values(27, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '清空操作');
insert into sys_dict_data values(28, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '正常状态');
insert into sys_dict_data values(29, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态');
-- ----------------------------
-- 13、参数配置表
-- ----------------------------
drop table if exists sys_config;
create table sys_config (
config_id int(5) not null auto_increment comment '参数主键',
config_name varchar(100) default '' comment '参数名称',
config_key varchar(100) default '' comment '参数键名',
config_value varchar(500) default '' comment '参数键值',
config_type char(1) default 'N' comment '系统内置(Y是 N否)',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (config_id)
) engine=innodb auto_increment=100 comment = '参数配置表';
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate(), '', null, '初始化密码 123456' );
insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', sysdate(), '', null, '深色主题theme-dark,浅色主题theme-light' );
insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', sysdate(), '', null, '是否开启注册用户功能(true开启,false关闭)');
insert into sys_config values(5, '用户登录-黑名单列表', 'sys.login.blackIPList', '', 'Y', 'admin', sysdate(), '', null, '设置登录IP黑名单限制,多个匹配项以;分隔,支持匹配(*通配、网段)');
insert into sys_config values(6, '用户管理-初始密码修改策略', 'sys.account.initPasswordModify', '1', 'Y', 'admin', sysdate(), '', null, '0:初始密码修改策略关闭,没有任何提示,1:提醒用户,如果未修改初始密码,则在登录时就会提醒修改密码对话框');
insert into sys_config values(7, '用户管理-账号密码更新周期', 'sys.account.passwordValidateDays', '0', 'Y', 'admin', sysdate(), '', null, '密码更新周期(填写数字,数据初始化值为0不限制,若修改必须为大于0小于365的正整数),如果超过这个周期登录系统时,则在登录时就会提醒修改密码对话框');
-- ----------------------------
-- 14、系统访问记录
-- ----------------------------
drop table if exists sys_logininfor;
create table sys_logininfor (
info_id bigint(20) not null auto_increment comment '访问ID',
user_name varchar(50) default '' comment '用户账号',
ipaddr varchar(128) default '' comment '登录IP地址',
status char(1) default '0' comment '登录状态(0成功 1失败)',
msg varchar(255) default '' comment '提示信息',
access_time datetime comment '访问时间',
primary key (info_id),
key idx_sys_logininfor_s (status),
key idx_sys_logininfor_lt (access_time)
) engine=innodb auto_increment=100 comment = '系统访问记录';
-- ----------------------------
-- 15、定时任务调度表
-- ----------------------------
drop table if exists sys_job;
create table sys_job (
job_id bigint(20) not null auto_increment comment '任务ID',
job_name varchar(64) default '' comment '任务名称',
job_group varchar(64) default 'DEFAULT' comment '任务组名',
invoke_target varchar(500) not null comment '调用目标字符串',
cron_expression varchar(255) default '' comment 'cron执行表达式',
misfire_policy varchar(20) default '3' comment '计划执行错误策略(1立即执行 2执行一次 3放弃执行)',
concurrent char(1) default '1' comment '是否并发执行(0允许 1禁止)',
status char(1) default '0' comment '状态(0正常 1暂停)',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default '' comment '备注信息',
primary key (job_id, job_name, job_group)
) engine=innodb auto_increment=100 comment = '定时任务调度表';
insert into sys_job values(1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
insert into sys_job values(2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
insert into sys_job values(3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
-- ----------------------------
-- 16、定时任务调度日志表
-- ----------------------------
drop table if exists sys_job_log;
create table sys_job_log (
job_log_id bigint(20) not null auto_increment comment '任务日志ID',
job_name varchar(64) not null comment '任务名称',
job_group varchar(64) not null comment '任务组名',
invoke_target varchar(500) not null comment '调用目标字符串',
job_message varchar(500) comment '日志信息',
status char(1) default '0' comment '执行状态(0正常 1失败)',
exception_info varchar(2000) default '' comment '异常信息',
create_time datetime comment '创建时间',
primary key (job_log_id)
) engine=innodb comment = '定时任务调度日志表';
-- ----------------------------
-- 17、通知公告表
-- ----------------------------
drop table if exists sys_notice;
create table sys_notice (
notice_id int(4) not null auto_increment comment '公告ID',
notice_title varchar(50) not null comment '公告标题',
notice_type char(1) not null comment '公告类型(1通知 2公告)',
notice_content longblob default null comment '公告内容',
status char(1) default '0' comment '公告状态(0正常 1关闭)',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(255) default null comment '备注',
primary key (notice_id)
) engine=innodb auto_increment=10 comment = '通知公告表';
-- ----------------------------
-- 初始化-公告信息表数据
-- ----------------------------
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, '管理员');
-- ----------------------------
-- 18、代码生成业务表
-- ----------------------------
drop table if exists gen_table;
create table gen_table (
table_id bigint(20) not null auto_increment comment '编号',
table_name varchar(200) default '' comment '表名称',
table_comment varchar(500) default '' comment '表描述',
sub_table_name varchar(64) default null comment '关联子表的表名',
sub_table_fk_name varchar(64) default null comment '子表关联的外键名',
class_name varchar(100) default '' comment '实体类名称',
tpl_category varchar(200) default 'crud' comment '使用的模板(crud单表操作 tree树表操作)',
tpl_web_type varchar(30) default '' comment '前端模板类型(element-ui模版 element-plus模版)',
package_name varchar(100) comment '生成包路径',
module_name varchar(30) comment '生成模块名',
business_name varchar(30) comment '生成业务名',
function_name varchar(50) comment '生成功能名',
function_author varchar(50) comment '生成功能作者',
gen_type char(1) default '0' comment '生成代码方式(0zip压缩包 1自定义路径)',
gen_path varchar(200) default '/' comment '生成路径(不填默认项目路径)',
options varchar(1000) comment '其它生成选项',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(500) default null comment '备注',
primary key (table_id)
) engine=innodb auto_increment=1 comment = '代码生成业务表';
-- ----------------------------
-- 19、代码生成业务表字段
-- ----------------------------
drop table if exists gen_table_column;
create table gen_table_column (
column_id bigint(20) not null auto_increment comment '编号',
table_id bigint(20) comment '归属表编号',
column_name varchar(200) comment '列名称',
column_comment varchar(500) comment '列描述',
column_type varchar(100) comment '列类型',
java_type varchar(500) comment 'JAVA类型',
java_field varchar(200) comment 'JAVA字段名',
is_pk char(1) comment '是否主键(1是)',
is_increment char(1) comment '是否自增(1是)',
is_required char(1) comment '是否必填(1是)',
is_insert char(1) comment '是否为插入字段(1是)',
is_edit char(1) comment '是否编辑字段(1是)',
is_list char(1) comment '是否列表字段(1是)',
is_query char(1) comment '是否查询字段(1是)',
query_type varchar(200) default 'EQ' comment '查询方式(等于、不等于、大于、小于、范围)',
html_type varchar(200) comment '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)',
dict_type varchar(200) default '' comment '字典类型',
sort int comment '排序',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
primary key (column_id)
) engine=innodb auto_increment=1 comment = '代码生成业务表字段';
-247
View File
@@ -1,247 +0,0 @@
DROP DATABASE IF EXISTS `ry-config`;
CREATE DATABASE `ry-config` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
USE `ry-config`;
/******************************************/
/* 表名称 = config_info */
/******************************************/
CREATE TABLE `config_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
`group_id` varchar(128) DEFAULT NULL COMMENT 'group_id',
`content` longtext NOT NULL COMMENT 'content',
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`src_user` text COMMENT 'source user',
`src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
`app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
`tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
`c_desc` varchar(256) DEFAULT NULL COMMENT 'configuration description',
`c_use` varchar(64) DEFAULT NULL COMMENT 'configuration usage',
`effect` varchar(64) DEFAULT NULL COMMENT '配置生效的描述',
`type` varchar(64) DEFAULT NULL COMMENT '配置的类型',
`c_schema` text COMMENT '配置的模式',
`encrypted_data_key` varchar(1024) NOT NULL DEFAULT '' COMMENT '密钥',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='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
(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,'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,'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,'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,'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,'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,'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,'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-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,'');
/******************************************/
/* 表名称 = config_info_aggr */
/******************************************/
CREATE TABLE `config_info_aggr` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
`group_id` varchar(255) NOT NULL COMMENT 'group_id',
`datum_id` varchar(255) NOT NULL COMMENT 'datum_id',
`content` longtext NOT NULL COMMENT '内容',
`gmt_modified` datetime NOT NULL COMMENT '修改时间',
`app_name` varchar(128) DEFAULT NULL,
`tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';
/******************************************/
/* 表名称 = config_info since 2.5.0 */
/******************************************/
CREATE TABLE `config_info_gray` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
`content` longtext NOT NULL COMMENT 'content',
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
`src_user` text COMMENT 'src_user',
`src_ip` varchar(100) DEFAULT NULL COMMENT 'src_ip',
`gmt_create` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'gmt_create',
`gmt_modified` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT 'gmt_modified',
`app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
`tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
`gray_name` varchar(128) NOT NULL COMMENT 'gray_name',
`gray_rule` text NOT NULL COMMENT 'gray_rule',
`encrypted_data_key` varchar(256) NOT NULL DEFAULT '' COMMENT 'encrypted_data_key',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_configinfogray_datagrouptenantgray` (`data_id`,`group_id`,`tenant_id`,`gray_name`),
KEY `idx_dataid_gmt_modified` (`data_id`,`gmt_modified`),
KEY `idx_gmt_modified` (`gmt_modified`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='config_info_gray';
/******************************************/
/* 表名称 = config_info_beta */
/******************************************/
CREATE TABLE `config_info_beta` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
`app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
`content` longtext NOT NULL COMMENT 'content',
`beta_ips` varchar(1024) DEFAULT NULL COMMENT 'betaIps',
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`src_user` text COMMENT 'source user',
`src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
`tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
`encrypted_data_key` varchar(1024) NOT NULL DEFAULT '' COMMENT '密钥',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';
/******************************************/
/* 表名称 = config_info_tag */
/******************************************/
CREATE TABLE `config_info_tag` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
`tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
`tag_id` varchar(128) NOT NULL COMMENT 'tag_id',
`app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
`content` longtext NOT NULL COMMENT 'content',
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`src_user` text COMMENT 'source user',
`src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';
/******************************************/
/* 表名称 = config_tags_relation */
/******************************************/
CREATE TABLE `config_tags_relation` (
`id` bigint(20) NOT NULL COMMENT 'id',
`tag_name` varchar(128) NOT NULL COMMENT 'tag_name',
`tag_type` varchar(64) DEFAULT NULL COMMENT 'tag_type',
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
`tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
`nid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'nid, 自增长标识',
PRIMARY KEY (`nid`),
UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';
/******************************************/
/* 表名称 = group_capacity */
/******************************************/
CREATE TABLE `group_capacity` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`group_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群',
`quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
`usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
`max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
`max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值',
`max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
`max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表';
/******************************************/
/* 表名称 = his_config_info */
/******************************************/
CREATE TABLE `his_config_info` (
`id` bigint(20) unsigned NOT NULL COMMENT 'id',
`nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'nid, 自增标识',
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
`app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
`content` longtext NOT NULL COMMENT 'content',
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`src_user` text COMMENT 'source user',
`src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
`op_type` char(10) DEFAULT NULL COMMENT 'operation type',
`tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
`encrypted_data_key` varchar(1024) NOT NULL DEFAULT '' COMMENT '密钥',
`publish_type` varchar(50) DEFAULT 'formal' COMMENT 'publish type gray or formal',
`gray_name` varchar(50) DEFAULT NULL COMMENT 'gray name',
`ext_info` longtext DEFAULT NULL COMMENT 'ext info',
PRIMARY KEY (`nid`),
KEY `idx_gmt_create` (`gmt_create`),
KEY `idx_gmt_modified` (`gmt_modified`),
KEY `idx_did` (`data_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';
/******************************************/
/* 数据库全名 = nacos_config */
/* 表名称 = tenant_capacity */
/******************************************/
CREATE TABLE `tenant_capacity` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`tenant_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Tenant ID',
`quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
`usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
`max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
`max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
`max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
`max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表';
CREATE TABLE `tenant_info` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`kp` varchar(128) NOT NULL COMMENT 'kp',
`tenant_id` varchar(128) default '' COMMENT 'tenant_id',
`tenant_name` varchar(128) default '' COMMENT 'tenant_name',
`tenant_desc` varchar(256) DEFAULT NULL COMMENT 'tenant_desc',
`create_source` varchar(32) DEFAULT NULL COMMENT 'create_source',
`gmt_create` bigint(20) NOT NULL COMMENT '创建时间',
`gmt_modified` bigint(20) NOT NULL COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),
KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info';
CREATE TABLE `users` (
`username` varchar(50) NOT NULL PRIMARY KEY COMMENT 'username',
`password` varchar(500) NOT NULL COMMENT 'password',
`enabled` boolean NOT NULL COMMENT 'enabled'
);
CREATE TABLE `roles` (
`username` varchar(50) NOT NULL COMMENT 'username',
`role` varchar(50) NOT NULL COMMENT 'role',
UNIQUE INDEX `idx_user_role` (`username` ASC, `role` ASC) USING BTREE
);
CREATE TABLE `permissions` (
`role` varchar(50) NOT NULL COMMENT 'role',
`resource` varchar(128) NOT NULL COMMENT 'resource',
`action` varchar(8) NOT NULL COMMENT 'action',
UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
);
INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);
INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN');
-80
View File
@@ -1,80 +0,0 @@
DROP DATABASE IF EXISTS `ry-seata`;
CREATE DATABASE `ry-seata` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
USE `ry-seata`;
-- -------------------------------- The script used when storeMode is 'db' --------------------------------
-- the table to store GlobalSession data
CREATE TABLE IF NOT EXISTS `global_table`
(
`xid` VARCHAR(128) NOT NULL,
`transaction_id` BIGINT,
`status` TINYINT NOT NULL,
`application_id` VARCHAR(32),
`transaction_service_group` VARCHAR(32),
`transaction_name` VARCHAR(128),
`timeout` INT,
`begin_time` BIGINT,
`application_data` VARCHAR(2000),
`gmt_create` DATETIME,
`gmt_modified` DATETIME,
PRIMARY KEY (`xid`),
KEY `idx_gmt_modified_status` (`gmt_modified`, `status`),
KEY `idx_transaction_id` (`transaction_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
-- the table to store BranchSession data
CREATE TABLE IF NOT EXISTS `branch_table`
(
`branch_id` BIGINT NOT NULL,
`xid` VARCHAR(128) NOT NULL,
`transaction_id` BIGINT,
`resource_group_id` VARCHAR(32),
`resource_id` VARCHAR(256),
`branch_type` VARCHAR(8),
`status` TINYINT,
`client_id` VARCHAR(64),
`application_data` VARCHAR(2000),
`gmt_create` DATETIME(6),
`gmt_modified` DATETIME(6),
PRIMARY KEY (`branch_id`),
KEY `idx_xid` (`xid`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
-- the table to store lock data
CREATE TABLE IF NOT EXISTS `lock_table`
(
`row_key` VARCHAR(128) NOT NULL,
`xid` VARCHAR(96),
`transaction_id` BIGINT,
`branch_id` BIGINT NOT NULL,
`resource_id` VARCHAR(256),
`table_name` VARCHAR(32),
`pk` VARCHAR(36),
`gmt_create` DATETIME,
`gmt_modified` DATETIME,
PRIMARY KEY (`row_key`),
KEY `idx_branch_id` (`branch_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
-- for AT mode you must to init this sql for you business database. the seata server not need it.
CREATE TABLE IF NOT EXISTS `undo_log`
(
`branch_id` BIGINT(20) NOT NULL COMMENT 'branch transaction id',
`xid` VARCHAR(100) NOT NULL COMMENT 'global transaction id',
`context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization',
`rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info',
`log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status',
`log_created` DATETIME(6) NOT NULL COMMENT 'create datetime',
`log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime',
UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`)
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table';
@@ -133,4 +133,11 @@ public interface RemoteRevenueConfigService
@GetMapping("/businessScript/inner/{id}") @GetMapping("/businessScript/inner/{id}")
public R<EpsBusinessScriptRemote> getBusinessScriptMsgByScriptId(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); public R<EpsBusinessScriptRemote> getBusinessScriptMsgByScriptId(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 保存流量数据
* @param queryParam 流量数据列表
* @return 操作结果
*/
@PostMapping("/revenueConfig/autoSaveServiceRecoverTrafficData")
public R<String> autoSaveServiceRecoverTrafficData(@RequestBody EpsInitialTrafficDataRemote queryParam, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
} }
@@ -3,10 +3,7 @@ package com.tongran.system.api;
import com.tongran.common.core.constant.SecurityConstants; import com.tongran.common.core.constant.SecurityConstants;
import com.tongran.common.core.constant.ServiceNameConstants; import com.tongran.common.core.constant.ServiceNameConstants;
import com.tongran.common.core.domain.R; import com.tongran.common.core.domain.R;
import com.tongran.system.api.domain.RmAlarmRecordRemote; import com.tongran.system.api.domain.*;
import com.tongran.system.api.domain.RmDeployScriptRemote;
import com.tongran.system.api.domain.RmMonitorPolicyRemote;
import com.tongran.system.api.domain.RmNetworkInterfaceRemote;
import com.tongran.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.*;
@@ -106,4 +103,13 @@ public interface RemoteRocketMqService {
*/ */
@PostMapping("/networkInterfaceChild/innerGetChildList") @PostMapping("/networkInterfaceChild/innerGetChildList")
public R<List<RmNetworkInterfaceRemote>> innerGetChildList(@RequestBody RmNetworkInterfaceRemote rmNetworkInterfaceRemote, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); public R<List<RmNetworkInterfaceRemote>> innerGetChildList(@RequestBody RmNetworkInterfaceRemote rmNetworkInterfaceRemote, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 下发TCPDUMP默认策略
* @param rmTcpdumpConfigRemote
* @param source
* @return
*/
@PostMapping("/rmTcpdumpConfig/innerInsertRmTcpdumpConfig")
public R<Integer> innerInsertRmTcpdumpConfig(@RequestBody RmTcpdumpConfigRemote rmTcpdumpConfigRemote, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
} }
@@ -9,7 +9,7 @@ import java.util.Set;
/** /**
* 所有接口名称对象 all_interface_name * 所有接口名称对象 all_interface_name
* *
* @author gyt * @author tongran
* @date 2025-08-25 * @date 2025-08-25
*/ */
@Data @Data
@@ -7,7 +7,7 @@ import lombok.Data;
/** /**
* 业务脚本管理对象 eps_business_script * 业务脚本管理对象 eps_business_script
* *
* @author gyt * @author tongran
* @date 2025-10-13 * @date 2025-10-13
*/ */
@Data @Data
@@ -10,7 +10,7 @@ import java.util.List;
/** /**
* 交换机监控信息对象 initial_switch_info_details * 交换机监控信息对象 initial_switch_info_details
* *
* @author gyt * @author tongran
* @date 2025-08-26 * @date 2025-08-26
*/ */
@Data @Data
@@ -1,11 +1,13 @@
package com.tongran.system.api.domain; package com.tongran.system.api.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
@Data @Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class NetworkInfo { public class NetworkInfo {
// 运营商 // 运营商
@JsonProperty("carrier") @JsonProperty("carrier")
@@ -36,9 +38,15 @@ public class NetworkInfo {
private String publicIp; private String publicIp;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
/** 与外网的连通性(0否,1是) */
@JsonProperty("status")
private String status;
// 如果是子接口,存储父接口名称 // 如果是子接口,存储父接口名称
@JsonProperty("parentInterface") @JsonProperty("parentInterface")
private String parentInterface; private String parentInterface;
/** 网卡创建时间 */
@JsonProperty("netCreateTime")
private Long netCreateTime;
// 如果是父接口,存储子接口列表 // 如果是父接口,存储子接口列表
@JsonProperty("subInterfaces") @JsonProperty("subInterfaces")
@@ -10,7 +10,7 @@ import java.math.BigDecimal;
/** /**
* 节点带宽信息对象 eps_node_bandwidth * 节点带宽信息对象 eps_node_bandwidth
* *
* @author gyt * @author tongran
* @date 2025-08-12 * @date 2025-08-12
*/ */
public class NodeBandwidth extends BaseEntity public class NodeBandwidth extends BaseEntity
@@ -11,7 +11,7 @@ import java.util.Date;
/** /**
* 告警记录对象 rm_alarm_record * 告警记录对象 rm_alarm_record
* *
* @author gyt * @author tongran
* @date 2025-09-12 * @date 2025-09-12
*/ */
public class RmAlarmRecordRemote extends BaseEntity public class RmAlarmRecordRemote extends BaseEntity
@@ -58,7 +58,11 @@ public class RmNetworkInterfaceRemote extends BaseEntity {
private String clientIds; private String clientIds;
/** 查询所有网卡的clientId集合 */ /** 查询所有网卡的clientId集合 */
private String allClientIds; private String allClientIds;
// 如果是子接口,存储父接口名称 // 如果是子接口,存储父接口名称
private String parentInterface; private String parentInterface;
/** 服务器列表传参 */
private String queryParam;
/** 有ipv4的标识 */
private boolean ipv4Flag;
} }
@@ -10,7 +10,7 @@ import java.util.Date;
/** /**
* 资源分组对象 rm_resource_group * 资源分组对象 rm_resource_group
* *
* @author gyt * @author tongran
* @date 2025-08-12 * @date 2025-08-12
*/ */
@Data @Data
@@ -5,12 +5,13 @@ import com.tongran.common.core.annotation.Excel;
import com.tongran.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.util.Date; import java.util.Date;
/** /**
* 资源注册对象 rm_resource_registration * 资源注册对象 rm_resource_registration
* *
* @author gyt * @author tongran
* @date 2025-08-12 * @date 2025-08-12
*/ */
@Data @Data
@@ -178,5 +179,21 @@ public class RmResourceRegistrationRemote extends BaseEntity
@Excel(name = "上机时间") @Excel(name = "上机时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date onboardTime; private Date onboardTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date delAlarmTime;
/** FRP连接地址生成状态(0-未生成,1-生成中,2已生成) */
private String frpcConnectionStatus;
/** FRPC远程端口 */
private String frpcRemotePort;
/** FRPC服务器地址 */
private String frpcServerAddr;
/** 出省流量占比 */
private BigDecimal outboundRate;
/** 公网ip */
private String ip1PublicIp;
/** 负责人手机号 */
private String phone;
/** 负责人名称 */
private String owner;
} }
@@ -0,0 +1,39 @@
package com.tongran.system.api.domain;
import com.tongran.common.core.annotation.Excel;
import com.tongran.common.core.web.domain.BaseEntity;
import lombok.Data;
/**
* tcpdump探测策略对象 rm_tcpdump_config
*
* @author tongran
* @date 2026-01-21
*/
@Data
public class RmTcpdumpConfigRemote extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 客户端ID */
@Excel(name = "客户端ID")
private String clientId;
/** 开启探测(0:否,1:是) */
@Excel(name = "开启探测(0:否,1:是)")
private Integer detectFlag;
/** 探测频率 */
@Excel(name = "探测频率")
private String frequency;
/** 探测时间列表(多个时间用,分隔) */
@Excel(name = "探测时间列表(多个时间用,分隔)")
private String detectTimes;
private String clientIds;
}
@@ -96,6 +96,11 @@ public class RemoteRevenueConfigFallbackFactory implements FallbackFactory<Remot
public R<EpsBusinessScriptRemote> getBusinessScriptMsgByScriptId(Long id, String source) { public R<EpsBusinessScriptRemote> getBusinessScriptMsgByScriptId(Long id, String source) {
return R.fail("获取错误关键词失败:" + throwable.getMessage()); return R.fail("获取错误关键词失败:" + throwable.getMessage());
} }
@Override
public R<String> autoSaveServiceRecoverTrafficData(EpsInitialTrafficDataRemote queryParam, String source) {
return R.fail("保存重试流量数据失败:" + throwable.getMessage());
}
}; };
} }
} }
@@ -2,10 +2,7 @@ package com.tongran.system.api.factory;
import com.tongran.common.core.domain.R; import com.tongran.common.core.domain.R;
import com.tongran.system.api.RemoteRocketMqService; import com.tongran.system.api.RemoteRocketMqService;
import com.tongran.system.api.domain.RmAlarmRecordRemote; import com.tongran.system.api.domain.*;
import com.tongran.system.api.domain.RmDeployScriptRemote;
import com.tongran.system.api.domain.RmMonitorPolicyRemote;
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;
@@ -88,6 +85,11 @@ public class RemoteRocketMqFallbackFactory implements FallbackFactory<RemoteRock
public R<List<RmNetworkInterfaceRemote>> innerGetChildList(RmNetworkInterfaceRemote rmNetworkInterfaceRemote, String source) { public R<List<RmNetworkInterfaceRemote>> innerGetChildList(RmNetworkInterfaceRemote rmNetworkInterfaceRemote, String source) {
return R.fail(throwable.getMessage()); return R.fail(throwable.getMessage());
} }
@Override
public R<Integer> innerInsertRmTcpdumpConfig(RmTcpdumpConfigRemote rmTcpdumpConfigRemote, String source) {
return R.fail(throwable.getMessage());
}
}; };
} }
} }
@@ -17,15 +17,6 @@ public class TongRanAuthApplication
public static void main(String[] args) public static void main(String[] args)
{ {
SpringApplication.run(TongRanAuthApplication.class, args); SpringApplication.run(TongRanAuthApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 认证授权中心启动成功 ლ(´ڡ`ლ)゙ \n" + System.out.println("认证授权中心启动成功");
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
} }
} }
@@ -1,10 +1,2 @@
Spring Boot Version: ${spring-boot.version} Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name} Spring Application Name: ${spring.application.name}
_ _ _
(_) | | | |
_ __ _ _ ___ _ _ _ ______ __ _ _ _ | |_ | |__
| '__|| | | | / _ \ | | | || ||______| / _` || | | || __|| '_ \
| | | |_| || (_) || |_| || | | (_| || |_| || |_ | | | |
|_| \__,_| \___/ \__, ||_| \__,_| \__,_| \__||_| |_|
__/ |
|___/
@@ -20,9 +20,11 @@ spring:
password: ${spring.cloud.nacos.config.password} password: ${spring.cloud.nacos.config.password}
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 172.16.15.52:8848 #测试环境
# server-addr: 172.16.15.103:8848 # server-addr: 172.16.15.52:8848
# namespace: public # namespace: public
#生产环境
server-addr: 172.16.15.103:8848
namespace: saas-prod namespace: saas-prod
username: nacos username: nacos
password: nacos password: nacos
@@ -83,7 +83,7 @@ public class UserConstants
public static boolean isAdmin(Long userId) public static boolean isAdmin(Long userId)
{ {
return userId != null && 1L == userId; return userId != null && (1L == userId || 6L == userId);
//TODO 权限控制 //TODO 权限控制
// return true; // return true;
} }
@@ -15,6 +15,16 @@ public enum MsgEnum {
多公网IP探测("NETWORK_DETECT"), 多公网IP探测("NETWORK_DETECT"),
修改frp配置文件应答("UPDATE_FRP_RSP"),
macvlan状态上报("MACVLAN_STATUS_RSP"),
iops结果上报("IOPS_RESULT"),
tcpdump结果上报("TCPDUMP_RESULT"),
内存详情上报("MEMORY_DETAILS"),
获取最新策略("GET_POLICY"), 获取最新策略("GET_POLICY"),
获取最新策略应答("GET_POLICY_RSP"), 获取最新策略应答("GET_POLICY_RSP"),
@@ -39,6 +49,10 @@ public enum MsgEnum {
网络上报("NET"), 网络上报("NET"),
网络上报重试("NET_RECOVER"),
业务网络上报("BUSINESS_NET"),
挂载上报("POINT"), 挂载上报("POINT"),
系统其他上报("OTHER_SYSTEM"), 系统其他上报("OTHER_SYSTEM"),
@@ -53,7 +53,7 @@ public class EchartsDataUtils {
return Math.round(microseconds / 1_000_000.0 * 100.0) / 100.0; return Math.round(microseconds / 1_000_000.0 * 100.0) / 100.0;
} }
/** /**
* 构建ECharts图表数据(带时间补全和特殊值处理) * 构建ECharts图表数据(带时间补全和特殊值处理)- 最终修复版本
*/ */
public static <T> Map<String, Object> buildEchartsDataAutoPadding( public static <T> Map<String, Object> buildEchartsDataAutoPadding(
List<T> list, List<T> list,
@@ -84,80 +84,61 @@ public class EchartsDataUtils {
.sorted(Comparator.comparing(timeExtractor)) .sorted(Comparator.comparing(timeExtractor))
.collect(Collectors.toList()); .collect(Collectors.toList());
// 自动检测时间间隔(用于数据期间)
long timeInterval = detectTimeInterval(sortedList, timeExtractor);
// 获取数据实际的时间范围 // 获取数据实际的时间范围
Date actualStartTime = timeExtractor.apply(sortedList.get(0)); Date actualStartTime = timeExtractor.apply(sortedList.get(0));
Date actualEndTime = timeExtractor.apply(sortedList.get(sortedList.size() - 1)); Date actualEndTime = timeExtractor.apply(sortedList.get(sortedList.size() - 1));
// 计算稀疏间隔(用于数据期间外) // 计算稀疏间隔
long totalTimeRange = endDate.getTime() - startDate.getTime(); long totalTimeRange = endDate.getTime() - startDate.getTime();
long sparseInterval = totalTimeRange > 12L * 30 * 24 * 60 * 60 * 1000 ?
30L * 24 * 60 * 60 * 1000 : 2L * 24 * 60 * 60 * 1000;
// 生成三段时间序列 long sparseInterval;
List<Date> fullTimeSeries = new ArrayList<>(); if (totalTimeRange > 12L * 30 * 24 * 60 * 60 * 1000) { // 大于12个月
sparseInterval = 30L * 24 * 60 * 60 * 1000; // 30天间隔
// 1. 开始时间到数据开始时间(稀疏间隔) } else if (totalTimeRange <= 24L * 60 * 60 * 1000) { // 小于等于24小时
if (startDate.before(actualStartTime)) { sparseInterval = 5L * 60 * 1000; // 5分钟间隔
List<Date> beforeSeries = generateTimeSeries(startDate, actualStartTime, sparseInterval); } else { // 其他情况(大于24小时,小于等于12个月)
fullTimeSeries.addAll(beforeSeries); sparseInterval = 2L * 24 * 60 * 60 * 1000; // 2天间隔
} }
// 2. 数据开始时间到数据结束时间(正常间隔) // 核心修改:生成X轴时间序列
List<Date> dataSeries = generateTimeSeries(actualStartTime, actualEndTime, timeInterval); List<Date> xAxisTimes = generateXAxisTimeSeries(
fullTimeSeries.addAll(dataSeries); startDate, endDate,
actualStartTime, actualEndTime,
sortedList, timeExtractor,
sparseInterval
);
// 3. 数据结束时间到结束时间(稀疏间隔) // 创建时间到数据的映射
if (actualEndTime.before(endDate)) { Map<String, T> timeDataMap = new HashMap<>();
// 调整actualEndTime的下一个点开始,避免重复 for (T item : sortedList) {
Calendar cal = Calendar.getInstance(); Date itemTime = timeExtractor.apply(item);
cal.setTime(actualEndTime); String timeKey = parseDateToStr(itemTime);
cal.setTimeInMillis(cal.getTimeInMillis() + timeInterval); timeDataMap.put(timeKey, item);
Date nextAfterActualEnd = cal.getTime();
if (nextAfterActualEnd.before(endDate) || nextAfterActualEnd.equals(endDate)) {
List<Date> afterSeries = generateTimeSeries(nextAfterActualEnd, endDate, sparseInterval);
fullTimeSeries.addAll(afterSeries);
} }
}
// 创建时间到数据的映射(考虑时间精度)
Map<Long, T> timeDataMap = sortedList.stream()
.collect(Collectors.toMap(
item -> normalizeTime(timeExtractor.apply(item), timeInterval),
Function.identity(),
(a, b) -> a
));
// 检测整个数据集中是否有真实数据 // 检测整个数据集中是否有真实数据
boolean hasRealData = checkHasRealData(sortedList, dataExtractors); boolean hasRealData = checkHasRealData(sortedList, dataExtractors);
// 特殊处理:查找percentile95的固定值 // 查找特殊字段的固定值
Object fixedPercentile95Value = findFixedValueForPercentile95(sortedList, dataExtractors); Object fixedPercentile95Value = findFixedValueForPercentile95(sortedList, dataExtractors);
// 准备X轴和Y轴数据 // 准备X轴和Y轴数据
List<String> xAxisData = new ArrayList<>(); List<String> xAxisData = new ArrayList<>();
Map<String, Object> yData = new LinkedHashMap<>(); Map<String, Object> yData = new LinkedHashMap<>();
// 初始化Y轴数据结构 // 初始化Y轴数据结构
dataExtractors.keySet().forEach(name -> dataExtractors.keySet().forEach(name ->
yData.put(name, new ArrayList<>())); yData.put(name, new ArrayList<>()));
// 记录当前处理的时间点索引 for (Date time : xAxisTimes) {
int timeIndex = 0;
for (Date time : fullTimeSeries) {
// X轴数据 // X轴数据
xAxisData.add(parseDateToStr(time)); String timeStr = parseDateToStr(time);
xAxisData.add(timeStr);
// 判断当前时间点是否在数据实际时间范围内 // 判断当前时间点是否在数据实际时间范围内
boolean isInDataRange = !time.before(actualStartTime) && !time.after(actualEndTime); boolean isInDataRange = !time.before(actualStartTime) && !time.after(actualEndTime);
// Y轴数据 // 查找对应的数据
Long normalizedTime = normalizeTime(time, timeInterval); T item = timeDataMap.get(timeStr);
T item = timeDataMap.get(normalizedTime);
for (Map.Entry<String, Function<T, ?>> entry : dataExtractors.entrySet()) { for (Map.Entry<String, Function<T, ?>> entry : dataExtractors.entrySet()) {
String name = entry.getKey(); String name = entry.getKey();
@@ -169,20 +150,18 @@ public class EchartsDataUtils {
if (item != null) { if (item != null) {
// 有真实数据 // 有真实数据
Object value = extractor.apply(item); Object value = extractor.apply(item);
seriesData.add(value != null ? value : getDefaultValue(name, fixedPercentile95Value, timeIndex, hasRealData)); seriesData.add(value != null ? value : null);
} else { } else {
// 智能数据补全 // 智能数据补全
if (isInDataRange) { if (isInDataRange) {
// 在数据时间范围内但该时间点无数据:使用智能补全策略 // 在数据时间范围内但该时间点无数据
seriesData.add(getDefaultValue(name, fixedPercentile95Value, timeIndex, hasRealData)); seriesData.add(getDefaultValue(name, fixedPercentile95Value, xAxisData.size()-1, hasRealData));
} else { } else {
// 在数据时间范围外(开始时间前或结束时间后):使用空数据补全策略 // 在数据时间范围外
seriesData.add(getEmptyDataDefaultValue(name, timeIndex)); seriesData.add(getEmptyDataDefaultValue(name, xAxisData.size()-1, hasRealData));
} }
} }
} }
timeIndex++;
} }
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
@@ -191,22 +170,214 @@ public class EchartsDataUtils {
return result; return result;
} catch (Exception e) { } catch (Exception e) {
// 记录日志
System.err.println("构建图表数据失败: " + e.getMessage()); System.err.println("构建图表数据失败: " + e.getMessage());
e.printStackTrace();
return createEmptyResult(dataExtractors.keySet(), startTime, endTime); return createEmptyResult(dataExtractors.keySet(), startTime, endTime);
} }
} }
/**
* 生成X轴时间序列(核心方法)
* 策略:优先使用实际数据的时间点,然后在数据点之间按需补全
*/
private static <T> List<Date> generateXAxisTimeSeries(
Date queryStart, Date queryEnd,
Date dataStart, Date dataEnd,
List<T> sortedList, Function<T, Date> timeExtractor,
long sparseInterval) {
List<Date> timeSeries = new ArrayList<>();
// 1. 查询开始时间到数据开始时间(稀疏间隔)
if (queryStart.before(dataStart)) {
long timeDiff = dataStart.getTime() - queryStart.getTime();
long thresholdMinutes = 5; // 定义阈值(分钟)
long thresholdMs = thresholdMinutes * 60 * 1000;
// 只有当时间差超过5分钟时才补充时间序列
if (timeDiff > thresholdMs) {
List<Date> beforeSeries = generateTimeSeries(queryStart, dataStart, sparseInterval, false);
timeSeries.addAll(beforeSeries);
}
}
// 2. 数据时间范围内的处理
if (sortedList != null && !sortedList.isEmpty()) {
// 优先使用实际数据的所有时间点
List<Date> dataTimePoints = sortedList.stream()
.map(timeExtractor)
.sorted()
.collect(Collectors.toList());
timeSeries.addAll(dataTimePoints);
// 检测数据点之间的间隔,补全缺失的时间点
if (dataTimePoints.size() > 1) {
List<Date> filledSeries = fillMissingTimePoints(dataTimePoints);
timeSeries.addAll(filledSeries);
}
}
// 3. 数据结束时间到查询结束时间(稀疏间隔)
if (dataEnd.before(queryEnd)) {
// 从数据结束时间的下一个稀疏间隔点开始
Calendar cal = Calendar.getInstance();
cal.setTime(dataEnd);
cal.add(Calendar.MILLISECOND, (int)sparseInterval);
Date nextAfterDataEnd = cal.getTime();
if (nextAfterDataEnd.before(queryEnd) || nextAfterDataEnd.equals(queryEnd)) {
List<Date> afterSeries = generateTimeSeries(nextAfterDataEnd, queryEnd, sparseInterval, false);
timeSeries.addAll(afterSeries);
}
}
// 去重、排序
return timeSeries.stream()
.distinct()
.sorted()
.collect(Collectors.toList());
}
/**
* 补全缺失的时间点
* 在相邻数据点之间,如果间隔太大,插入中间点
*/
private static List<Date> fillMissingTimePoints(List<Date> dataTimePoints) {
List<Date> filledPoints = new ArrayList<>();
if (dataTimePoints.size() < 2) {
return filledPoints;
}
// 检测常见间隔
long commonInterval = detectCommonInterval(dataTimePoints);
for (int i = 0; i < dataTimePoints.size() - 1; i++) {
Date current = dataTimePoints.get(i);
Date next = dataTimePoints.get(i + 1);
long diff = next.getTime() - current.getTime();
// 如果间隔大于常见间隔的1.5倍,说明中间有缺失
if (diff > commonInterval * 1.5) {
// 计算可以插入几个点
int pointsToInsert = (int) (diff / commonInterval) - 1;
Calendar cal = Calendar.getInstance();
cal.setTime(current);
for (int j = 1; j <= pointsToInsert; j++) {
cal.add(Calendar.MILLISECOND, (int)commonInterval);
Date insertedPoint = cal.getTime();
// 确保插入的点不晚于next
if (insertedPoint.before(next)) {
filledPoints.add(insertedPoint);
}
}
}
}
return filledPoints;
}
/**
* 检测常见时间间隔
*/
private static long detectCommonInterval(List<Date> timePoints) {
if (timePoints.size() < 2) {
return 300000L; // 默认5分钟
}
Map<Long, Integer> intervalCount = new HashMap<>();
for (int i = 1; i < timePoints.size(); i++) {
long interval = timePoints.get(i).getTime() - timePoints.get(i-1).getTime();
if (interval > 0) {
intervalCount.merge(interval, 1, Integer::sum);
}
}
if (intervalCount.isEmpty()) {
return 300000L;
}
return intervalCount.entrySet().stream()
.max(Map.Entry.comparingByValue())
.map(Map.Entry::getKey)
.orElse(300000L);
}
/**
* 生成时间序列
* @param alignToInterval 是否对齐到时间间隔
*/
private static List<Date> generateTimeSeries(Date start, Date end, long interval, boolean alignToInterval) {
List<Date> timeSeries = new ArrayList<>();
if (interval <= 0) {
interval = 300000L;
}
Calendar calendar = Calendar.getInstance();
calendar.setTime(start);
calendar.set(Calendar.MILLISECOND, 0);
if (alignToInterval) {
// 对齐到间隔
long startMillis = calendar.getTimeInMillis();
long normalizedStart = (startMillis / interval) * interval;
calendar.setTimeInMillis(normalizedStart);
if (normalizedStart < startMillis) {
calendar.add(Calendar.MILLISECOND, (int)interval);
}
} else {
// 对齐到下一分钟的0秒
// 先将秒和毫秒清零
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
// 如果当前时间不是整分钟,就跳到下一分钟
if (calendar.getTime().before(start)) {
calendar.add(Calendar.MINUTE, 1);
}
}
// 包含开始时间
if (!calendar.getTime().after(end)) {
timeSeries.add(calendar.getTime());
}
while (true) {
calendar.add(Calendar.MILLISECOND, (int)interval);
if (calendar.getTime().after(end)) {
break;
}
timeSeries.add(calendar.getTime());
}
return timeSeries;
}
/** /**
* 获取空数据默认值(用于数据时间范围外的点) * 获取空数据默认值(用于数据时间范围外的点)
*/ */
private static Object getEmptyDataDefaultValue(String metricName, int timeIndex) { private static Object getEmptyDataDefaultValue(String metricName, int timeIndex, boolean hasRealData) {
// deployDevice特殊处理:始终补空字符串 // deployDevice特殊处理:始终补空字符串
if ("deployDevice".equals(metricName)) { if ("deployDevice".equals(metricName)) {
return ""; return "";
} }
// 智能补全策略
if (hasRealData) {
// 数据集中有真实数据:所有缺失点都补null
return null; return null;
} else {
// 数据集中没有真实数据:第一个点补0,其他点补null
if (timeIndex == 0) {
return 0;
} else {
return null;
}
}
} }
/** /**
@@ -42,6 +42,9 @@ public class EchartsMoreDataUtils {
Set<Date> allTimePoints = new TreeSet<>(); Set<Date> allTimePoints = new TreeSet<>();
Map<String, Map<Long, T>> interfaceTimeMap = new LinkedHashMap<>(); Map<String, Map<Long, T>> interfaceTimeMap = new LinkedHashMap<>();
// 检查是否有任何网卡有真实数据
boolean hasRealData = false;
// 为每个网卡处理数据 // 为每个网卡处理数据
for (Map.Entry<String, List<T>> entry : interfaceDataMap.entrySet()) { for (Map.Entry<String, List<T>> entry : interfaceDataMap.entrySet()) {
String interfaceName = entry.getKey(); String interfaceName = entry.getKey();
@@ -72,6 +75,15 @@ public class EchartsMoreDataUtils {
// 添加时间点到总集合 // 添加时间点到总集合
for (T item : sortedList) { for (T item : sortedList) {
allTimePoints.add(timeExtractor.apply(item)); allTimePoints.add(timeExtractor.apply(item));
// 检查是否有真实数据(非null
if (!hasRealData) {
BigDecimal inSpeed = inSpeedExtractor.apply(item);
BigDecimal outSpeed = outSpeedExtractor.apply(item);
if ((inSpeed != null && inSpeed.compareTo(BigDecimal.ZERO) != 0) ||
(outSpeed != null && outSpeed.compareTo(BigDecimal.ZERO) != 0)) {
hasRealData = true;
}
}
} }
} }
@@ -96,7 +108,8 @@ public class EchartsMoreDataUtils {
yData.put("totalNetOutTraffic", totalNetOutTraffic); yData.put("totalNetOutTraffic", totalNetOutTraffic);
// 遍历所有时间点 // 遍历所有时间点
for (Date time : fullTimeSeries) { for (int timeIndex = 0; timeIndex < fullTimeSeries.size(); timeIndex++) {
Date time = fullTimeSeries.get(timeIndex);
// X轴数据 // X轴数据
xAxisData.add(parseDateToStr(time)); xAxisData.add(parseDateToStr(time));
@@ -107,6 +120,9 @@ public class EchartsMoreDataUtils {
BigDecimal timeTotalInSpeed = BigDecimal.ZERO; BigDecimal timeTotalInSpeed = BigDecimal.ZERO;
BigDecimal timeTotalOutSpeed = BigDecimal.ZERO; BigDecimal timeTotalOutSpeed = BigDecimal.ZERO;
// 是否有数据点存在
boolean hasDataAtThisTime = false;
// 处理每个网卡的数据 // 处理每个网卡的数据
for (Map.Entry<String, Map<Long, T>> entry : interfaceTimeMap.entrySet()) { for (Map.Entry<String, Map<Long, T>> entry : interfaceTimeMap.entrySet()) {
String interfaceName = entry.getKey(); String interfaceName = entry.getKey();
@@ -136,22 +152,31 @@ public class EchartsMoreDataUtils {
outSpeedList.add(convertedOutSpeed); outSpeedList.add(convertedOutSpeed);
// 累加到总流量 // 累加到总流量
if (convertedInSpeed != null) { if (convertedInSpeed != null && convertedInSpeed.compareTo(BigDecimal.ZERO) != 0) {
timeTotalInSpeed = timeTotalInSpeed.add(convertedInSpeed); timeTotalInSpeed = timeTotalInSpeed.add(convertedInSpeed);
} }
if (convertedOutSpeed != null) { if (convertedOutSpeed != null && convertedOutSpeed.compareTo(BigDecimal.ZERO) != 0) {
timeTotalOutSpeed = timeTotalOutSpeed.add(convertedOutSpeed); timeTotalOutSpeed = timeTotalOutSpeed.add(convertedOutSpeed);
} }
hasDataAtThisTime = true;
} else { } else {
// 无数据的时间点,补null // 无数据的时间点,使用智能补全逻辑
inSpeedList.add(null); inSpeedList.add(getDefaultSpeedValue(hasRealData, timeIndex));
outSpeedList.add(null); outSpeedList.add(getDefaultSpeedValue(hasRealData, timeIndex));
} }
} }
// 添加当前时间点的总流量 // 添加当前时间点的总流量(使用智能补全逻辑)
if (hasDataAtThisTime) {
// 有真实数据,正常添加
totalNetInTraffic.add(timeTotalInSpeed.compareTo(BigDecimal.ZERO) == 0 ? null : timeTotalInSpeed); totalNetInTraffic.add(timeTotalInSpeed.compareTo(BigDecimal.ZERO) == 0 ? null : timeTotalInSpeed);
totalNetOutTraffic.add(timeTotalOutSpeed.compareTo(BigDecimal.ZERO) == 0 ? null : timeTotalOutSpeed); totalNetOutTraffic.add(timeTotalOutSpeed.compareTo(BigDecimal.ZERO) == 0 ? null : timeTotalOutSpeed);
} else {
// 没有真实数据,使用智能补全逻辑
totalNetInTraffic.add(getDefaultSpeedValue(hasRealData, timeIndex));
totalNetOutTraffic.add(getDefaultSpeedValue(hasRealData, timeIndex));
}
} }
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
@@ -166,6 +191,26 @@ public class EchartsMoreDataUtils {
} }
} }
/**
* 获取默认速度值(根据智能补全策略)
* 策略:
* 1. 如果整个数据集有真实数据:所有缺失点都补null
* 2. 如果整个数据集没有真实数据:第一个点补0,其他点补null
*/
private static BigDecimal getDefaultSpeedValue(boolean hasRealData, int timeIndex) {
if (hasRealData) {
// 数据集中有真实数据:所有缺失点都补null
return null;
} else {
// 数据集中没有真实数据:第一个点补0,其他点补null
if (timeIndex == 0) {
return BigDecimal.ZERO;
} else {
return null;
}
}
}
/** /**
* 为多网卡生成完整的时间序列 * 为多网卡生成完整的时间序列
*/ */
@@ -182,9 +227,15 @@ public class EchartsMoreDataUtils {
// 计算稀疏间隔 // 计算稀疏间隔
long totalTimeRange = endDate.getTime() - startDate.getTime(); long totalTimeRange = endDate.getTime() - startDate.getTime();
long sparseInterval = totalTimeRange > 12L * 30 * 24 * 60 * 60 * 1000 ?
30L * 24 * 60 * 60 * 1000 : 2L * 24 * 60 * 60 * 1000;
long sparseInterval;
if (totalTimeRange > 12L * 30 * 24 * 60 * 60 * 1000) { // 大于12个月
sparseInterval = 30L * 24 * 60 * 60 * 1000; // 30天间隔
} else if (totalTimeRange <= 24L * 60 * 60 * 1000) { // 小于等于24小时
sparseInterval = 5L * 60 * 1000; // 5分钟间隔
} else { // 其他情况(大于24小时,小于等于12个月)
sparseInterval = 2L * 24 * 60 * 60 * 1000; // 2天间隔
}
// 使用默认的5分钟作为数据期间间隔 // 使用默认的5分钟作为数据期间间隔
long dataInterval = 300000L; long dataInterval = 300000L;
@@ -193,9 +244,16 @@ public class EchartsMoreDataUtils {
// 1. 开始时间到数据开始时间(稀疏间隔) // 1. 开始时间到数据开始时间(稀疏间隔)
if (startDate.before(actualStartTime)) { if (startDate.before(actualStartTime)) {
long timeDiff = actualStartTime.getTime() - startDate.getTime();
long thresholdMinutes = 5; // 定义阈值(分钟)
long thresholdMs = thresholdMinutes * 60 * 1000;
// 只有当时间差超过5分钟时才补充时间序列
if (timeDiff > thresholdMs) {
List<Date> beforeSeries = generateTimeSeries(startDate, actualStartTime, sparseInterval); List<Date> beforeSeries = generateTimeSeries(startDate, actualStartTime, sparseInterval);
fullTimeSeries.addAll(beforeSeries); fullTimeSeries.addAll(beforeSeries);
} }
}
// 2. 数据开始时间到数据结束时间(正常间隔) // 2. 数据开始时间到数据结束时间(正常间隔)
List<Date> dataSeries = generateTimeSeries(actualStartTime, actualEndTime, dataInterval); List<Date> dataSeries = generateTimeSeries(actualStartTime, actualEndTime, dataInterval);
@@ -214,9 +272,9 @@ public class EchartsMoreDataUtils {
fullTimeSeries.addAll(afterSeries); fullTimeSeries.addAll(afterSeries);
} }
} }
// 在generateFullTimeSeriesForMultiInterface方法的最后添加:
// 排序和去重
fullTimeSeries.sort(Date::compareTo); fullTimeSeries.sort(Date::compareTo);
// 去重
List<Date> uniqueSeries = new ArrayList<>(); List<Date> uniqueSeries = new ArrayList<>();
Date lastDate = null; Date lastDate = null;
for (Date date : fullTimeSeries) { for (Date date : fullTimeSeries) {
@@ -229,7 +287,7 @@ public class EchartsMoreDataUtils {
} }
/** /**
* 创建多网卡空结果(带汇总流量) * 创建多网卡空结果(带汇总流量)- 使用智能补全策略
*/ */
private static Map<String, Object> createEmptyMultiInterfaceResultWithTotal( private static Map<String, Object> createEmptyMultiInterfaceResultWithTotal(
Set<String> interfaceNames, String startTime, String endTime) { Set<String> interfaceNames, String startTime, String endTime) {
@@ -261,7 +319,7 @@ public class EchartsMoreDataUtils {
} }
result.put("xData", xAxisData); result.put("xData", xAxisData);
// 构建y轴数据(空数据集) // 构建y轴数据(空数据集)- 使用智能补全策略
Map<String, Object> yData = new LinkedHashMap<>(); Map<String, Object> yData = new LinkedHashMap<>();
int dataSize = xAxisData.size(); int dataSize = xAxisData.size();
@@ -286,7 +344,7 @@ public class EchartsMoreDataUtils {
yData.put(interfaceName + "netOutTraffic", outSpeedSeries); yData.put(interfaceName + "netOutTraffic", outSpeedSeries);
} }
// 创建汇总流量的空数据系列 // 创建汇总流量的空数据系列 - 使用相同的智能补全策略
List<Object> totalInSpeedSeries = new ArrayList<>(); List<Object> totalInSpeedSeries = new ArrayList<>();
List<Object> totalOutSpeedSeries = new ArrayList<>(); List<Object> totalOutSpeedSeries = new ArrayList<>();
for (int i = 0; i < dataSize; i++) { for (int i = 0; i < dataSize; i++) {
@@ -414,8 +472,9 @@ public class EchartsMoreDataUtils {
*/ */
private static long normalizeTime(Date time, long interval) { private static long normalizeTime(Date time, long interval) {
long timeMillis = time.getTime(); long timeMillis = time.getTime();
return (timeMillis / interval) * interval; return ((timeMillis + interval - 1) / interval) * interval;
} }
public static Map<String, String> sortInterfaceMap(Map<String, String> interfaceMap, String mainName, boolean hasSub) { public static Map<String, String> sortInterfaceMap(Map<String, String> interfaceMap, String mainName, boolean hasSub) {
List<Map.Entry<String, String>> list = new ArrayList<>(interfaceMap.entrySet()); List<Map.Entry<String, String>> list = new ArrayList<>(interfaceMap.entrySet());
@@ -13,8 +13,8 @@ public class NetworkNameUtil {
return false; return false;
} }
// 匹配模式:冒号后跟数字 或 点后跟数字 // 匹配模式:冒号后跟数字 或 点 或 -后跟数字
String pattern = ".*[:.]\\d+$"; String pattern = ".*[:.-]\\d+$";
return interfaceName.matches(pattern); return interfaceName.matches(pattern);
} }
} }
@@ -159,10 +159,6 @@ public class SpeedUtils {
BigDecimal totalInSpeedBit = BigDecimal.ZERO; BigDecimal totalInSpeedBit = BigDecimal.ZERO;
BigDecimal totalOutSpeedBit = BigDecimal.ZERO; BigDecimal totalOutSpeedBit = BigDecimal.ZERO;
BigDecimal maxInSpeedGb = BigDecimal.ZERO;
BigDecimal maxOutSpeedGb = BigDecimal.ZERO;
BigDecimal lastInSpeedGb = BigDecimal.ZERO;
BigDecimal lastOutSpeedGb = BigDecimal.ZERO;
final BigDecimal GB_DIVISOR = new BigDecimal("1000000000"); final BigDecimal GB_DIVISOR = new BigDecimal("1000000000");
@@ -175,8 +171,9 @@ public class SpeedUtils {
inField.setAccessible(true); inField.setAccessible(true);
outField.setAccessible(true); outField.setAccessible(true);
BigDecimal inSpeedBit = (BigDecimal) inField.get(obj) == null ? BigDecimal.ZERO : (BigDecimal) inField.get(obj); // 安全地获取字段值并转换为BigDecimal
BigDecimal outSpeedBit = (BigDecimal) outField.get(obj) == null ? BigDecimal.ZERO : (BigDecimal) outField.get(obj); BigDecimal inSpeedBit = convertToBigDecimal(inField.get(obj));
BigDecimal outSpeedBit = convertToBigDecimal(outField.get(obj));
// 累加bit值(用于计算平均值) // 累加bit值(用于计算平均值)
totalInSpeedBit = totalInSpeedBit.add(inSpeedBit); totalInSpeedBit = totalInSpeedBit.add(inSpeedBit);
@@ -188,24 +185,53 @@ public class SpeedUtils {
// 计算Gb平均值 // 计算Gb平均值
BigDecimal size = new BigDecimal(list.size()); BigDecimal size = new BigDecimal(list.size());
BigDecimal avgInSpeedGb = totalInSpeedBit.divide(size, 2, RoundingMode.HALF_UP); BigDecimal avgInSpeedBit = totalInSpeedBit.divide(size, 2, RoundingMode.HALF_UP);
BigDecimal avgOutSpeedGb = totalOutSpeedBit.divide(size, 2, RoundingMode.HALF_UP); BigDecimal avgOutSpeedBit = totalOutSpeedBit.divide(size, 2, RoundingMode.HALF_UP);
// 基于平均值的较大值确定推荐单位 // 基于平均值的较大值确定推荐单位
BigDecimal maxAvgBit = avgInSpeedGb.compareTo(avgOutSpeedGb) > 0 ? BigDecimal maxAvgBit = avgInSpeedBit.compareTo(avgOutSpeedBit) > 0 ?
avgInSpeedGb : avgOutSpeedGb; avgInSpeedBit : avgOutSpeedBit;
String recommendedUnit; String recommendedUnit;
if (maxAvgBit.compareTo(new BigDecimal("1000000000")) >= 0) { if (maxAvgBit.compareTo(new BigDecimal("1000000000")) >= 0) {
recommendedUnit = "Gb"; recommendedUnit = "Gb";
} else if (maxAvgBit.compareTo(new BigDecimal("1000000")) >= 0) { } else if (maxAvgBit.compareTo(new BigDecimal("1000000")) >= 0) {
recommendedUnit = "Mb"; recommendedUnit = "Mb";
} else{ } else {
recommendedUnit = "Kb"; recommendedUnit = "Kb";
} }
return recommendedUnit; return recommendedUnit;
} }
/**
* 安全地将不同类型转换为BigDecimal
*/
private static BigDecimal convertToBigDecimal(Object value) {
if (value == null) {
return BigDecimal.ZERO;
}
try {
if (value instanceof BigDecimal) {
return (BigDecimal) value;
} else if (value instanceof String) {
String strValue = ((String) value).trim();
if (strValue.isEmpty()) {
return BigDecimal.ZERO;
}
return new BigDecimal(strValue);
} else if (value instanceof Number) {
return new BigDecimal(value.toString());
} else {
// 尝试转换为字符串再解析
return new BigDecimal(value.toString());
}
} catch (Exception e) {
// 转换失败时返回0
return BigDecimal.ZERO;
}
}
/** /**
* 计算String类型(存储数字)的速度统计结果 * 计算String类型(存储数字)的速度统计结果
* @param list 数据列表 * @param list 数据列表
@@ -383,4 +409,34 @@ public class SpeedUtils {
if (mbitValue == null) return BigDecimal.ZERO; if (mbitValue == null) return BigDecimal.ZERO;
return mbitValue.multiply(new BigDecimal("1000000")); return mbitValue.multiply(new BigDecimal("1000000"));
} }
public static String determineUnitByValue(Long value) {
if (value == null || value == 0) {
return "KB";
}
// 注意:这里使用二进制单位(1024)
if (value >= 1024L * 1024 * 1024) { // >= 1GB
return "GB";
} else if (value >= 1024L * 1024) { // >= 1MB
return "MB";
} else {
return "KB";
}
}
// 工具方法:获取单位换算除数
public static BigDecimal get1024Divisor(String unit) {
switch (unit) {
case "GB":
case "Gb":
return new BigDecimal(1024L * 1024 * 1024); // 1GB = 1024^3
case "MB":
case "Mb":
return new BigDecimal(1024L * 1024); // 1MB = 1024^2
case "KB":
case "Kb":
return new BigDecimal(1024); // 1KB = 1024
default:
return new BigDecimal(1024); // 默认返回KB的除数
}
}
} }
@@ -168,4 +168,24 @@ public class UnitChangeUtil {
return String.format("%.2f %s", roundedValue, units[unitIndex]); return String.format("%.2f %s", roundedValue, units[unitIndex]);
} }
public static String convertUnitByValue(Long value) {
if (value == null || value == 0) {
return "0 KB";
}
// 注意:这里使用二进制单位(1024)
if (value >= 1024L * 1024 * 1024 * 1024) {
double result = value / (1024.0 * 1024 * 1024 * 1024);
return String.format("%.2f TB", result);
} else if (value >= 1024L * 1024 * 1024) { // >= 1GB
double result = value / (1024.0 * 1024 * 1024);
return String.format("%.2f GB", result);
} else if (value >= 1024L * 1024) { // >= 1MB
double result = value / (1024.0 * 1024);
return String.format("%.2f MB", result);
} else {
double result = value / 1024.0;
return String.format("%.2f KB", result);
}
}
} }
@@ -5,7 +5,8 @@ import com.tongran.common.core.utils.DateUtils;
import com.tongran.common.core.utils.StringUtils; import com.tongran.common.core.utils.StringUtils;
/** /**
* @author tongran 序列生成类 * @author tongran
* 序列生成类
*/ */
public class Seq public class Seq
{ {
@@ -17,7 +17,7 @@ import java.lang.reflect.Method;
/** /**
* 基于 Spring Aop 的注解鉴权 * 基于 Spring Aop 的注解鉴权
* *
* @author kong * @author tongran
*/ */
@Aspect @Aspect
@Component @Component
@@ -15,15 +15,6 @@ public class TongRanGatewayApplication
public static void main(String[] args) public static void main(String[] args)
{ {
SpringApplication.run(TongRanGatewayApplication.class, args); SpringApplication.run(TongRanGatewayApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 彤然网关启动成功 ლ(´ڡ`ლ)゙ \n" + System.out.println("彤然网关启动成功");
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
} }
} }
@@ -1,10 +1,2 @@
Spring Boot Version: ${spring-boot.version} Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name} Spring Application Name: ${spring.application.name}
_ _
(_) | |
_ __ _ _ ___ _ _ _ ______ __ _ __ _ | |_ ___ __ __ __ _ _ _
| '__|| | | | / _ \ | | | || ||______| / _` | / _` || __| / _ \\ \ /\ / / / _` || | | |
| | | |_| || (_) || |_| || | | (_| || (_| || |_ | __/ \ V V / | (_| || |_| |
|_| \__,_| \___/ \__, ||_| \__, | \__,_| \__| \___| \_/\_/ \__,_| \__, |
__/ | __/ | __/ |
|___/ |___/ |___/
@@ -20,9 +20,11 @@ spring:
password: ${spring.cloud.nacos.config.password} password: ${spring.cloud.nacos.config.password}
config: config:
# 配置中心地址 # 配置中心地址
server-addr: 172.16.15.52:8848 #测试环境
# server-addr: 172.16.15.103:8848 # server-addr: 172.16.15.52:8848
# namespace: public # namespace: public
#生产环境
server-addr: 172.16.15.103:8848
namespace: saas-prod namespace: saas-prod
username: nacos username: nacos
password: nacos password: nacos
+1
View File
@@ -14,6 +14,7 @@
<module>tongran-job</module> <module>tongran-job</module>
<module>tongran-file</module> <module>tongran-file</module>
<module>tongran-mtragent</module> <module>tongran-mtragent</module>
<module>tongran-storage</module>
</modules> </modules>
<artifactId>tongran-modules</artifactId> <artifactId>tongran-modules</artifactId>
@@ -15,15 +15,6 @@ public class TongRanFileApplication
public static void main(String[] args) public static void main(String[] args)
{ {
SpringApplication.run(TongRanFileApplication.class, args); SpringApplication.run(TongRanFileApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 文件服务模块启动成功 ლ(´ڡ`ლ)゙ \n" + System.out.println("文件服务模块启动成功");
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
} }
} }
@@ -1,10 +1,2 @@
Spring Boot Version: ${spring-boot.version} Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name} Spring Application Name: ${spring.application.name}
_ __ _ _
(_) / _|(_)| |
_ __ _ _ ___ _ _ _ ______ | |_ _ | | ___
| '__|| | | | / _ \ | | | || ||______|| _|| || | / _ \
| | | |_| || (_) || |_| || | | | | || || __/
|_| \__,_| \___/ \__, ||_| |_| |_||_| \___|
__/ |
|___/
@@ -20,9 +20,11 @@ spring:
password: ${spring.cloud.nacos.config.password} password: ${spring.cloud.nacos.config.password}
config: config:
# 配置中心地址 # 配置中心地址
#测试环境
# server-addr: 172.16.15.52:8848 # server-addr: 172.16.15.52:8848
server-addr: 172.16.15.103:8848
# namespace: public # namespace: public
#生产环境
server-addr: 172.16.15.103:8848
namespace: saas-prod namespace: saas-prod
username: nacos username: nacos
password: nacos password: nacos
@@ -18,15 +18,6 @@ public class TongRanGenApplication
public static void main(String[] args) public static void main(String[] args)
{ {
SpringApplication.run(TongRanGenApplication.class, args); SpringApplication.run(TongRanGenApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 代码生成模块启动成功 ლ(´ڡ`ლ)゙ \n" + System.out.println("代码生成模块启动成功");
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
} }
} }
@@ -1,10 +1,2 @@
Spring Boot Version: ${spring-boot.version} Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name} Spring Application Name: ${spring.application.name}
_
(_)
_ __ _ _ ___ _ _ _ ______ __ _ ___ _ __
| '__|| | | | / _ \ | | | || ||______| / _` | / _ \| '_ \
| | | |_| || (_) || |_| || | | (_| || __/| | | |
|_| \__,_| \___/ \__, ||_| \__, | \___||_| |_|
__/ | __/ |
|___/ |___/
@@ -13,18 +13,19 @@ spring:
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}
config: config:
server-addr: 172.16.15.52:8848
# 配置中心地址 # 配置中心地址
# server-addr: 172.16.15.103:8848 #测试环境
server-addr: 172.16.15.52:8848
namespace: public namespace: public
# namespace: saas-local #生产环境
# server-addr: 172.16.15.103:8848
# namespace: saas-prod
username: nacos username: nacos
password: nacos password: nacos
# 配置文件格式 # 配置文件格式
@@ -18,15 +18,6 @@ public class TongRanJobApplication
public static void main(String[] args) public static void main(String[] args)
{ {
SpringApplication.run(TongRanJobApplication.class, args); SpringApplication.run(TongRanJobApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 定时任务模块启动成功 ლ(´ڡ`ლ)゙ \n" + System.out.println("定时任务模块启动成功");
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
} }
} }
@@ -1,10 +1,2 @@
Spring Boot Version: ${spring-boot.version} Spring Boot Version: ${spring-boot.version}
Spring Application Name: ${spring.application.name} Spring Application Name: ${spring.application.name}
_ _ _
(_) (_) | |
_ __ _ _ ___ _ _ _ ______ _ ___ | |__
| '__|| | | | / _ \ | | | || ||______| | | / _ \ | '_ \
| | | |_| || (_) || |_| || | | || (_) || |_) |
|_| \__,_| \___/ \__, ||_| | | \___/ |_.__/
__/ | _/ |
|___/ |__/
@@ -20,6 +20,6 @@ public class TongRanMtragentApplication
public static void main(String[] args) public static void main(String[] args)
{ {
SpringApplication.run(TongRanMtragentApplication.class, args); SpringApplication.run(TongRanMtragentApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ TongRanMtragent模块启动成功 ლ(´ڡ`ლ)゙"); System.out.println("mtr探测模块启动成功");
} }
} }
@@ -18,7 +18,7 @@ import java.util.List;
/** /**
* mtr探测丢包clinetId记录Controller * mtr探测丢包clinetId记录Controller
* *
* @author gyt * @author tongran
* @date 2025-11-24 * @date 2025-11-24
*/ */
@RestController @RestController
@@ -20,7 +20,7 @@ import java.util.List;
/** /**
* MTR客户端注册Controller * MTR客户端注册Controller
* *
* @author gyt * @author tongran
* @date 2025-11-18 * @date 2025-11-18
*/ */
@RestController @RestController
@@ -19,7 +19,7 @@ import java.util.List;
/** /**
* mtr探测策略配置Controller * mtr探测策略配置Controller
* *
* @author gyt * @author tongran
* @date 2025-11-18 * @date 2025-11-18
*/ */
@RestController @RestController
@@ -19,7 +19,7 @@ import java.util.Map;
/** /**
* 网络mtr探测结果Controller * 网络mtr探测结果Controller
* *
* @author gyt * @author tongran
* @date 2025-11-20 * @date 2025-11-20
*/ */
@RestController @RestController
@@ -7,7 +7,7 @@ import lombok.Data;
/** /**
* mtr探测丢包clinetId记录对象 all_mtr_client * mtr探测丢包clinetId记录对象 all_mtr_client
* *
* @author gyt * @author tongran
* @date 2025-11-24 * @date 2025-11-24
*/ */
@Data @Data
@@ -8,7 +8,7 @@ import lombok.Data;
/** /**
* 心跳信息对象 initial_heartbeat_listen * 心跳信息对象 initial_heartbeat_listen
* *
* @author gyt * @author tongran
* @date 2025-09-08 * @date 2025-09-08
*/ */
@Data @Data
@@ -7,7 +7,7 @@ import lombok.Data;
/** /**
* 心跳信息日志对象 initial_heartbeat_listen_log * 心跳信息日志对象 initial_heartbeat_listen_log
* *
* @author gyt * @author tongran
* @date 2025-09-08 * @date 2025-09-08
*/ */
@Data @Data
@@ -10,7 +10,7 @@ import java.util.Date;
/** /**
* Agent管理对象 rm_agent_management * Agent管理对象 rm_agent_management
* *
* @author gyt * @author tongran
* @date 2025-09-15 * @date 2025-09-15
*/ */
@Data @Data
@@ -10,7 +10,7 @@ import java.util.Date;
/** /**
* 客户端告警信息对象 rm_alarm_log * 客户端告警信息对象 rm_alarm_log
* *
* @author gyt * @author tongran
* @date 2025-11-10 * @date 2025-11-10
*/ */
@Data @Data
@@ -7,7 +7,7 @@ import lombok.Data;
/** /**
* 告警推送配置对象 rm_alarm_push_config * 告警推送配置对象 rm_alarm_push_config
* *
* @author gyt * @author tongran
* @date 2025-11-11 * @date 2025-11-11
*/ */
@Data @Data
@@ -10,7 +10,7 @@ import java.util.Date;
/** /**
* MTR客户端注册对象 rm_mtr_client_registration * MTR客户端注册对象 rm_mtr_client_registration
* *
* @author gyt * @author tongran
* @date 2025-11-18 * @date 2025-11-18
*/ */
@Data @Data
@@ -12,7 +12,7 @@ import java.util.Map;
/** /**
* mtr探测策略配置对象 rm_mtr_policy_config * mtr探测策略配置对象 rm_mtr_policy_config
* *
* @author gyt * @author tongran
* @date 2025-11-18 * @date 2025-11-18
*/ */
@Data @Data
@@ -10,7 +10,7 @@ import java.util.List;
/** /**
* 网络mtr探测结果对象 rm_mtr_probe_result * 网络mtr探测结果对象 rm_mtr_probe_result
* *
* @author gyt * @author tongran
* @date 2025-11-20 * @date 2025-11-20
*/ */
@Data @Data
@@ -10,7 +10,7 @@ import java.util.Map;
/** /**
* mtr探测策略配置对象 rm_mtr_policy_config * mtr探测策略配置对象 rm_mtr_policy_config
* *
* @author gyt * @author tongran
* @date 2025-11-18 * @date 2025-11-18
*/ */
@Data @Data
@@ -7,7 +7,7 @@ import java.util.List;
/** /**
* mtr探测丢包clinetId记录Mapper接口 * mtr探测丢包clinetId记录Mapper接口
* *
* @author gyt * @author tongran
* @date 2025-11-24 * @date 2025-11-24
*/ */
public interface AllMtrClientMapper public interface AllMtrClientMapper
@@ -8,7 +8,7 @@ import java.util.List;
/** /**
* 心跳信息日志Mapper接口 * 心跳信息日志Mapper接口
* *
* @author gyt * @author tongran
* @date 2025-09-08 * @date 2025-09-08
*/ */
public interface InitialHeartbeatListenLogMapper public interface InitialHeartbeatListenLogMapper
@@ -8,7 +8,7 @@ import java.util.List;
/** /**
* Agent管理Mapper接口 * Agent管理Mapper接口
* *
* @author gyt * @author tongran
* @date 2025-09-15 * @date 2025-09-15
*/ */
public interface RmAgentManagementMapper public interface RmAgentManagementMapper
@@ -8,7 +8,7 @@ import java.util.List;
/** /**
* 客户端告警信息Mapper接口 * 客户端告警信息Mapper接口
* *
* @author gyt * @author tongran
* @date 2025-11-10 * @date 2025-11-10
*/ */
public interface RmAlarmLogMapper public interface RmAlarmLogMapper
@@ -8,7 +8,7 @@ import java.util.List;
/** /**
* 告警推送配置Mapper接口 * 告警推送配置Mapper接口
* *
* @author gyt * @author tongran
* @date 2025-11-11 * @date 2025-11-11
*/ */
public interface RmAlarmPushConfigMapper public interface RmAlarmPushConfigMapper
@@ -7,7 +7,7 @@ import java.util.List;
/** /**
* MTR客户端注册Mapper接口 * MTR客户端注册Mapper接口
* *
* @author gyt * @author tongran
* @date 2025-11-18 * @date 2025-11-18
*/ */
public interface RmMtrClientRegistrationMapper public interface RmMtrClientRegistrationMapper
@@ -7,7 +7,7 @@ import java.util.List;
/** /**
* mtr探测策略配置Mapper接口 * mtr探测策略配置Mapper接口
* *
* @author gyt * @author tongran
* @date 2025-11-18 * @date 2025-11-18
*/ */
public interface RmMtrPolicyConfigMapper public interface RmMtrPolicyConfigMapper
@@ -7,7 +7,7 @@ import java.util.List;
/** /**
* 网络mtr探测结果Mapper接口 * 网络mtr探测结果Mapper接口
* *
* @author gyt * @author tongran
* @date 2025-11-20 * @date 2025-11-20
*/ */
public interface RmMtrProbeResultMapper public interface RmMtrProbeResultMapper
@@ -1,7 +1,7 @@
package com.tongran.mtragent.producer; package com.tongran.mtragent.producer;
/** /**
* @author 影子 * @author tongran
* 用于捕捉异常非受检异常(unchecked exception * 用于捕捉异常非受检异常(unchecked exception
* RuntimeException 和其子类的异常在编译时不需要进行强制性的异常处理,可以选择在运行时进行捕获和处理 * RuntimeException 和其子类的异常在编译时不需要进行强制性的异常处理,可以选择在运行时进行捕获和处理
* 可选择使用 * 可选择使用
@@ -7,7 +7,7 @@ import java.util.List;
/** /**
* mtr探测丢包clinetId记录Service接口 * mtr探测丢包clinetId记录Service接口
* *
* @author gyt * @author tongran
* @date 2025-11-24 * @date 2025-11-24
*/ */
public interface IAllMtrClientService public interface IAllMtrClientService
@@ -8,7 +8,7 @@ import java.util.List;
/** /**
* 心跳信息日志Service接口 * 心跳信息日志Service接口
* *
* @author gyt * @author tongran
* @date 2025-09-08 * @date 2025-09-08
*/ */
public interface IInitialHeartbeatListenLogService public interface IInitialHeartbeatListenLogService
@@ -8,7 +8,7 @@ import java.util.List;
/** /**
* Agent管理Service接口 * Agent管理Service接口
* *
* @author gyt * @author tongran
* @date 2025-09-15 * @date 2025-09-15
*/ */
public interface IRmAgentManagementService public interface IRmAgentManagementService
@@ -8,7 +8,7 @@ import java.util.List;
/** /**
* 客户端告警信息Service接口 * 客户端告警信息Service接口
* *
* @author gyt * @author tongran
* @date 2025-11-10 * @date 2025-11-10
*/ */
public interface IRmAlarmLogService public interface IRmAlarmLogService
@@ -8,7 +8,7 @@ import java.util.List;
/** /**
* 告警推送配置Service接口 * 告警推送配置Service接口
* *
* @author gyt * @author tongran
* @date 2025-11-11 * @date 2025-11-11
*/ */
public interface IRmAlarmPushConfigService public interface IRmAlarmPushConfigService
@@ -8,7 +8,7 @@ import java.util.List;
/** /**
* MTR客户端注册Service接口 * MTR客户端注册Service接口
* *
* @author gyt * @author tongran
* @date 2025-11-18 * @date 2025-11-18
*/ */
public interface IRmMtrClientRegistrationService public interface IRmMtrClientRegistrationService
@@ -7,7 +7,7 @@ import java.util.List;
/** /**
* mtr探测策略配置Service接口 * mtr探测策略配置Service接口
* *
* @author gyt * @author tongran
* @date 2025-11-18 * @date 2025-11-18
*/ */
public interface IRmMtrPolicyConfigService public interface IRmMtrPolicyConfigService
@@ -8,7 +8,7 @@ import java.util.Map;
/** /**
* 网络mtr探测结果Service接口 * 网络mtr探测结果Service接口
* *
* @author gyt * @author tongran
* @date 2025-11-20 * @date 2025-11-20
*/ */
public interface IRmMtrProbeResultService public interface IRmMtrProbeResultService

Some files were not shown because too many files have changed in this diff Show More