From 2c23b68d08b63024c4a640fde185d9d10e50c618 Mon Sep 17 00:00:00 2001 From: Jie Zheng <201507802@qq.com> Date: Tue, 14 Jan 2025 11:40:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=BB=93=E6=9E=84=EF=BC=8C=E7=A7=BB=E9=99=A4=E8=BF=90?= =?UTF-8?q?=E7=BB=B4=E7=AE=A1=E7=90=86=EF=BC=8C=E6=9B=B4=E6=96=B0Sql?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eladmin-web/src/api/mnt/app.js | 27 - eladmin-web/src/api/mnt/connect.js | 17 - eladmin-web/src/api/mnt/database.js | 35 - eladmin-web/src/api/mnt/deploy.js | 77 -- eladmin-web/src/api/mnt/deployHistory.js | 21 - eladmin-web/src/api/mnt/serverDeploy.js | 27 - eladmin-web/src/views/generator/config.vue | 4 +- eladmin-web/src/views/mnt/app/index.vue | 144 ---- .../src/views/mnt/database/execute.vue | 86 --- eladmin-web/src/views/mnt/database/index.vue | 148 ---- eladmin-web/src/views/mnt/deploy/deploy.vue | 190 ----- eladmin-web/src/views/mnt/deploy/index.vue | 229 ------ .../src/views/mnt/deploy/sysRestore.vue | 107 --- .../src/views/mnt/deployHistory/index.vue | 93 --- eladmin-web/src/views/mnt/server/index.vue | 136 ---- eladmin/README.md | 31 +- .../config/mybatis/MyMetaObjectHandler.java | 2 +- .../config/mybatis/MybatisPlusConfig.java | 2 +- .../config/webConfig/WebSocketConfig.java | 33 - .../java/me/zhengjie/domain/ColumnInfo.java | 2 +- .../java/me/zhengjie/domain/GenConfig.java | 2 +- .../resources/mapper/ColumnInfoMapper.xml | 2 +- .../main/resources/mapper/GenConfigMapper.xml | 2 +- .../resources/template/admin/Controller.ftl | 2 +- .../main/resources/template/admin/Entity.ftl | 2 +- .../main/resources/template/admin/Mapper.ftl | 2 +- .../template/admin/QueryCriteria.ftl | 2 +- .../main/resources/template/admin/Service.ftl | 2 +- .../resources/template/admin/ServiceImpl.ftl | 2 +- .../java/me/zhengjie/mapper/SysLogMapper.java | 2 +- eladmin/eladmin-system/pom.xml | 12 - .../me/zhengjie/modules/mnt/domain/App.java | 67 -- .../zhengjie/modules/mnt/domain/Database.java | 57 -- .../zhengjie/modules/mnt/domain/Deploy.java | 68 -- .../modules/mnt/domain/DeployHistory.java | 60 -- .../zhengjie/modules/mnt/domain/Server.java | 79 -- .../mnt/domain/dto/AppQueryCriteria.java | 35 - .../mnt/domain/dto/DatabaseQueryCriteria.java | 38 - .../dto/DeployHistoryQueryCriteria.java | 38 - .../mnt/domain/dto/DeployQueryCriteria.java | 35 - .../mnt/domain/dto/ServerQueryCriteria.java | 35 - .../modules/mnt/mapper/AppMapper.java | 39 - .../modules/mnt/mapper/DatabaseMapper.java | 39 - .../mnt/mapper/DeployHistoryMapper.java | 38 - .../modules/mnt/mapper/DeployMapper.java | 44 -- .../mnt/mapper/DeployServerMapper.java | 38 - .../modules/mnt/mapper/ServerMapper.java | 39 - .../modules/mnt/rest/AppController.java | 88 --- .../modules/mnt/rest/DatabaseController.java | 123 --- .../modules/mnt/rest/DeployController.java | 157 ---- .../mnt/rest/DeployHistoryController.java | 69 -- .../modules/mnt/rest/ServerController.java | 96 --- .../modules/mnt/service/AppService.java | 76 -- .../modules/mnt/service/DatabaseService.java | 83 -- .../mnt/service/DeployHistoryService.java | 70 -- .../modules/mnt/service/DeployService.java | 111 --- .../modules/mnt/service/ServerService.java | 91 --- .../mnt/service/impl/AppServiceImpl.java | 119 --- .../mnt/service/impl/DatabaseServiceImpl.java | 102 --- .../impl/DeployHistoryServiceImpl.java | 84 -- .../mnt/service/impl/DeployServiceImpl.java | 424 ----------- .../mnt/service/impl/ServerServiceImpl.java | 113 --- .../modules/mnt/util/DataTypeEnum.java | 140 ---- .../modules/mnt/util/ExecuteShellUtil.java | 101 --- .../modules/mnt/util/ScpClientUtil.java | 105 --- .../zhengjie/modules/mnt/util/SqlUtils.java | 201 ----- .../modules/mnt/websocket/MsgType.java | 31 - .../modules/mnt/websocket/SocketMsg.java | 33 - .../mnt/websocket/WebSocketServer.java | 134 ---- .../quartz/mapper/QuartzJobMapper.java | 2 +- .../quartz/mapper/QuartzLogMapper.java | 2 +- .../main/resources/config/application-dev.yml | 2 +- .../src/main/resources/logback.xml | 1 - .../main/resources/mapper/mnt/AppMapper.xml | 37 - .../resources/mapper/mnt/DatabaseMapper.xml | 36 - .../mapper/mnt/DeployHistoryMapper.xml | 39 - .../resources/mapper/mnt/DeployMapper.xml | 77 -- .../mapper/mnt/DeployServerMapper.xml | 33 - .../resources/mapper/mnt/ServerMapper.xml | 47 -- .../zhengjie/mapper/AliPayConfigMapper.java | 2 +- .../me/zhengjie/mapper/EmailConfigMapper.java | 2 +- .../zhengjie/mapper/LocalStorageMapper.java | 2 +- .../me/zhengjie/mapper/QiniuConfigMapper.java | 2 +- .../zhengjie/mapper/QiniuContentMapper.java | 2 +- eladmin/pom.xml | 7 + sql/eladmin.sql | 717 ++++++++---------- 86 files changed, 347 insertions(+), 5406 deletions(-) delete mode 100644 eladmin-web/src/api/mnt/app.js delete mode 100644 eladmin-web/src/api/mnt/connect.js delete mode 100644 eladmin-web/src/api/mnt/database.js delete mode 100644 eladmin-web/src/api/mnt/deploy.js delete mode 100644 eladmin-web/src/api/mnt/deployHistory.js delete mode 100644 eladmin-web/src/api/mnt/serverDeploy.js delete mode 100644 eladmin-web/src/views/mnt/app/index.vue delete mode 100644 eladmin-web/src/views/mnt/database/execute.vue delete mode 100644 eladmin-web/src/views/mnt/database/index.vue delete mode 100644 eladmin-web/src/views/mnt/deploy/deploy.vue delete mode 100644 eladmin-web/src/views/mnt/deploy/index.vue delete mode 100644 eladmin-web/src/views/mnt/deploy/sysRestore.vue delete mode 100644 eladmin-web/src/views/mnt/deployHistory/index.vue delete mode 100644 eladmin-web/src/views/mnt/server/index.vue delete mode 100644 eladmin/eladmin-common/src/main/java/me/zhengjie/config/webConfig/WebSocketConfig.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/App.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Database.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Deploy.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/DeployHistory.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Server.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/AppQueryCriteria.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DatabaseQueryCriteria.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DeployHistoryQueryCriteria.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DeployQueryCriteria.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/ServerQueryCriteria.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/AppMapper.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DatabaseMapper.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployHistoryMapper.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployMapper.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployServerMapper.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/ServerMapper.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/AppController.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DatabaseController.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployHistoryController.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/ServerController.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/AppService.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DatabaseService.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployHistoryService.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployService.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/ServerService.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerServiceImpl.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/DataTypeEnum.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ExecuteShellUtil.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ScpClientUtil.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/SqlUtils.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/MsgType.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/SocketMsg.java delete mode 100644 eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/WebSocketServer.java delete mode 100644 eladmin/eladmin-system/src/main/resources/mapper/mnt/AppMapper.xml delete mode 100644 eladmin/eladmin-system/src/main/resources/mapper/mnt/DatabaseMapper.xml delete mode 100644 eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployHistoryMapper.xml delete mode 100644 eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployMapper.xml delete mode 100644 eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployServerMapper.xml delete mode 100644 eladmin/eladmin-system/src/main/resources/mapper/mnt/ServerMapper.xml diff --git a/eladmin-web/src/api/mnt/app.js b/eladmin-web/src/api/mnt/app.js deleted file mode 100644 index 2a27054..0000000 --- a/eladmin-web/src/api/mnt/app.js +++ /dev/null @@ -1,27 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/app', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/app', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/app', - method: 'put', - data - }) -} - -export default { add, edit, del } diff --git a/eladmin-web/src/api/mnt/connect.js b/eladmin-web/src/api/mnt/connect.js deleted file mode 100644 index 1bbe90b..0000000 --- a/eladmin-web/src/api/mnt/connect.js +++ /dev/null @@ -1,17 +0,0 @@ -import request from '@/utils/request' - -export function testDbConnect(data) { - return request({ - url: 'api/database/testConnect', - method: 'post', - data - }) -} - -export function testServerConnect(data) { - return request({ - url: 'api/serverDeploy/testConnect', - method: 'post', - data - }) -} diff --git a/eladmin-web/src/api/mnt/database.js b/eladmin-web/src/api/mnt/database.js deleted file mode 100644 index 91797fb..0000000 --- a/eladmin-web/src/api/mnt/database.js +++ /dev/null @@ -1,35 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/database', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/database', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/database', - method: 'put', - data - }) -} - -export function testDbConnection(data) { - return request({ - url: 'api/database/testConnect', - method: 'post', - data - }) -} - -export default { add, edit, del, testDbConnection } diff --git a/eladmin-web/src/api/mnt/deploy.js b/eladmin-web/src/api/mnt/deploy.js deleted file mode 100644 index c1475ea..0000000 --- a/eladmin-web/src/api/mnt/deploy.js +++ /dev/null @@ -1,77 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/deploy', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/deploy', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/deploy', - method: 'put', - data - }) -} - -export function getApps() { - return request({ - url: 'api/app', - method: 'get' - }) -} - -export function getServers() { - return request({ - url: 'api/serverDeploy', - method: 'get' - }) -} - -/** - * 启动服务 - * @param data 选中行 - */ -export function startServer(data) { - return request({ - url: 'api/deploy/startServer', - method: 'post', - data - }) -} - -/** - * 停止服务 - * @param data 选中行 - */ -export function stopServer(data) { - return request({ - url: 'api/deploy/stopServer', - method: 'post', - data - }) -} - -/** - * 停止服务 - * @param data 选中行 - */ -export function serverStatus(data) { - return request({ - url: 'api/deploy/serverStatus', - method: 'post', - data - }) -} - -export default { add, edit, del, stopServer, serverStatus, startServer, getServers, getApps } diff --git a/eladmin-web/src/api/mnt/deployHistory.js b/eladmin-web/src/api/mnt/deployHistory.js deleted file mode 100644 index 30335e4..0000000 --- a/eladmin-web/src/api/mnt/deployHistory.js +++ /dev/null @@ -1,21 +0,0 @@ -import request from '@/utils/request' - -export function del(ids) { - return request({ - url: 'api/deployHistory', - method: 'delete', - data: ids - }) -} - -/** - * 版本回退 - * @param data 选中行 - */ -export function reducte(data) { - return request({ - url: 'api/deploy/serverReduction', - method: 'post', - data - }) -} diff --git a/eladmin-web/src/api/mnt/serverDeploy.js b/eladmin-web/src/api/mnt/serverDeploy.js deleted file mode 100644 index e796114..0000000 --- a/eladmin-web/src/api/mnt/serverDeploy.js +++ /dev/null @@ -1,27 +0,0 @@ -import request from '@/utils/request' - -export function add(data) { - return request({ - url: 'api/serverDeploy', - method: 'post', - data - }) -} - -export function del(ids) { - return request({ - url: 'api/serverDeploy', - method: 'delete', - data: ids - }) -} - -export function edit(data) { - return request({ - url: 'api/serverDeploy', - method: 'put', - data - }) -} - -export default { add, edit, del } diff --git a/eladmin-web/src/views/generator/config.vue b/eladmin-web/src/views/generator/config.vue index 8a17e4e..4428da2 100644 --- a/eladmin-web/src/views/generator/config.vue +++ b/eladmin-web/src/views/generator/config.vue @@ -149,9 +149,9 @@ 模块的名称,请选择项目中已存在的模块 - + - 项目包的名称,生成的代码放到哪个包里面 + 项目包的名称,如:me.zhengjie diff --git a/eladmin-web/src/views/mnt/app/index.vue b/eladmin-web/src/views/mnt/app/index.vue deleted file mode 100644 index ddb8fb8..0000000 --- a/eladmin-web/src/views/mnt/app/index.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - - - diff --git a/eladmin-web/src/views/mnt/database/execute.vue b/eladmin-web/src/views/mnt/database/execute.vue deleted file mode 100644 index 94622fc..0000000 --- a/eladmin-web/src/views/mnt/database/execute.vue +++ /dev/null @@ -1,86 +0,0 @@ - - - - - diff --git a/eladmin-web/src/views/mnt/database/index.vue b/eladmin-web/src/views/mnt/database/index.vue deleted file mode 100644 index 03d44a6..0000000 --- a/eladmin-web/src/views/mnt/database/index.vue +++ /dev/null @@ -1,148 +0,0 @@ - - - - - diff --git a/eladmin-web/src/views/mnt/deploy/deploy.vue b/eladmin-web/src/views/mnt/deploy/deploy.vue deleted file mode 100644 index d84a269..0000000 --- a/eladmin-web/src/views/mnt/deploy/deploy.vue +++ /dev/null @@ -1,190 +0,0 @@ - - - - - diff --git a/eladmin-web/src/views/mnt/deploy/index.vue b/eladmin-web/src/views/mnt/deploy/index.vue deleted file mode 100644 index e2ab8a7..0000000 --- a/eladmin-web/src/views/mnt/deploy/index.vue +++ /dev/null @@ -1,229 +0,0 @@ - - - - - diff --git a/eladmin-web/src/views/mnt/deploy/sysRestore.vue b/eladmin-web/src/views/mnt/deploy/sysRestore.vue deleted file mode 100644 index 42bf4eb..0000000 --- a/eladmin-web/src/views/mnt/deploy/sysRestore.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - - - diff --git a/eladmin-web/src/views/mnt/deployHistory/index.vue b/eladmin-web/src/views/mnt/deployHistory/index.vue deleted file mode 100644 index c4f9728..0000000 --- a/eladmin-web/src/views/mnt/deployHistory/index.vue +++ /dev/null @@ -1,93 +0,0 @@ - - - - - diff --git a/eladmin-web/src/views/mnt/server/index.vue b/eladmin-web/src/views/mnt/server/index.vue deleted file mode 100644 index 7cb6a95..0000000 --- a/eladmin-web/src/views/mnt/server/index.vue +++ /dev/null @@ -1,136 +0,0 @@ - - - - - diff --git a/eladmin/README.md b/eladmin/README.md index cd89236..b6feff0 100644 --- a/eladmin/README.md +++ b/eladmin/README.md @@ -1,7 +1,7 @@

ELADMIN 后台管理系统

#### 项目简介 -一个基于 Spring Boot 2.6.4 、 Mybatis-Plus、 JWT、Spring Security、Redis、Vue的前后端分离的后台管理系统 +一个基于 Spring Boot 2.6.6 、 Mybatis-Plus、 JWT、Spring Security、Redis、Vue的前后端分离的后台管理系统 **开发文档:** [https://eladmin.vip](https://eladmin.vip) @@ -33,7 +33,6 @@ - 对一些常用地前端组件封装:表格数据请求、数据字典等 - 前后端统一异常拦截处理,统一输出异常,避免繁琐的判断 - 支持在线用户管理与服务器性能监控,支持限制单用户登录 -- 支持运维管理,可方便地对远程服务器的应用进行部署与管理 #### 系统功能 - 用户管理:提供用户的相关配置,新增用户后,默认密码为123456 @@ -50,7 +49,6 @@ - 七牛云存储:可同步七牛云存储的数据到系统,无需登录七牛云直接操作云数据 - 支付宝支付:整合了支付宝支付并且提供了测试账号,可自行测试 - 服务监控:监控服务器的负载情况 -- 运维管理:一键部署你的应用 #### 项目结构 项目采用按功能分模块的开发方式,结构如下 @@ -72,15 +70,30 @@ - annotation 为系统自定义注解 - aspect 自定义注解的切面 - base 提供了 Entity 基类 - - config 自定义权限实现、redis配置、swagger配置、Rsa配置等 + - config 项目通用配置 + - Mybatis-Plus 配置 + - Web配置跨域与静态资源映射、Swagger配置,文件上传临时路径配置 + - Redis配置,Redission配置, 异步线程池配置 + - 权限拦截配置:AuthorityConfig、Druid 删除广告配置 - exception 项目统一异常的处理 - - utils 系统通用工具类 + - utils 系统通用工具类,列举一些常用的工具类 + - BigDecimaUtils 金额计算工具类 + - RequestHolder 请求工具类 + - SecurityUtils 安全工具类 + - StringUtils 字符串工具类 + - SpringBeanHolder Spring Bean工具类 + - RedisUtils Redis工具类 + - EncryptUtils 加密工具类 + - FileUtil 文件工具类 - eladmin-system 系统核心模块(系统启动入口) - - config 配置跨域与静态资源,与数据权限 - - thread 线程池相关 - - modules 系统相关模块(登录授权、系统监控、定时任务、运维管理等) + - sysrunner 程序启动后处理数据 + - modules 系统相关模块(登录授权、系统监控、定时任务、系统模块) - eladmin-logging 系统日志模块 - eladmin-tools 系统第三方工具模块 + - email 邮件工具 + - qiniu 七牛云存储工具 + - alipay 支付宝支付工具 + - local-storage 本地存储工具 - eladmin-generator 系统代码生成模块 ``` @@ -90,8 +103,6 @@ - 感谢 [Moxun](https://github.com/moxun1639) 大佬提供的前端 Curd 通用组件 -- 感谢 [zhy6599](https://gitee.com/zhy6599) 大佬提供的后端运维管理相关功能 - - 感谢 [j.yao.SUSE](https://github.com/everhopingandwaiting) 大佬提供的匿名接口与Redis限流等功能 #### 项目捐赠 diff --git a/eladmin/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MyMetaObjectHandler.java b/eladmin/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MyMetaObjectHandler.java index 5237eef..f21c50f 100644 --- a/eladmin/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MyMetaObjectHandler.java +++ b/eladmin/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MyMetaObjectHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MybatisPlusConfig.java b/eladmin/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MybatisPlusConfig.java index 3730f7d..9753d6a 100644 --- a/eladmin/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MybatisPlusConfig.java +++ b/eladmin/eladmin-common/src/main/java/me/zhengjie/config/mybatis/MybatisPlusConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-common/src/main/java/me/zhengjie/config/webConfig/WebSocketConfig.java b/eladmin/eladmin-common/src/main/java/me/zhengjie/config/webConfig/WebSocketConfig.java deleted file mode 100644 index 1a2cdd7..0000000 --- a/eladmin/eladmin-common/src/main/java/me/zhengjie/config/webConfig/WebSocketConfig.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.config.webConfig; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.socket.server.standard.ServerEndpointExporter; - -/** - * @author ZhangHouYing - * @date 2019-08-24 15:44 - */ -@Configuration -public class WebSocketConfig { - - @Bean - public ServerEndpointExporter serverEndpointExporter() { - return new ServerEndpointExporter(); - } -} diff --git a/eladmin/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java b/eladmin/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java index 78e355e..158fa65 100644 --- a/eladmin/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java +++ b/eladmin/eladmin-generator/src/main/java/me/zhengjie/domain/ColumnInfo.java @@ -32,7 +32,7 @@ import java.io.Serializable; @Getter @Setter @NoArgsConstructor -@TableName("code_column_config") +@TableName("code_column") public class ColumnInfo implements Serializable { @ApiModelProperty(value = "ID", hidden = true) diff --git a/eladmin/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java b/eladmin/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java index 056bdd0..2b9a835 100644 --- a/eladmin/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java +++ b/eladmin/eladmin-generator/src/main/java/me/zhengjie/domain/GenConfig.java @@ -34,7 +34,7 @@ import java.io.Serializable; @Getter @Setter @NoArgsConstructor -@TableName("code_gen_config") +@TableName("code_config") public class GenConfig implements Serializable { public GenConfig(String tableName) { diff --git a/eladmin/eladmin-generator/src/main/resources/mapper/ColumnInfoMapper.xml b/eladmin/eladmin-generator/src/main/resources/mapper/ColumnInfoMapper.xml index c9accd7..ff7feae 100644 --- a/eladmin/eladmin-generator/src/main/resources/mapper/ColumnInfoMapper.xml +++ b/eladmin/eladmin-generator/src/main/resources/mapper/ColumnInfoMapper.xml @@ -32,7 +32,7 @@ diff --git a/eladmin/eladmin-generator/src/main/resources/mapper/GenConfigMapper.xml b/eladmin/eladmin-generator/src/main/resources/mapper/GenConfigMapper.xml index 55926b1..6b8fbae 100644 --- a/eladmin/eladmin-generator/src/main/resources/mapper/GenConfigMapper.xml +++ b/eladmin/eladmin-generator/src/main/resources/mapper/GenConfigMapper.xml @@ -21,7 +21,7 @@ \ No newline at end of file diff --git a/eladmin/eladmin-generator/src/main/resources/template/admin/Controller.ftl b/eladmin/eladmin-generator/src/main/resources/template/admin/Controller.ftl index 9e064bf..9a37c6f 100644 --- a/eladmin/eladmin-generator/src/main/resources/template/admin/Controller.ftl +++ b/eladmin/eladmin-generator/src/main/resources/template/admin/Controller.ftl @@ -1,5 +1,5 @@ /* -* Copyright 2019-2023 Zheng Jie +* Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-generator/src/main/resources/template/admin/Entity.ftl b/eladmin/eladmin-generator/src/main/resources/template/admin/Entity.ftl index 8b7a9af..42c8a43 100644 --- a/eladmin/eladmin-generator/src/main/resources/template/admin/Entity.ftl +++ b/eladmin/eladmin-generator/src/main/resources/template/admin/Entity.ftl @@ -1,5 +1,5 @@ /* -* Copyright 2019-2023 Zheng Jie +* Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-generator/src/main/resources/template/admin/Mapper.ftl b/eladmin/eladmin-generator/src/main/resources/template/admin/Mapper.ftl index 7e220cb..8f90793 100644 --- a/eladmin/eladmin-generator/src/main/resources/template/admin/Mapper.ftl +++ b/eladmin/eladmin-generator/src/main/resources/template/admin/Mapper.ftl @@ -1,5 +1,5 @@ /* -* Copyright 2019-2023 Zheng Jie +* Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-generator/src/main/resources/template/admin/QueryCriteria.ftl b/eladmin/eladmin-generator/src/main/resources/template/admin/QueryCriteria.ftl index b9aaab1..01cae97 100644 --- a/eladmin/eladmin-generator/src/main/resources/template/admin/QueryCriteria.ftl +++ b/eladmin/eladmin-generator/src/main/resources/template/admin/QueryCriteria.ftl @@ -1,5 +1,5 @@ /* -* Copyright 2019-2023 Zheng Jie +* Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-generator/src/main/resources/template/admin/Service.ftl b/eladmin/eladmin-generator/src/main/resources/template/admin/Service.ftl index b8cb69f..d8d994c 100644 --- a/eladmin/eladmin-generator/src/main/resources/template/admin/Service.ftl +++ b/eladmin/eladmin-generator/src/main/resources/template/admin/Service.ftl @@ -1,5 +1,5 @@ /* -* Copyright 2019-2023 Zheng Jie +* Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-generator/src/main/resources/template/admin/ServiceImpl.ftl b/eladmin/eladmin-generator/src/main/resources/template/admin/ServiceImpl.ftl index ac691b8..512815b 100644 --- a/eladmin/eladmin-generator/src/main/resources/template/admin/ServiceImpl.ftl +++ b/eladmin/eladmin-generator/src/main/resources/template/admin/ServiceImpl.ftl @@ -1,5 +1,5 @@ /* -* Copyright 2019-2023 Zheng Jie +* Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-logging/src/main/java/me/zhengjie/mapper/SysLogMapper.java b/eladmin/eladmin-logging/src/main/java/me/zhengjie/mapper/SysLogMapper.java index 42da054..65080b8 100644 --- a/eladmin/eladmin-logging/src/main/java/me/zhengjie/mapper/SysLogMapper.java +++ b/eladmin/eladmin-logging/src/main/java/me/zhengjie/mapper/SysLogMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-system/pom.xml b/eladmin/eladmin-system/pom.xml index 6dd6e2b..0024510 100644 --- a/eladmin/eladmin-system/pom.xml +++ b/eladmin/eladmin-system/pom.xml @@ -62,18 +62,6 @@ ${jjwt.version} - - - ch.ethz.ganymed - ganymed-ssh2 - build210 - - - com.jcraft - jsch - 0.1.55 - - com.github.oshi diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/App.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/App.java deleted file mode 100644 index 4d83cbf..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/App.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModelProperty; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Getter; -import lombok.Setter; -import me.zhengjie.base.BaseEntity; -import java.io.Serializable; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Getter -@Setter -@TableName("mnt_app") -public class App extends BaseEntity implements Serializable { - - - @TableId(value = "app_id", type = IdType.AUTO) - @ApiModelProperty(value = "ID", hidden = true) - private Long id; - - @ApiModelProperty(value = "名称") - private String name; - - @ApiModelProperty(value = "端口") - private int port; - - @ApiModelProperty(value = "上传路径") - private String uploadPath; - - @ApiModelProperty(value = "部署路径") - private String deployPath; - - @ApiModelProperty(value = "备份路径") - private String backupPath; - - @ApiModelProperty(value = "启动脚本") - private String startScript; - - @ApiModelProperty(value = "部署脚本") - private String deployScript; - - public void copy(App source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Database.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Database.java deleted file mode 100644 index fd4a42b..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Database.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModelProperty; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Getter; -import lombok.Setter; -import me.zhengjie.base.BaseEntity; -import java.io.Serializable; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Getter -@Setter -@TableName("mnt_database") -public class Database extends BaseEntity implements Serializable { - - @TableId(value = "db_id", type = IdType.AUTO) - @ApiModelProperty(value = "ID", hidden = true) - private String id; - - @ApiModelProperty(value = "数据库名称") - private String name; - - @ApiModelProperty(value = "数据库连接地址") - private String jdbcUrl; - - @ApiModelProperty(value = "数据库密码") - private String pwd; - - @ApiModelProperty(value = "用户名") - private String userName; - - public void copy(Database source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Deploy.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Deploy.java deleted file mode 100644 index db16437..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Deploy.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain; - -import cn.hutool.core.collection.CollectionUtil; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModelProperty; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Getter; -import lombok.Setter; -import me.zhengjie.base.BaseEntity; -import java.io.Serializable; -import java.util.Set; -import java.util.stream.Collectors; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ - -@Getter -@Setter -@TableName("mnt_deploy") -public class Deploy extends BaseEntity implements Serializable { - - @TableId(value = "deploy_id", type = IdType.AUTO) - @ApiModelProperty(value = "ID", hidden = true) - private Long id; - - @ApiModelProperty(value = "应用编号") - private Long appId; - - @TableField(exist = false) - @ApiModelProperty(name = "服务器", hidden = true) - private Set deploys; - - @TableField(exist = false) - @ApiModelProperty(value = "应用") - private App app; - - public void copy(Deploy source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } - - public String getServers() { - if(CollectionUtil.isNotEmpty(deploys)){ - return deploys.stream().map(Server::getName).collect(Collectors.joining(",")); - } - return ""; - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/DeployHistory.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/DeployHistory.java deleted file mode 100644 index 09c02be..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/DeployHistory.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModelProperty; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Getter; -import lombok.Setter; -import java.io.Serializable; -import java.sql.Timestamp; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Getter -@Setter -@TableName("mnt_deploy_history") -public class DeployHistory implements Serializable { - - @TableId(value = "history_id", type = IdType.AUTO) - @ApiModelProperty(value = "ID", hidden = true) - private String id; - - @ApiModelProperty(value = "应用名称") - private String appName; - - @ApiModelProperty(value = "IP") - private String ip; - - @ApiModelProperty(value = "部署时间") - private Timestamp deployDate; - - @ApiModelProperty(value = "部署者") - private String deployUser; - - @ApiModelProperty(value = "部署ID") - private Long deployId; - - public void copy(DeployHistory source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Server.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Server.java deleted file mode 100644 index 841b8c4..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/Server.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModelProperty; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Getter; -import lombok.Setter; -import me.zhengjie.base.BaseEntity; -import java.io.Serializable; -import java.util.Objects; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Getter -@Setter -@TableName("mnt_server") -public class Server extends BaseEntity implements Serializable { - - @TableId(value = "server_id", type = IdType.AUTO) - @ApiModelProperty(value = "ID", hidden = true) - private Long id; - - @ApiModelProperty(value = "服务器名称") - private String name; - - @ApiModelProperty(value = "IP") - private String ip; - - @ApiModelProperty(value = "端口") - private Integer port; - - @ApiModelProperty(value = "账号") - private String account; - - @ApiModelProperty(value = "密码") - private String password; - - public void copy(Server source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Server that = (Server) o; - return Objects.equals(id, that.id) && - Objects.equals(name, that.name); - } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/AppQueryCriteria.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/AppQueryCriteria.java deleted file mode 100644 index e236b0f..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/AppQueryCriteria.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class AppQueryCriteria{ - - @ApiModelProperty(value = "名称") - private String name; - - @ApiModelProperty(value = "创建时间") - private List createTime; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DatabaseQueryCriteria.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DatabaseQueryCriteria.java deleted file mode 100644 index 5c0e732..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DatabaseQueryCriteria.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class DatabaseQueryCriteria{ - - @ApiModelProperty(value = "名称") - private String name; - - @ApiModelProperty(value = "数据源") - private String jdbcUrl; - - @ApiModelProperty(value = "创建时间") - private List createTime; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DeployHistoryQueryCriteria.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DeployHistoryQueryCriteria.java deleted file mode 100644 index 4e9f241..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DeployHistoryQueryCriteria.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class DeployHistoryQueryCriteria{ - - @ApiModelProperty(value = "模糊查询") - private String blurry; - - @ApiModelProperty(value = "部署ID") - private Long deployId; - - @ApiModelProperty(value = "部署时间") - private List deployDate; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DeployQueryCriteria.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DeployQueryCriteria.java deleted file mode 100644 index e8b4daf..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/DeployQueryCriteria.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class DeployQueryCriteria{ - - @ApiModelProperty(value = "应用名称") - private String appName; - - @ApiModelProperty(value = "创建时间") - private List createTime; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/ServerQueryCriteria.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/ServerQueryCriteria.java deleted file mode 100644 index 4f89c33..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/domain/dto/ServerQueryCriteria.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.domain.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class ServerQueryCriteria { - - @ApiModelProperty(value = "模糊查询") - private String blurry; - - @ApiModelProperty(value = "创建时间") - private List createTime; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/AppMapper.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/AppMapper.java deleted file mode 100644 index 175156f..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/AppMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2019-2023 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import me.zhengjie.modules.mnt.domain.App; -import me.zhengjie.modules.mnt.domain.dto.AppQueryCriteria; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @author Zheng Jie - * @description - * @date 2023-06-12 - **/ -@Mapper -public interface AppMapper extends BaseMapper { - - IPage queryAll(@Param("criteria") AppQueryCriteria criteria, Page page); - - List queryAll(@Param("criteria") AppQueryCriteria criteria); -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DatabaseMapper.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DatabaseMapper.java deleted file mode 100644 index 4a480e0..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DatabaseMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2019-2023 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import me.zhengjie.modules.mnt.domain.Database; -import me.zhengjie.modules.mnt.domain.dto.DatabaseQueryCriteria; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @author Zheng Jie - * @description - * @date 2023-06-12 - **/ -@Mapper -public interface DatabaseMapper extends BaseMapper { - - IPage findAll(@Param("criteria") DatabaseQueryCriteria criteria, Page page); - - List findAll(@Param("criteria") DatabaseQueryCriteria criteria); -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployHistoryMapper.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployHistoryMapper.java deleted file mode 100644 index d475982..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployHistoryMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2019-2023 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import me.zhengjie.modules.mnt.domain.DeployHistory; -import me.zhengjie.modules.mnt.domain.dto.DeployHistoryQueryCriteria; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import java.util.List; - -/** - * @author Zheng Jie - * @description - * @date 2023-06-12 - **/ -@Mapper -public interface DeployHistoryMapper extends BaseMapper { - - IPage findAll(@Param("criteria") DeployHistoryQueryCriteria criteria, Page page); - - List findAll(@Param("criteria") DeployHistoryQueryCriteria criteria); -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployMapper.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployMapper.java deleted file mode 100644 index 8baa5cb..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployMapper.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2019-2023 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import me.zhengjie.modules.mnt.domain.Deploy; -import me.zhengjie.modules.mnt.domain.dto.DeployQueryCriteria; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import java.util.List; -import java.util.Set; - -/** - * @author Zheng Jie - * @description - * @date 2023-06-12 - **/ -@Mapper -public interface DeployMapper extends BaseMapper { - - List findAll(@Param("criteria") DeployQueryCriteria criteria); - - IPage findAll(@Param("criteria") DeployQueryCriteria criteria, Page page); - - Set getIdByAppIds(@Param("appIds") Set appIds); - - Deploy getDeployById(@Param("deployId") Long deployId); - -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployServerMapper.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployServerMapper.java deleted file mode 100644 index a65cd57..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/DeployServerMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2019-2023 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.mapper; - -import me.zhengjie.modules.mnt.domain.Server; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import java.util.Set; - -/** - * @author Zheng Jie - * @description - * @date 2023-06-12 - **/ -@Mapper -public interface DeployServerMapper { - - void insertData(@Param("deployId") Long deployId, @Param("servers") Set servers); - - void deleteByDeployId(@Param("deployId") Long deployId); - - void deleteByDeployIds(@Param("deployIds") Set deployIds); - - void deleteByServerIds(@Param("serverIds") Set serverIds); -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/ServerMapper.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/ServerMapper.java deleted file mode 100644 index d878b07..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/mapper/ServerMapper.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2019-2023 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import me.zhengjie.modules.mnt.domain.Server; -import me.zhengjie.modules.mnt.domain.dto.ServerQueryCriteria; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import java.util.List; - -/** - * @author Zheng Jie - * @description - * @date 2023-06-12 - **/ -@Mapper -public interface ServerMapper extends BaseMapper { - Server findByIp(@Param("ip") String ip); - - IPage findAll(@Param("criteria") ServerQueryCriteria criteria, Page page); - - List findAll(@Param("criteria") ServerQueryCriteria criteria); -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/AppController.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/AppController.java deleted file mode 100644 index eda4450..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/AppController.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.rest; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import me.zhengjie.annotation.Log; -import me.zhengjie.modules.mnt.domain.App; -import me.zhengjie.modules.mnt.service.AppService; -import me.zhengjie.modules.mnt.domain.dto.AppQueryCriteria; -import me.zhengjie.utils.PageResult; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@RestController -@RequiredArgsConstructor -@Api(tags = "运维:应用管理") -@RequestMapping("/api/app") -public class AppController { - - private final AppService appService; - - @ApiOperation("导出应用数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('app:list')") - public void exportApp(HttpServletResponse response, AppQueryCriteria criteria) throws IOException { - appService.download(appService.queryAll(criteria), response); - } - - @ApiOperation(value = "查询应用") - @GetMapping - @PreAuthorize("@el.check('app:list')") - public ResponseEntity> queryApp(AppQueryCriteria criteria, Page page){ - return new ResponseEntity<>(appService.queryAll(criteria, page),HttpStatus.OK); - } - - @Log("新增应用") - @ApiOperation(value = "新增应用") - @PostMapping - @PreAuthorize("@el.check('app:add')") - public ResponseEntity createApp(@Validated @RequestBody App resources){ - appService.create(resources); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @Log("修改应用") - @ApiOperation(value = "修改应用") - @PutMapping - @PreAuthorize("@el.check('app:edit')") - public ResponseEntity updateApp(@Validated @RequestBody App resources){ - appService.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除应用") - @ApiOperation(value = "删除应用") - @DeleteMapping - @PreAuthorize("@el.check('app:del')") - public ResponseEntity deleteApp(@RequestBody Set ids){ - appService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DatabaseController.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DatabaseController.java deleted file mode 100644 index dfca679..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DatabaseController.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.rest; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import me.zhengjie.annotation.Log; -import me.zhengjie.exception.BadRequestException; -import me.zhengjie.modules.mnt.domain.Database; -import me.zhengjie.modules.mnt.service.DatabaseService; -import me.zhengjie.modules.mnt.domain.dto.DatabaseQueryCriteria; -import me.zhengjie.modules.mnt.util.SqlUtils; -import me.zhengjie.utils.FileUtil; -import me.zhengjie.utils.PageResult; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Api(tags = "运维:数据库管理") -@RestController -@RequiredArgsConstructor -@RequestMapping("/api/database") -public class DatabaseController { - - private final String fileSavePath = FileUtil.getTmpDirPath()+"/"; - private final DatabaseService databaseService; - - @ApiOperation("导出数据库数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('database:list')") - public void exportDatabase(HttpServletResponse response, DatabaseQueryCriteria criteria) throws IOException { - databaseService.download(databaseService.queryAll(criteria), response); - } - - @ApiOperation(value = "查询数据库") - @GetMapping - @PreAuthorize("@el.check('database:list')") - public ResponseEntity> queryDatabase(DatabaseQueryCriteria criteria, Page page){ - return new ResponseEntity<>(databaseService.queryAll(criteria, page),HttpStatus.OK); - } - - @Log("新增数据库") - @ApiOperation(value = "新增数据库") - @PostMapping - @PreAuthorize("@el.check('database:add')") - public ResponseEntity createDatabase(@Validated @RequestBody Database resources){ - databaseService.create(resources); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @Log("修改数据库") - @ApiOperation(value = "修改数据库") - @PutMapping - @PreAuthorize("@el.check('database:edit')") - public ResponseEntity updateDatabase(@Validated @RequestBody Database resources){ - databaseService.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除数据库") - @ApiOperation(value = "删除数据库") - @DeleteMapping - @PreAuthorize("@el.check('database:del')") - public ResponseEntity deleteDatabase(@RequestBody Set ids){ - databaseService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @Log("测试数据库链接") - @ApiOperation(value = "测试数据库链接") - @PostMapping("/testConnect") - @PreAuthorize("@el.check('database:testConnect')") - public ResponseEntity testConnect(@Validated @RequestBody Database resources){ - return new ResponseEntity<>(databaseService.testConnection(resources),HttpStatus.CREATED); - } - - @Log("执行SQL脚本") - @ApiOperation(value = "执行SQL脚本") - @PostMapping(value = "/upload") - @PreAuthorize("@el.check('database:add')") - public ResponseEntity uploadDatabase(@RequestBody MultipartFile file, HttpServletRequest request)throws Exception{ - String id = request.getParameter("id"); - Database database = databaseService.getById(id); - String fileName; - if(database != null){ - fileName = file.getOriginalFilename(); - File executeFile = new File(fileSavePath+fileName); - FileUtil.del(executeFile); - file.transferTo(executeFile); - String result = SqlUtils.executeFile(database.getJdbcUrl(), database.getUserName(), database.getPwd(), executeFile); - return new ResponseEntity<>(result,HttpStatus.OK); - }else{ - throw new BadRequestException("Database not exist"); - } - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java deleted file mode 100644 index 042f5f6..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployController.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.rest; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import me.zhengjie.annotation.Log; -import me.zhengjie.modules.mnt.domain.Deploy; -import me.zhengjie.modules.mnt.domain.DeployHistory; -import me.zhengjie.modules.mnt.service.DeployService; -import me.zhengjie.modules.mnt.domain.dto.DeployQueryCriteria; -import me.zhengjie.utils.FileUtil; -import me.zhengjie.utils.PageResult; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@RestController -@Api(tags = "运维:部署管理") -@RequiredArgsConstructor -@RequestMapping("/api/deploy") -public class DeployController { - - private final String fileSavePath = FileUtil.getTmpDirPath()+"/"; - private final DeployService deployService; - - @ApiOperation("导出部署数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('database:list')") - public void exportDeployData(HttpServletResponse response, DeployQueryCriteria criteria) throws IOException { - deployService.download(deployService.queryAll(criteria), response); - } - - @ApiOperation(value = "查询部署") - @GetMapping - @PreAuthorize("@el.check('deploy:list')") - public ResponseEntity> queryDeployData(DeployQueryCriteria criteria, Page page){ - return new ResponseEntity<>(deployService.queryAll(criteria, page),HttpStatus.OK); - } - - @Log("新增部署") - @ApiOperation(value = "新增部署") - @PostMapping - @PreAuthorize("@el.check('deploy:add')") - public ResponseEntity createDeploy(@Validated @RequestBody Deploy resources){ - deployService.create(resources); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @Log("修改部署") - @ApiOperation(value = "修改部署") - @PutMapping - @PreAuthorize("@el.check('deploy:edit')") - public ResponseEntity updateDeploy(@Validated @RequestBody Deploy resources){ - deployService.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除部署") - @ApiOperation(value = "删除部署") - @DeleteMapping - @PreAuthorize("@el.check('deploy:del')") - public ResponseEntity deleteDeploy(@RequestBody Set ids){ - deployService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @Log("上传文件部署") - @ApiOperation(value = "上传文件部署") - @PostMapping(value = "/upload") - @PreAuthorize("@el.check('deploy:edit')") - public ResponseEntity uploadDeploy(@RequestBody MultipartFile file, HttpServletRequest request)throws Exception{ - Long id = Long.valueOf(request.getParameter("id")); - String fileName = ""; - if(file != null){ - fileName = file.getOriginalFilename(); - File deployFile = new File(fileSavePath+fileName); - FileUtil.del(deployFile); - file.transferTo(deployFile); - //文件下一步要根据文件名字来 - deployService.deploy(fileSavePath+fileName ,id); - }else{ - System.out.println("没有找到相对应的文件"); - } - System.out.println("文件上传的原名称为:"+ Objects.requireNonNull(file).getOriginalFilename()); - Map map = new HashMap<>(2); - map.put("errno",0); - map.put("id",fileName); - return new ResponseEntity<>(map,HttpStatus.OK); - } - - @Log("系统还原") - @ApiOperation(value = "系统还原") - @PostMapping(value = "/serverReduction") - @PreAuthorize("@el.check('deploy:edit')") - public ResponseEntity serverReduction(@Validated @RequestBody DeployHistory resources){ - String result = deployService.serverReduction(resources); - return new ResponseEntity<>(result,HttpStatus.OK); - } - - @Log("服务运行状态") - @ApiOperation(value = "服务运行状态") - @PostMapping(value = "/serverStatus") - @PreAuthorize("@el.check('deploy:edit')") - public ResponseEntity serverStatus(@Validated @RequestBody Deploy resources){ - String result = deployService.serverStatus(resources); - return new ResponseEntity<>(result,HttpStatus.OK); - } - - @Log("启动服务") - @ApiOperation(value = "启动服务") - @PostMapping(value = "/startServer") - @PreAuthorize("@el.check('deploy:edit')") - public ResponseEntity startServer(@Validated @RequestBody Deploy resources){ - String result = deployService.startServer(resources); - return new ResponseEntity<>(result,HttpStatus.OK); - } - - @Log("停止服务") - @ApiOperation(value = "停止服务") - @PostMapping(value = "/stopServer") - @PreAuthorize("@el.check('deploy:edit')") - public ResponseEntity stopServer(@Validated @RequestBody Deploy resources){ - String result = deployService.stopServer(resources); - return new ResponseEntity<>(result,HttpStatus.OK); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployHistoryController.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployHistoryController.java deleted file mode 100644 index c43845e..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/DeployHistoryController.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.rest; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import me.zhengjie.annotation.Log; -import me.zhengjie.modules.mnt.domain.DeployHistory; -import me.zhengjie.modules.mnt.service.DeployHistoryService; -import me.zhengjie.modules.mnt.domain.dto.DeployHistoryQueryCriteria; -import me.zhengjie.utils.PageResult; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@RestController -@RequiredArgsConstructor -@Api(tags = "运维:部署历史管理") -@RequestMapping("/api/deployHistory") -public class DeployHistoryController { - - private final DeployHistoryService deployhistoryService; - - @ApiOperation("导出部署历史数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('deployHistory:list')") - public void exportDeployHistory(HttpServletResponse response, DeployHistoryQueryCriteria criteria) throws IOException { - deployhistoryService.download(deployhistoryService.queryAll(criteria), response); - } - - @ApiOperation(value = "查询部署历史") - @GetMapping - @PreAuthorize("@el.check('deployHistory:list')") - public ResponseEntity> queryDeployHistory(DeployHistoryQueryCriteria criteria, Page page){ - return new ResponseEntity<>(deployhistoryService.queryAll(criteria, page),HttpStatus.OK); - } - - @Log("删除DeployHistory") - @ApiOperation(value = "删除部署历史") - @DeleteMapping - @PreAuthorize("@el.check('deployHistory:del')") - public ResponseEntity deleteDeployHistory(@RequestBody Set ids){ - deployhistoryService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/ServerController.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/ServerController.java deleted file mode 100644 index a9d8025..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/rest/ServerController.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.rest; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import me.zhengjie.annotation.Log; -import me.zhengjie.modules.mnt.domain.Server; -import me.zhengjie.modules.mnt.service.ServerService; -import me.zhengjie.modules.mnt.domain.dto.ServerQueryCriteria; -import me.zhengjie.utils.PageResult; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@RestController -@Api(tags = "运维:服务器管理") -@RequiredArgsConstructor -@RequestMapping("/api/serverDeploy") -public class ServerController { - - private final ServerService serverService; - - @ApiOperation("导出服务器数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('serverDeploy:list')") - public void exportServerDeploy(HttpServletResponse response, ServerQueryCriteria criteria) throws IOException { - serverService.download(serverService.queryAll(criteria), response); - } - - @ApiOperation(value = "查询服务器") - @GetMapping - @PreAuthorize("@el.check('serverDeploy:list')") - public ResponseEntity> queryServerDeploy(ServerQueryCriteria criteria, Page page){ - return new ResponseEntity<>(serverService.queryAll(criteria, page),HttpStatus.OK); - } - - @Log("新增服务器") - @ApiOperation(value = "新增服务器") - @PostMapping - @PreAuthorize("@el.check('serverDeploy:add')") - public ResponseEntity createServerDeploy(@Validated @RequestBody Server resources){ - serverService.create(resources); - return new ResponseEntity<>(HttpStatus.CREATED); - } - - @Log("修改服务器") - @ApiOperation(value = "修改服务器") - @PutMapping - @PreAuthorize("@el.check('serverDeploy:edit')") - public ResponseEntity updateServerDeploy(@Validated @RequestBody Server resources){ - serverService.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除服务器") - @ApiOperation(value = "删除Server") - @DeleteMapping - @PreAuthorize("@el.check('serverDeploy:del')") - public ResponseEntity deleteServerDeploy(@RequestBody Set ids){ - serverService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @Log("测试连接服务器") - @ApiOperation(value = "测试连接服务器") - @PostMapping("/testConnect") - @PreAuthorize("@el.check('serverDeploy:add')") - public ResponseEntity testConnectServerDeploy(@Validated @RequestBody Server resources){ - return new ResponseEntity<>(serverService.testConnect(resources),HttpStatus.CREATED); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/AppService.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/AppService.java deleted file mode 100644 index e85ec76..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/AppService.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import me.zhengjie.modules.mnt.domain.App; -import me.zhengjie.modules.mnt.domain.dto.AppQueryCriteria; -import me.zhengjie.utils.PageResult; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface AppService extends IService { - - /** - * 分页查询 - * @param criteria 条件 - * @param page 分页参数 - * @return / - */ - PageResult queryAll(AppQueryCriteria criteria, Page page); - - /** - * 查询全部数据 - * - * @param criteria 条件 - * @return / - */ - List queryAll(AppQueryCriteria criteria); - - /** - * 创建 - * @param resources / - */ - void create(App resources); - - /** - * 编辑 - * @param resources / - */ - void update(App resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 导出数据 - * @param apps / - * @param response / - * @throws IOException / - */ - void download(List apps, HttpServletResponse response) throws IOException; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DatabaseService.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DatabaseService.java deleted file mode 100644 index bd9841d..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DatabaseService.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import me.zhengjie.modules.mnt.domain.Database; -import me.zhengjie.modules.mnt.domain.dto.DatabaseQueryCriteria; -import me.zhengjie.utils.PageResult; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** - * @author ZhangHouYing - * @date 2019-08-24 - */ -public interface DatabaseService extends IService { - - /** - * 分页查询 - * - * @param criteria 条件 - * @param page 分页参数 - * @return / - */ - PageResult queryAll(DatabaseQueryCriteria criteria, Page page); - - /** - * 查询全部 - * @param criteria 条件 - * @return / - */ - List queryAll(DatabaseQueryCriteria criteria); - - /** - * 创建 - * @param resources / - */ - void create(Database resources); - - /** - * 编辑 - * @param resources / - */ - void update(Database resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 测试连接数据库 - * @param resources / - * @return / - */ - boolean testConnection(Database resources); - - /** - * 导出数据 - * @param queryAll / - * @param response / - * @throws IOException e - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployHistoryService.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployHistoryService.java deleted file mode 100644 index e73f10c..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployHistoryService.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import me.zhengjie.modules.mnt.domain.DeployHistory; -import me.zhengjie.modules.mnt.domain.dto.DeployHistoryQueryCriteria; -import me.zhengjie.utils.PageResult; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** - * @author zhanghouying - */ -public interface DeployHistoryService extends IService { - - /** - * 分页查询 - * - * @param criteria 条件 - * @param page 分页参数 - * @return / - */ - PageResult queryAll(DeployHistoryQueryCriteria criteria, Page page); - - /** - * 查询全部 - * - * @param criteria 条件 - * @return / - */ - List queryAll(DeployHistoryQueryCriteria criteria); - - /** - * 创建 - * @param resources / - */ - void create(DeployHistory resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 导出数据 - * @param queryAll / - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployService.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployService.java deleted file mode 100644 index 7b3e706..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/DeployService.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import me.zhengjie.modules.mnt.domain.Deploy; -import me.zhengjie.modules.mnt.domain.DeployHistory; -import me.zhengjie.modules.mnt.domain.dto.DeployQueryCriteria; -import me.zhengjie.utils.PageResult; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface DeployService extends IService { - - /** - * 分页查询 - * - * @param criteria 条件 - * @param page 分页参数 - * @return / - */ - PageResult queryAll(DeployQueryCriteria criteria, Page page); - - /** - * 查询全部数据 - * @param criteria 条件 - * @return / - */ - List queryAll(DeployQueryCriteria criteria); - - /** - * 创建 - * @param resources / - */ - void create(Deploy resources); - - - /** - * 编辑 - * @param resources / - */ - void update(Deploy resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 部署文件到服务器 - * @param fileSavePath 文件路径 - * @param appId 应用ID - */ - void deploy(String fileSavePath, Long appId); - - /** - * 查询部署状态 - * @param resources / - * @return / - */ - String serverStatus(Deploy resources); - /** - * 启动服务 - * @param resources / - * @return / - */ - String startServer(Deploy resources); - /** - * 停止服务 - * @param resources / - * @return / - */ - String stopServer(Deploy resources); - - /** - * 停止服务 - * @param resources / - * @return / - */ - String serverReduction(DeployHistory resources); - - /** - * 导出数据 - * @param queryAll / - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/ServerService.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/ServerService.java deleted file mode 100644 index ef5b1f4..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/ServerService.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.IService; -import me.zhengjie.modules.mnt.domain.Server; -import me.zhengjie.modules.mnt.domain.dto.ServerQueryCriteria; -import me.zhengjie.utils.PageResult; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface ServerService extends IService { - - /** - * 分页查询 - * - * @param criteria 条件 - * @param page 分页参数 - * @return / - */ - PageResult queryAll(ServerQueryCriteria criteria, Page page); - - /** - * 查询全部数据 - * @param criteria 条件 - * @return / - */ - List queryAll(ServerQueryCriteria criteria); - - /** - * 创建 - * @param resources / - */ - void create(Server resources); - - /** - * 编辑 - * @param resources / - */ - void update(Server resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 根据IP查询 - * - * @param ip / - * @return / - */ - Server findByIp(String ip); - - /** - * 测试登录服务器 - * @param resources / - * @return / - */ - Boolean testConnect(Server resources); - - /** - * 导出数据 - * @param queryAll / - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java deleted file mode 100644 index e7f97fb..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/AppServiceImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.RequiredArgsConstructor; -import me.zhengjie.exception.BadRequestException; -import me.zhengjie.modules.mnt.domain.App; -import me.zhengjie.modules.mnt.mapper.AppMapper; -import me.zhengjie.modules.mnt.mapper.DeployMapper; -import me.zhengjie.modules.mnt.mapper.DeployServerMapper; -import me.zhengjie.modules.mnt.service.AppService; -import me.zhengjie.modules.mnt.domain.dto.AppQueryCriteria; -import me.zhengjie.utils.FileUtil; -import me.zhengjie.utils.PageResult; -import me.zhengjie.utils.PageUtil; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Service -@RequiredArgsConstructor -public class AppServiceImpl extends ServiceImpl implements AppService { - - private final AppMapper appMapper; - private final DeployMapper deployMapper; - private final DeployServerMapper deployServerMapper; - - @Override - public PageResult queryAll(AppQueryCriteria criteria, Page page){ - return PageUtil.toPage(appMapper.queryAll(criteria, page)); - } - - @Override - public List queryAll(AppQueryCriteria criteria){ - return appMapper.queryAll(criteria); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(App resources) { - verification(resources); - save(resources); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(App resources) { - verification(resources); - App app = getById(resources.getId()); - app.copy(resources); - saveOrUpdate(app); - } - - private void verification(App resources){ - String opt = "/opt"; - String home = "/home"; - if (!(resources.getUploadPath().startsWith(opt) || resources.getUploadPath().startsWith(home))) { - throw new BadRequestException("文件只能上传在opt目录或者home目录 "); - } - if (!(resources.getDeployPath().startsWith(opt) || resources.getDeployPath().startsWith(home))) { - throw new BadRequestException("文件只能部署在opt目录或者home目录 "); - } - if (!(resources.getBackupPath().startsWith(opt) || resources.getBackupPath().startsWith(home))) { - throw new BadRequestException("文件只能备份在opt目录或者home目录 "); - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - // 删除应用 - removeBatchByIds(ids); - // 删除部署 - Set deployIds = deployMapper.getIdByAppIds(ids); - if(deployIds != null && deployIds.size() > 0){ - deployServerMapper.deleteByDeployIds(deployIds); - deployMapper.deleteBatchIds(deployIds); - } - } - - @Override - public void download(List apps, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (App app : apps) { - Map map = new LinkedHashMap<>(); - map.put("应用名称", app.getName()); - map.put("端口", app.getPort()); - map.put("上传目录", app.getUploadPath()); - map.put("部署目录", app.getDeployPath()); - map.put("备份目录", app.getBackupPath()); - map.put("启动脚本", app.getStartScript()); - map.put("部署脚本", app.getDeployScript()); - map.put("创建日期", app.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java deleted file mode 100644 index 60edcfd..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DatabaseServiceImpl.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service.impl; - -import cn.hutool.core.util.IdUtil; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import me.zhengjie.modules.mnt.domain.Database; -import me.zhengjie.modules.mnt.mapper.DatabaseMapper; -import me.zhengjie.modules.mnt.service.DatabaseService; -import me.zhengjie.modules.mnt.domain.dto.DatabaseQueryCriteria; -import me.zhengjie.modules.mnt.util.SqlUtils; -import me.zhengjie.utils.FileUtil; -import me.zhengjie.utils.PageResult; -import me.zhengjie.utils.PageUtil; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Slf4j -@Service -@RequiredArgsConstructor -public class DatabaseServiceImpl extends ServiceImpl implements DatabaseService { - - private final DatabaseMapper databaseMapper; - - @Override - public PageResult queryAll(DatabaseQueryCriteria criteria, Page page){ - return PageUtil.toPage(databaseMapper.findAll(criteria, page)); - } - - @Override - public List queryAll(DatabaseQueryCriteria criteria){ - return databaseMapper.findAll(criteria); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(Database resources) { - resources.setId(IdUtil.simpleUUID()); - save(resources); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(Database resources) { - Database database = getById(resources.getId()); - database.copy(resources); - saveOrUpdate(database); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - removeBatchByIds(ids); - } - - @Override - public boolean testConnection(Database resources) { - try { - return SqlUtils.testConnection(resources.getJdbcUrl(), resources.getUserName(), resources.getPwd()); - } catch (Exception e) { - log.error(e.getMessage()); - return false; - } - } - - @Override - public void download(List databases, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (Database database : databases) { - Map map = new LinkedHashMap<>(); - map.put("数据库名称", database.getName()); - map.put("数据库连接地址", database.getJdbcUrl()); - map.put("用户名", database.getUserName()); - map.put("创建日期", database.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java deleted file mode 100644 index ac1b013..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployHistoryServiceImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service.impl; - -import cn.hutool.core.util.IdUtil; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.RequiredArgsConstructor; -import me.zhengjie.modules.mnt.domain.DeployHistory; -import me.zhengjie.modules.mnt.mapper.DeployHistoryMapper; -import me.zhengjie.modules.mnt.service.DeployHistoryService; -import me.zhengjie.modules.mnt.domain.dto.DeployHistoryQueryCriteria; -import me.zhengjie.utils.DateUtil; -import me.zhengjie.utils.FileUtil; -import me.zhengjie.utils.PageResult; -import me.zhengjie.utils.PageUtil; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Service -@RequiredArgsConstructor -public class DeployHistoryServiceImpl extends ServiceImpl implements DeployHistoryService { - - private final DeployHistoryMapper deployhistoryMapper; - - @Override - public PageResult queryAll(DeployHistoryQueryCriteria criteria, Page page){ - return PageUtil.toPage(deployhistoryMapper.findAll(criteria, page)); - } - - @Override - public List queryAll(DeployHistoryQueryCriteria criteria){ - return deployhistoryMapper.findAll(criteria); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(DeployHistory resources) { - resources.setId(IdUtil.simpleUUID()); - resources.setDeployDate(DateUtil.getTimeStamp()); - save(resources); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - removeBatchByIds(ids); - } - - @Override - public void download(List deployHistories, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (DeployHistory deployHistory : deployHistories) { - Map map = new LinkedHashMap<>(); - map.put("部署编号", deployHistory.getDeployId()); - map.put("应用名称", deployHistory.getAppName()); - map.put("部署IP", deployHistory.getIp()); - map.put("部署时间", deployHistory.getDeployDate()); - map.put("部署人员", deployHistory.getDeployUser()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java deleted file mode 100644 index 65ea494..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/DeployServiceImpl.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service.impl; - -import cn.hutool.core.date.DatePattern; -import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import me.zhengjie.exception.BadRequestException; -import me.zhengjie.modules.mnt.domain.App; -import me.zhengjie.modules.mnt.domain.Deploy; -import me.zhengjie.modules.mnt.domain.DeployHistory; -import me.zhengjie.modules.mnt.domain.Server; -import me.zhengjie.modules.mnt.mapper.DeployMapper; -import me.zhengjie.modules.mnt.mapper.DeployServerMapper; -import me.zhengjie.modules.mnt.service.DeployHistoryService; -import me.zhengjie.modules.mnt.service.DeployService; -import me.zhengjie.modules.mnt.service.ServerService; -import me.zhengjie.modules.mnt.domain.dto.DeployQueryCriteria; -import me.zhengjie.modules.mnt.util.ExecuteShellUtil; -import me.zhengjie.modules.mnt.util.ScpClientUtil; -import me.zhengjie.modules.mnt.websocket.MsgType; -import me.zhengjie.modules.mnt.websocket.SocketMsg; -import me.zhengjie.modules.mnt.websocket.WebSocketServer; -import me.zhengjie.utils.*; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** - * @author zhanghouying - * @date 2019-08-24 - */ -@Slf4j -@Service -@RequiredArgsConstructor -public class DeployServiceImpl extends ServiceImpl implements DeployService { - - private final String FILE_SEPARATOR = "/"; - private final DeployMapper deployMapper; - private final DeployServerMapper deployServerMapper; - private final ServerService serverService; - private final DeployHistoryService deployHistoryService; - /** - * 循环次数 - */ - private final Integer count = 30; - - @Override - public PageResult queryAll(DeployQueryCriteria criteria, Page page) { - IPage deploys = deployMapper.findAll(criteria, page); - return PageUtil.toPage(deploys); - } - - @Override - public List queryAll(DeployQueryCriteria criteria) { - return deployMapper.findAll(criteria); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(Deploy resources) { - resources.setAppId(resources.getApp().getId()); - save(resources); - // 保存关联关系 - deployServerMapper.insertData(resources.getId(), resources.getDeploys()); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(Deploy resources) { - Deploy deploy = getById(resources.getId()); - deploy.copy(resources); - saveOrUpdate(deploy); - // 更新关联关系 - deployServerMapper.deleteByDeployId(resources.getId()); - deployServerMapper.insertData(resources.getId(), resources.getDeploys()); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - removeBatchByIds(ids); - // 删除关联 - deployServerMapper.deleteByDeployIds(ids); - } - - @Override - public void deploy(String fileSavePath, Long id) { - deployApp(fileSavePath, id); - } - - /** - * @param fileSavePath 本机路径 - * @param id ID - */ - private void deployApp(String fileSavePath, Long id) { - Deploy deploy = deployMapper.getDeployById(id); - if (deploy == null) { - sendMsg("部署信息不存在", MsgType.ERROR); - throw new BadRequestException("部署信息不存在"); - } - App app = deploy.getApp(); - if (app == null) { - sendMsg("包对应应用信息不存在", MsgType.ERROR); - throw new BadRequestException("包对应应用信息不存在"); - } - int port = app.getPort(); - //这个是服务器部署路径 - String uploadPath = app.getUploadPath(); - StringBuilder sb = new StringBuilder(); - String msg; - Set deploys = deploy.getDeploys(); - for (Server server : deploys) { - String ip = server.getIp(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(ip); - //判断是否第一次部署 - boolean flag = checkFile(executeShellUtil, app); - //第一步要确认服务器上有这个目录 - executeShellUtil.execute("mkdir -p " + app.getUploadPath()); - executeShellUtil.execute("mkdir -p " + app.getBackupPath()); - executeShellUtil.execute("mkdir -p " + app.getDeployPath()); - //上传文件 - msg = String.format("登陆到服务器:%s", ip); - ScpClientUtil scpClientUtil = getScpClientUtil(ip); - log.info(msg); - sendMsg(msg, MsgType.INFO); - msg = String.format("上传文件到服务器:%s
目录:%s下,请稍等...", ip, uploadPath); - sendMsg(msg, MsgType.INFO); - scpClientUtil.putFile(fileSavePath, uploadPath); - if (flag) { - sendMsg("停止原来应用", MsgType.INFO); - //停止应用 - stopApp(port, executeShellUtil); - sendMsg("备份原来应用", MsgType.INFO); - //备份应用 - backupApp(executeShellUtil, ip, app.getDeployPath()+FILE_SEPARATOR, app.getName(), app.getBackupPath()+FILE_SEPARATOR, id); - } - sendMsg("部署应用", MsgType.INFO); - //部署文件,并启动应用 - String deployScript = app.getDeployScript(); - executeShellUtil.execute(deployScript); - sleep(3); - sendMsg("应用部署中,请耐心等待部署结果,或者稍后手动查看部署状态", MsgType.INFO); - int i = 0; - boolean result = false; - // 由于启动应用需要时间,所以需要循环获取状态,如果超过30次,则认为是启动失败 - while (i++ < count){ - result = checkIsRunningStatus(port, executeShellUtil); - if(result){ - break; - } - // 休眠6秒 - sleep(6); - } - sb.append("服务器:").append(server.getName()).append("
应用:").append(app.getName()); - sendResultMsg(result, sb); - executeShellUtil.close(); - } - } - - private void sleep(int second) { - try { - Thread.sleep(second * 1000L); - } catch (InterruptedException e) { - log.error(e.getMessage(),e); - } - } - - private void backupApp(ExecuteShellUtil executeShellUtil, String ip, String fileSavePath, String appName, String backupPath, Long id) { - String deployDate = DateUtil.format(new Date(), DatePattern.PURE_DATETIME_PATTERN); - StringBuilder sb = new StringBuilder(); - backupPath += appName + FILE_SEPARATOR + deployDate + "\n"; - sb.append("mkdir -p ").append(backupPath); - sb.append("mv -f ").append(fileSavePath); - sb.append(appName).append(" ").append(backupPath); - log.info("备份应用脚本:" + sb.toString()); - executeShellUtil.execute(sb.toString()); - //还原信息入库 - DeployHistory deployHistory = new DeployHistory(); - deployHistory.setAppName(appName); - deployHistory.setDeployUser(SecurityUtils.getCurrentUsername()); - deployHistory.setIp(ip); - deployHistory.setDeployId(id); - deployHistoryService.create(deployHistory); - } - - /** - * 停App - * - * @param port 端口 - * @param executeShellUtil / - */ - private void stopApp(int port, ExecuteShellUtil executeShellUtil) { - //发送停止命令 - executeShellUtil.execute(String.format("lsof -i :%d|grep -v \"PID\"|awk '{print \"kill -9\",$2}'|sh", port)); - - } - - /** - * 指定端口程序是否在运行 - * - * @param port 端口 - * @param executeShellUtil / - * @return true 正在运行 false 已经停止 - */ - private boolean checkIsRunningStatus(int port, ExecuteShellUtil executeShellUtil) { - String result = executeShellUtil.executeForResult(String.format("fuser -n tcp %d", port)); - return result.indexOf("/tcp:")>0; - } - - private void sendMsg(String msg, MsgType msgType) { - try { - WebSocketServer.sendInfo(new SocketMsg(msg, msgType), "deploy"); - } catch (IOException e) { - log.error(e.getMessage(),e); - } - } - - @Override - public String serverStatus(Deploy resources) { - Set servers = resources.getDeploys(); - App app = resources.getApp(); - for (Server server : servers) { - StringBuilder sb = new StringBuilder(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(server.getIp()); - sb.append("服务器:").append(server.getName()).append("
应用:").append(app.getName()); - boolean result = checkIsRunningStatus(app.getPort(), executeShellUtil); - if (result) { - sb.append("
正在运行"); - sendMsg(sb.toString(), MsgType.INFO); - } else { - sb.append("
已停止!"); - sendMsg(sb.toString(), MsgType.ERROR); - } - log.info(sb.toString()); - executeShellUtil.close(); - } - return "执行完毕"; - } - - private boolean checkFile(ExecuteShellUtil executeShellUtil, App app) { - String result = executeShellUtil.executeForResult("find " + app.getDeployPath() + " -name " + app.getName()); - return result.indexOf(app.getName())>0; - } - - /** - * 启动服务 - * @param resources / - * @return / - */ - @Override - public String startServer(Deploy resources) { - Set deploys = resources.getDeploys(); - App app = resources.getApp(); - for (Server deploy : deploys) { - StringBuilder sb = new StringBuilder(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(deploy.getIp()); - //为了防止重复启动,这里先停止应用 - stopApp(app.getPort(), executeShellUtil); - sb.append("服务器:").append(deploy.getName()).append("
应用:").append(app.getName()); - sendMsg("下发启动命令", MsgType.INFO); - executeShellUtil.execute(app.getStartScript()); - sleep(3); - sendMsg("应用启动中,请耐心等待启动结果,或者稍后手动查看运行状态", MsgType.INFO); - int i = 0; - boolean result = false; - // 由于启动应用需要时间,所以需要循环获取状态,如果超过30次,则认为是启动失败 - while (i++ < count){ - result = checkIsRunningStatus(app.getPort(), executeShellUtil); - if(result){ - break; - } - // 休眠6秒 - sleep(6); - } - sendResultMsg(result, sb); - log.info(sb.toString()); - executeShellUtil.close(); - } - return "执行完毕"; - } - - /** - * 停止服务 - * @param resources / - * @return / - */ - @Override - public String stopServer(Deploy resources) { - Set deploys = resources.getDeploys(); - App app = resources.getApp(); - for (Server deploy : deploys) { - StringBuilder sb = new StringBuilder(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(deploy.getIp()); - sb.append("服务器:").append(deploy.getName()).append("
应用:").append(app.getName()); - sendMsg("下发停止命令", MsgType.INFO); - //停止应用 - stopApp(app.getPort(), executeShellUtil); - sleep(1); - boolean result = checkIsRunningStatus(app.getPort(), executeShellUtil); - if (result) { - sb.append("
关闭失败!"); - sendMsg(sb.toString(), MsgType.ERROR); - } else { - sb.append("
关闭成功!"); - sendMsg(sb.toString(), MsgType.INFO); - } - log.info(sb.toString()); - executeShellUtil.close(); - } - return "执行完毕"; - } - - @Override - public String serverReduction(DeployHistory resources) { - Long deployId = resources.getDeployId(); - Deploy deployInfo = getById(deployId); - String deployDate = DateUtil.format(resources.getDeployDate(), DatePattern.PURE_DATETIME_PATTERN); - App app = deployInfo.getApp(); - if (app == null) { - sendMsg("应用信息不存在:" + resources.getAppName(), MsgType.ERROR); - throw new BadRequestException("应用信息不存在:" + resources.getAppName()); - } - String backupPath = app.getBackupPath()+FILE_SEPARATOR; - backupPath += resources.getAppName() + FILE_SEPARATOR + deployDate; - //这个是服务器部署路径 - String deployPath = app.getDeployPath(); - String ip = resources.getIp(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(ip); - String msg; - - msg = String.format("登陆到服务器:%s", ip); - log.info(msg); - sendMsg(msg, MsgType.INFO); - sendMsg("停止原来应用", MsgType.INFO); - //停止应用 - stopApp(app.getPort(), executeShellUtil); - //删除原来应用 - sendMsg("删除应用", MsgType.INFO); - executeShellUtil.execute("rm -rf " + deployPath + FILE_SEPARATOR + resources.getAppName()); - //还原应用 - sendMsg("还原应用", MsgType.INFO); - executeShellUtil.execute("cp -r " + backupPath + "/. " + deployPath); - sendMsg("启动应用", MsgType.INFO); - executeShellUtil.execute(app.getStartScript()); - sendMsg("应用启动中,请耐心等待启动结果,或者稍后手动查看启动状态", MsgType.INFO); - int i = 0; - boolean result = false; - // 由于启动应用需要时间,所以需要循环获取状态,如果超过30次,则认为是启动失败 - while (i++ < count){ - result = checkIsRunningStatus(app.getPort(), executeShellUtil); - if(result){ - break; - } - // 休眠6秒 - sleep(6); - } - StringBuilder sb = new StringBuilder(); - sb.append("服务器:").append(ip).append("
应用:").append(resources.getAppName()); - sendResultMsg(result, sb); - executeShellUtil.close(); - return ""; - } - - private ExecuteShellUtil getExecuteShellUtil(String ip) { - Server server = serverService.findByIp(ip); - if (server == null) { - sendMsg("IP对应服务器信息不存在:" + ip, MsgType.ERROR); - throw new BadRequestException("IP对应服务器信息不存在:" + ip); - } - return new ExecuteShellUtil(ip, server.getAccount(), server.getPassword(), server.getPort()); - } - - private ScpClientUtil getScpClientUtil(String ip) { - Server server = serverService.findByIp(ip); - if (server == null) { - sendMsg("IP对应服务器信息不存在:" + ip, MsgType.ERROR); - throw new BadRequestException("IP对应服务器信息不存在:" + ip); - } - return ScpClientUtil.getInstance(ip, server.getPort(), server.getAccount(), server.getPassword()); - } - - private void sendResultMsg(boolean result, StringBuilder sb) { - if (result) { - sb.append("
启动成功!"); - sendMsg(sb.toString(), MsgType.INFO); - } else { - sb.append("
启动失败!"); - sendMsg(sb.toString(), MsgType.ERROR); - } - } - - @Override - public void download(List deploys, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (Deploy deploy : deploys) { - Map map = new LinkedHashMap<>(); - map.put("应用名称", deploy.getApp().getName()); - map.put("服务器", deploy.getServers()); - map.put("部署日期", deploy.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerServiceImpl.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerServiceImpl.java deleted file mode 100644 index aec83db..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/service/impl/ServerServiceImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.service.impl; - -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.RequiredArgsConstructor; -import me.zhengjie.modules.mnt.domain.Server; -import me.zhengjie.modules.mnt.mapper.DeployServerMapper; -import me.zhengjie.modules.mnt.mapper.ServerMapper; -import me.zhengjie.modules.mnt.service.ServerService; -import me.zhengjie.modules.mnt.domain.dto.ServerQueryCriteria; -import me.zhengjie.modules.mnt.util.ExecuteShellUtil; -import me.zhengjie.utils.FileUtil; -import me.zhengjie.utils.PageResult; -import me.zhengjie.utils.PageUtil; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Service -@RequiredArgsConstructor -public class ServerServiceImpl extends ServiceImpl implements ServerService { - - private final ServerMapper serverMapper; - private final DeployServerMapper deployServerMapper; - - @Override - public PageResult queryAll(ServerQueryCriteria criteria, Page page){ - return PageUtil.toPage(serverMapper.findAll(criteria, page)); - } - - @Override - public List queryAll(ServerQueryCriteria criteria){ - return serverMapper.findAll(criteria); - } - - @Override - public Server findByIp(String ip) { - return serverMapper.findByIp(ip); - } - - @Override - public Boolean testConnect(Server resources) { - ExecuteShellUtil executeShellUtil = null; - try { - executeShellUtil = new ExecuteShellUtil(resources.getIp(), resources.getAccount(), resources.getPassword(),resources.getPort()); - return executeShellUtil.execute("ls")==0; - } catch (Exception e) { - return false; - }finally { - if (executeShellUtil != null) { - executeShellUtil.close(); - } - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void create(Server resources) { - save(resources); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(Server resources) { - Server server = getById(resources.getId()); - server.copy(resources); - saveOrUpdate(server); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - removeBatchByIds(ids); - // 删除与之关联的服务 - deployServerMapper.deleteByServerIds(ids); - } - - @Override - public void download(List servers, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (Server deploy : servers) { - Map map = new LinkedHashMap<>(); - map.put("服务器名称", deploy.getName()); - map.put("服务器IP", deploy.getIp()); - map.put("端口", deploy.getPort()); - map.put("账号", deploy.getAccount()); - map.put("创建日期", deploy.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/DataTypeEnum.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/DataTypeEnum.java deleted file mode 100644 index e104b9e..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/DataTypeEnum.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * << - * Davinci - * == - * Copyright (C) 2016 - 2019 EDP - * == - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * >> - * - */ - -package me.zhengjie.modules.mnt.util; -import lombok.extern.slf4j.Slf4j; - -/** - * @author / - */ -@Slf4j -@SuppressWarnings({"unchecked","all"}) -public enum DataTypeEnum { - - /** mysql */ - MYSQL("mysql", "mysql", "com.mysql.jdbc.Driver", "`", "`", "'", "'"), - - /** oracle */ - ORACLE("oracle", "oracle", "oracle.jdbc.driver.OracleDriver", "\"", "\"", "\"", "\""), - - /** sql server */ - SQLSERVER("sqlserver", "sqlserver", "com.microsoft.sqlserver.jdbc.SQLServerDriver", "\"", "\"", "\"", "\""), - - /** h2 */ - H2("h2", "h2", "org.h2.Driver", "`", "`", "\"", "\""), - - /** phoenix */ - PHOENIX("phoenix", "hbase phoenix", "org.apache.phoenix.jdbc.PhoenixDriver", "", "", "\"", "\""), - - /** mongo */ - MONGODB("mongo", "mongodb", "mongodb.jdbc.MongoDriver", "`", "`", "\"", "\""), - - /** sql4es */ - ELASTICSEARCH("sql4es", "elasticsearch", "nl.anchormen.sql4es.jdbc.ESDriver", "", "", "'", "'"), - - /** presto */ - PRESTO("presto", "presto", "com.facebook.presto.jdbc.PrestoDriver", "", "", "\"", "\""), - - /** moonbox */ - MOONBOX("moonbox", "moonbox", "moonbox.jdbc.MbDriver", "`", "`", "`", "`"), - - /** cassandra */ - CASSANDRA("cassandra", "cassandra", "com.github.adejanovski.cassandra.jdbc.CassandraDriver", "", "", "'", "'"), - - /** click house */ - CLICKHOUSE("clickhouse", "clickhouse", "ru.yandex.clickhouse.ClickHouseDriver", "", "", "\"", "\""), - - /** kylin */ - KYLIN("kylin", "kylin", "org.apache.kylin.jdbc.Driver", "\"", "\"", "\"", "\""), - - /** vertica */ - VERTICA("vertica", "vertica", "com.vertica.jdbc.Driver", "", "", "'", "'"), - - /** sap */ - HANA("sap", "sap hana", "com.sap.db.jdbc.Driver", "", "", "'", "'"), - - /** impala */ - IMPALA("impala", "impala", "com.cloudera.impala.jdbc41.Driver", "", "", "'", "'"); - - private String feature; - private String desc; - private String driver; - private String keywordPrefix; - private String keywordSuffix; - private String aliasPrefix; - private String aliasSuffix; - - private static final String JDBC_URL_PREFIX = "jdbc:"; - - DataTypeEnum(String feature, String desc, String driver, String keywordPrefix, String keywordSuffix, String aliasPrefix, String aliasSuffix) { - this.feature = feature; - this.desc = desc; - this.driver = driver; - this.keywordPrefix = keywordPrefix; - this.keywordSuffix = keywordSuffix; - this.aliasPrefix = aliasPrefix; - this.aliasSuffix = aliasSuffix; - } - - public static DataTypeEnum urlOf(String jdbcUrl) { - String url = jdbcUrl.toLowerCase().trim(); - for (DataTypeEnum dataTypeEnum : values()) { - if (url.startsWith(JDBC_URL_PREFIX + dataTypeEnum.feature)) { - try { - Class aClass = Class.forName(dataTypeEnum.getDriver()); - if (null == aClass) { - throw new RuntimeException("Unable to get driver instance for jdbcUrl: " + jdbcUrl); - } - } catch (ClassNotFoundException e) { - throw new RuntimeException("Unable to get driver instance: " + jdbcUrl); - } - return dataTypeEnum; - } - } - return null; - } - - public String getFeature() { - return feature; - } - - public String getDesc() { - return desc; - } - - public String getDriver() { - return driver; - } - - public String getKeywordPrefix() { - return keywordPrefix; - } - - public String getKeywordSuffix() { - return keywordSuffix; - } - - public String getAliasPrefix() { - return aliasPrefix; - } - - public String getAliasSuffix() { - return aliasSuffix; - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ExecuteShellUtil.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ExecuteShellUtil.java deleted file mode 100644 index a5d5b59..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ExecuteShellUtil.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.util; - -import cn.hutool.core.io.IoUtil; -import com.jcraft.jsch.ChannelShell; -import com.jcraft.jsch.JSch; -import com.jcraft.jsch.Session; -import lombok.extern.slf4j.Slf4j; - -import java.io.*; -import java.util.Vector; - -/** - * 执行shell命令 - * - * @author: ZhangHouYing - * @date: 2019/8/10 - */ -@Slf4j -public class ExecuteShellUtil { - - private Vector stdout; - - Session session; - - public ExecuteShellUtil(final String ipAddress, final String username, final String password,int port) { - try { - JSch jsch = new JSch(); - session = jsch.getSession(username, ipAddress, port); - session.setPassword(password); - session.setConfig("StrictHostKeyChecking", "no"); - session.connect(3000); - } catch (Exception e) { - log.error(e.getMessage(),e); - } - - } - - public int execute(final String command) { - int returnCode = 0; - ChannelShell channel = null; - PrintWriter printWriter = null; - BufferedReader input = null; - stdout = new Vector(); - try { - channel = (ChannelShell) session.openChannel("shell"); - channel.connect(); - input = new BufferedReader(new InputStreamReader(channel.getInputStream())); - printWriter = new PrintWriter(channel.getOutputStream()); - printWriter.println(command); - printWriter.println("exit"); - printWriter.flush(); - log.info("The remote command is: "); - String line; - while ((line = input.readLine()) != null) { - stdout.add(line); - System.out.println(line); - } - } catch (Exception e) { - log.error(e.getMessage(),e); - return -1; - }finally { - IoUtil.close(printWriter); - IoUtil.close(input); - if (channel != null) { - channel.disconnect(); - } - } - return returnCode; - } - - public void close(){ - if (session != null) { - session.disconnect(); - } - } - - public String executeForResult(String command) { - execute(command); - StringBuilder sb = new StringBuilder(); - for (String str : stdout) { - sb.append(str); - } - return sb.toString(); - } - -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ScpClientUtil.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ScpClientUtil.java deleted file mode 100644 index 7cb83aa..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/ScpClientUtil.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.util; - -import ch.ethz.ssh2.Connection; -import ch.ethz.ssh2.SCPClient; -import com.google.common.collect.Maps; - -import java.io.IOException; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * 远程执行linux命令 - * @author: ZhangHouYing - * @date: 2019-08-10 10:06 - */ -public class ScpClientUtil { - - static private Map instance = Maps.newHashMap(); - - static synchronized public ScpClientUtil getInstance(String ip, int port, String username, String password) { - if (instance.get(ip) == null) { - instance.put(ip, new ScpClientUtil(ip, port, username, password)); - } - return instance.get(ip); - } - - public ScpClientUtil(String ip, int port, String username, String password) { - this.ip = ip; - this.port = port; - this.username = username; - this.password = password; - } - - public void getFile(String remoteFile, String localTargetDirectory) { - Connection conn = new Connection(ip, port); - try { - conn.connect(); - boolean isAuthenticated = conn.authenticateWithPassword(username, password); - if (!isAuthenticated) { - System.err.println("authentication failed"); - } - SCPClient client = new SCPClient(conn); - client.get(remoteFile, localTargetDirectory); - } catch (IOException ex) { - Logger.getLogger(SCPClient.class.getName()).log(Level.SEVERE, null, ex); - }finally{ - conn.close(); - } - } - - public void putFile(String localFile, String remoteTargetDirectory) { - putFile(localFile, null, remoteTargetDirectory); - } - - public void putFile(String localFile, String remoteFileName, String remoteTargetDirectory) { - putFile(localFile, remoteFileName, remoteTargetDirectory,null); - } - - public void putFile(String localFile, String remoteFileName, String remoteTargetDirectory, String mode) { - Connection conn = new Connection(ip, port); - try { - conn.connect(); - boolean isAuthenticated = conn.authenticateWithPassword(username, password); - if (!isAuthenticated) { - System.err.println("authentication failed"); - } - SCPClient client = new SCPClient(conn); - if ((mode == null) || (mode.length() == 0)) { - mode = "0600"; - } - if (remoteFileName == null) { - client.put(localFile, remoteTargetDirectory); - } else { - client.put(localFile, remoteFileName, remoteTargetDirectory, mode); - } - } catch (IOException ex) { - Logger.getLogger(ScpClientUtil.class.getName()).log(Level.SEVERE, null, ex); - }finally{ - conn.close(); - } - } - - private String ip; - private int port; - private String username; - private String password; - - -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/SqlUtils.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/SqlUtils.java deleted file mode 100644 index d7e06b1..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/util/SqlUtils.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.util; - -import com.alibaba.druid.pool.DruidDataSource; -import com.alibaba.druid.util.StringUtils; -import com.google.common.collect.Lists; -import lombok.extern.slf4j.Slf4j; -import me.zhengjie.utils.CloseUtil; -import javax.sql.DataSource; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; -import java.sql.*; -import java.util.List; - -/** - * @author / - */ -@Slf4j -public class SqlUtils { - - /** - * 获取数据源 - * - * @param jdbcUrl / - * @param userName / - * @param password / - * @return DataSource - */ - private static DataSource getDataSource(String jdbcUrl, String userName, String password) { - DruidDataSource druidDataSource = new DruidDataSource(); - String className; - try { - className = DriverManager.getDriver(jdbcUrl.trim()).getClass().getName(); - } catch (SQLException e) { - throw new RuntimeException("Get class name error: =" + jdbcUrl); - } - if (StringUtils.isEmpty(className)) { - DataTypeEnum dataTypeEnum = DataTypeEnum.urlOf(jdbcUrl); - if (null == dataTypeEnum) { - throw new RuntimeException("Not supported data type: jdbcUrl=" + jdbcUrl); - } - druidDataSource.setDriverClassName(dataTypeEnum.getDriver()); - } else { - druidDataSource.setDriverClassName(className); - } - - - druidDataSource.setUrl(jdbcUrl); - druidDataSource.setUsername(userName); - druidDataSource.setPassword(password); - // 配置获取连接等待超时的时间 - druidDataSource.setMaxWait(3000); - // 配置初始化大小、最小、最大 - druidDataSource.setInitialSize(1); - druidDataSource.setMinIdle(1); - druidDataSource.setMaxActive(1); - - // 如果链接出现异常则直接判定为失败而不是一直重试 - druidDataSource.setBreakAfterAcquireFailure(true); - try { - druidDataSource.init(); - } catch (SQLException e) { - log.error("Exception during pool initialization", e); - throw new RuntimeException(e.getMessage()); - } - - return druidDataSource; - } - - private static Connection getConnection(String jdbcUrl, String userName, String password) { - DataSource dataSource = getDataSource(jdbcUrl, userName, password); - Connection connection = null; - try { - connection = dataSource.getConnection(); - } catch (Exception ignored) {} - try { - int timeOut = 5; - if (null == connection || connection.isClosed() || !connection.isValid(timeOut)) { - log.info("connection is closed or invalid, retry get connection!"); - connection = dataSource.getConnection(); - } - } catch (Exception e) { - log.error("create connection error, jdbcUrl: {}", jdbcUrl); - throw new RuntimeException("create connection error, jdbcUrl: " + jdbcUrl); - } finally { - CloseUtil.close(connection); - } - return connection; - } - - private static void releaseConnection(Connection connection) { - if (null != connection) { - try { - connection.close(); - } catch (Exception e) { - log.error(e.getMessage(),e); - log.error("connection close error:" + e.getMessage()); - } - } - } - - public static boolean testConnection(String jdbcUrl, String userName, String password) { - Connection connection = null; - try { - connection = getConnection(jdbcUrl, userName, password); - if (null != connection) { - return true; - } - } catch (Exception e) { - log.info("Get connection failed:" + e.getMessage()); - } finally { - releaseConnection(connection); - } - return false; - } - - public static String executeFile(String jdbcUrl, String userName, String password, File sqlFile) { - Connection connection = getConnection(jdbcUrl, userName, password); - try { - batchExecute(connection, readSqlList(sqlFile)); - } catch (Exception e) { - log.error("sql脚本执行发生异常:{}",e.getMessage()); - return e.getMessage(); - }finally { - releaseConnection(connection); - } - return "success"; - } - - - /** - * 批量执行sql - * @param connection / - * @param sqlList / - */ - public static void batchExecute(Connection connection, List sqlList) { - Statement st = null; - try { - st = connection.createStatement(); - for (String sql : sqlList) { - if (sql.endsWith(";")) { - sql = sql.substring(0, sql.length() - 1); - } - st.addBatch(sql); - } - st.executeBatch(); - } catch (SQLException throwables) { - throwables.printStackTrace(); - } finally { - CloseUtil.close(st); - } - } - - /** - * 将文件中的sql语句以;为单位读取到列表中 - * @param sqlFile / - * @return / - * @throws Exception e - */ - private static List readSqlList(File sqlFile) throws Exception { - List sqlList = Lists.newArrayList(); - StringBuilder sb = new StringBuilder(); - try (BufferedReader reader = new BufferedReader(new InputStreamReader( - new FileInputStream(sqlFile), StandardCharsets.UTF_8))) { - String tmp; - while ((tmp = reader.readLine()) != null) { - log.info("line:{}", tmp); - if (tmp.endsWith(";")) { - sb.append(tmp); - sqlList.add(sb.toString()); - sb.delete(0, sb.length()); - } else { - sb.append(tmp); - } - } - if (!"".endsWith(sb.toString().trim())) { - sqlList.add(sb.toString()); - } - } - - return sqlList; - } - -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/MsgType.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/MsgType.java deleted file mode 100644 index 2fc473d..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/MsgType.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.websocket; - -/** - * @author ZhangHouYing - * @date 2019-08-10 9:56 - */ -public enum MsgType { - /** 连接 */ - CONNECT, - /** 关闭 */ - CLOSE, - /** 信息 */ - INFO, - /** 错误 */ - ERROR -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/SocketMsg.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/SocketMsg.java deleted file mode 100644 index ade33a2..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/SocketMsg.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.websocket; - -import lombok.Data; - -/** - * @author ZhangHouYing - * @date 2019-08-10 9:55 - */ -@Data -public class SocketMsg { - private String msg; - private MsgType msgType; - - public SocketMsg(String msg, MsgType msgType) { - this.msg = msg; - this.msgType = msgType; - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/WebSocketServer.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/WebSocketServer.java deleted file mode 100644 index 000a515..0000000 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/mnt/websocket/WebSocketServer.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2019-2020 Zheng Jie - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package me.zhengjie.modules.mnt.websocket; - -import com.alibaba.fastjson.JSON; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; -import javax.websocket.*; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.CopyOnWriteArraySet; -/** - * @author ZhangHouYing - * @date 2019-08-10 15:46 - */ -@ServerEndpoint("/webSocket/{sid}") -@Slf4j -@Component -public class WebSocketServer { - - /** - * concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。 - */ - private static final CopyOnWriteArraySet webSocketSet = new CopyOnWriteArraySet(); - - /** - * 与某个客户端的连接会话,需要通过它来给客户端发送数据 - */ - private Session session; - - /** - * 接收sid - */ - private String sid=""; - /** - * 连接建立成功调用的方法 - * */ - @OnOpen - public void onOpen(Session session,@PathParam("sid") String sid) { - this.session = session; - //如果存在就先删除一个,防止重复推送消息 - webSocketSet.removeIf(webSocket -> webSocket.sid.equals(sid)); - webSocketSet.add(this); - this.sid=sid; - } - - /** - * 连接关闭调用的方法 - */ - @OnClose - public void onClose() { - webSocketSet.remove(this); - } - - /** - * 收到客户端消息后调用的方法 - * @param message 客户端发送过来的消息*/ - @OnMessage - public void onMessage(String message, Session session) { - log.info("收到来"+sid+"的信息:"+message); - //群发消息 - for (WebSocketServer item : webSocketSet) { - try { - item.sendMessage(message); - } catch (IOException e) { - log.error(e.getMessage(),e); - } - } - } - - @OnError - public void onError(Session session, Throwable error) { - log.error("发生错误"); - error.printStackTrace(); - } - /** - * 实现服务器主动推送 - */ - private void sendMessage(String message) throws IOException { - this.session.getBasicRemote().sendText(message); - } - - - /** - * 群发自定义消息 - * */ - public static void sendInfo(SocketMsg socketMsg,@PathParam("sid") String sid) throws IOException { - String message = JSON.toJSONString(socketMsg); - log.info("推送消息到"+sid+",推送内容:"+message); - for (WebSocketServer item : webSocketSet) { - try { - //这里可以设定只推送给这个sid的,为null则全部推送 - if(sid==null) { - item.sendMessage(message); - }else if(item.sid.equals(sid)){ - item.sendMessage(message); - } - } catch (IOException ignored) { } - } - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WebSocketServer that = (WebSocketServer) o; - return Objects.equals(session, that.session) && - Objects.equals(sid, that.sid); - } - - @Override - public int hashCode() { - return Objects.hash(session, sid); - } -} diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzJobMapper.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzJobMapper.java index c717667..593c8db 100644 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzJobMapper.java +++ b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzJobMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzLogMapper.java b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzLogMapper.java index d27469d..a78bd03 100644 --- a/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzLogMapper.java +++ b/eladmin/eladmin-system/src/main/java/me/zhengjie/modules/quartz/mapper/QuartzLogMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-system/src/main/resources/config/application-dev.yml b/eladmin/eladmin-system/src/main/resources/config/application-dev.yml index e227c77..80eb229 100644 --- a/eladmin/eladmin-system/src/main/resources/config/application-dev.yml +++ b/eladmin/eladmin-system/src/main/resources/config/application-dev.yml @@ -4,7 +4,7 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.p6spy.engine.spy.P6SpyDriver - url: jdbc:p6spy:mysql://localhost:3306/eladmin?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false + url: jdbc:p6spy:mysql://localhost:3306/eladmin-mp?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false username: root password: 123456 # 初始连接数,建议设置为与最小空闲连接数相同 diff --git a/eladmin/eladmin-system/src/main/resources/logback.xml b/eladmin/eladmin-system/src/main/resources/logback.xml index eb66625..05f055b 100644 --- a/eladmin/eladmin-system/src/main/resources/logback.xml +++ b/eladmin/eladmin-system/src/main/resources/logback.xml @@ -18,6 +18,5 @@ - \ No newline at end of file diff --git a/eladmin/eladmin-system/src/main/resources/mapper/mnt/AppMapper.xml b/eladmin/eladmin-system/src/main/resources/mapper/mnt/AppMapper.xml deleted file mode 100644 index f5addc8..0000000 --- a/eladmin/eladmin-system/src/main/resources/mapper/mnt/AppMapper.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - app_id,name,port,upload_path,deploy_path,backup_path,start_script,deploy_script,create_by,update_by,create_time,update_time - - - - \ No newline at end of file diff --git a/eladmin/eladmin-system/src/main/resources/mapper/mnt/DatabaseMapper.xml b/eladmin/eladmin-system/src/main/resources/mapper/mnt/DatabaseMapper.xml deleted file mode 100644 index b43d909..0000000 --- a/eladmin/eladmin-system/src/main/resources/mapper/mnt/DatabaseMapper.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - db_id, name, jdbc_url, pwd, user_name, create_by, update_by, create_time, update_time - - - - \ No newline at end of file diff --git a/eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployHistoryMapper.xml b/eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployHistoryMapper.xml deleted file mode 100644 index e05af3e..0000000 --- a/eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployHistoryMapper.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - history_id, app_name, ip, deploy_date, deploy_user, deploy_id - - - - - \ No newline at end of file diff --git a/eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployMapper.xml b/eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployMapper.xml deleted file mode 100644 index 8f63890..0000000 --- a/eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployMapper.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - deploy.deploy_id as d_deploy_id, deploy.app_id as d_app_id,deploy.create_by as d_create_by,deploy.update_by as d_update_by,deploy.create_time as d_create_time,deploy.update_time as d_update_time, - app.app_id as a_app_id,app.name as a_name,app.port as a_port,app.upload_path as a_upload_path,app.deploy_path as a_deploy_path,app.backup_path as a_backup_path,app.start_script as a_start_script,app.deploy_script as a_deploy_script - - - - server.server_id as s_server_id,server.name as s_name,server.ip as s_ip,server.port as s_port,server.account as s_account,server.password as s_password - - - - - - - - \ No newline at end of file diff --git a/eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployServerMapper.xml b/eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployServerMapper.xml deleted file mode 100644 index f3247a9..0000000 --- a/eladmin/eladmin-system/src/main/resources/mapper/mnt/DeployServerMapper.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - insert into mnt_deploy_server (deploy_id, server_id) - values - - #{deployId}, #{item.id} - - - - - delete from mnt_deploy_server - where deploy_id = #{deployId} - - - - delete from mnt_deploy_server - where deploy_id in - - #{id} - - - - - delete from mnt_deploy_server - where server_id in - - #{id} - - - \ No newline at end of file diff --git a/eladmin/eladmin-system/src/main/resources/mapper/mnt/ServerMapper.xml b/eladmin/eladmin-system/src/main/resources/mapper/mnt/ServerMapper.xml deleted file mode 100644 index 1db6b8a..0000000 --- a/eladmin/eladmin-system/src/main/resources/mapper/mnt/ServerMapper.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - server_id, name, ip, port, account, password, create_by, update_by, create_time, update_time - - - - - - \ No newline at end of file diff --git a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/AliPayConfigMapper.java b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/AliPayConfigMapper.java index 5955409..f99f05c 100644 --- a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/AliPayConfigMapper.java +++ b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/AliPayConfigMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/EmailConfigMapper.java b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/EmailConfigMapper.java index 3f5cab3..182d52a 100644 --- a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/EmailConfigMapper.java +++ b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/EmailConfigMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/LocalStorageMapper.java b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/LocalStorageMapper.java index 87f3dc5..bc00166 100644 --- a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/LocalStorageMapper.java +++ b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/LocalStorageMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuConfigMapper.java b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuConfigMapper.java index 7ce2b02..64e47e6 100644 --- a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuConfigMapper.java +++ b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuConfigMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuContentMapper.java b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuContentMapper.java index b7ab3f8..ba8b928 100644 --- a/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuContentMapper.java +++ b/eladmin/eladmin-tools/src/main/java/me/zhengjie/mapper/QiniuContentMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2023 Zheng Jie + * Copyright 2019-2025 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/eladmin/pom.xml b/eladmin/pom.xml index 9a0bd26..0d84c3a 100644 --- a/eladmin/pom.xml +++ b/eladmin/pom.xml @@ -55,6 +55,13 @@ org.springframework.boot spring-boot-starter-undertow + + + + io.undertow + undertow-websockets-jsr + + diff --git a/sql/eladmin.sql b/sql/eladmin.sql index 2a93526..91755a9 100644 --- a/sql/eladmin.sql +++ b/sql/eladmin.sql @@ -1,49 +1,55 @@ /* - Navicat Premium Data Transfer + Navicat Premium Dump SQL Source Server : localhost Source Server Type : MySQL - Source Server Version : 100505 + Source Server Version : 110206 (11.2.6-MariaDB) Source Host : localhost:3306 - Source Schema : eladmin + Source Schema : eladmin-mp Target Server Type : MySQL - Target Server Version : 100505 + Target Server Version : 110206 (11.2.6-MariaDB) File Encoding : 65001 - Date: 05/09/2020 10:49:19 + Date: 14/01/2025 11:38:07 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- --- Table structure for code_column_config +-- Table structure for code_column -- ---------------------------- -DROP TABLE IF EXISTS `code_column_config`; -CREATE TABLE `code_column_config` ( +DROP TABLE IF EXISTS `code_column`; +CREATE TABLE `code_column` ( `column_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `table_name` varchar(180) DEFAULT NULL, - `column_name` varchar(255) DEFAULT NULL, - `column_type` varchar(255) DEFAULT NULL, - `dict_name` varchar(255) DEFAULT NULL, - `extra` varchar(255) DEFAULT NULL, - `form_show` bit(1) DEFAULT NULL, - `form_type` varchar(255) DEFAULT NULL, - `key_type` varchar(255) DEFAULT NULL, - `list_show` bit(1) DEFAULT NULL, - `not_null` bit(1) DEFAULT NULL, - `query_type` varchar(255) DEFAULT NULL, - `remark` varchar(255) DEFAULT NULL, + `table_name` varchar(180) DEFAULT NULL COMMENT '表名', + `column_name` varchar(255) DEFAULT NULL COMMENT '数据库字段名称', + `column_type` varchar(255) DEFAULT NULL COMMENT '数据库字段类型', + `dict_name` varchar(255) DEFAULT NULL COMMENT '字典名称', + `extra` varchar(255) DEFAULT NULL COMMENT '字段额外的参数', + `form_show` bit(1) DEFAULT NULL COMMENT '是否表单显示', + `form_type` varchar(255) DEFAULT NULL COMMENT '表单类型', + `key_type` varchar(255) DEFAULT NULL COMMENT '数据库字段键类型', + `list_show` bit(1) DEFAULT NULL COMMENT '是否在列表显示', + `not_null` bit(1) DEFAULT NULL COMMENT '是否为空', + `query_type` varchar(255) DEFAULT NULL COMMENT '查询类型', + `remark` varchar(255) DEFAULT NULL COMMENT '描述', PRIMARY KEY (`column_id`) USING BTREE, KEY `idx_table_name` (`table_name`) -) ENGINE=InnoDB AUTO_INCREMENT=191 ROW_FORMAT=COMPACT COMMENT='代码生成字段信息存储'; +) ENGINE=InnoDB AUTO_INCREMENT=223 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='代码生成字段信息存储'; -- ---------------------------- --- Table structure for code_gen_config +-- Records of code_column -- ---------------------------- -DROP TABLE IF EXISTS `code_gen_config`; -CREATE TABLE `code_gen_config` ( +BEGIN; +COMMIT; + +-- ---------------------------- +-- Table structure for code_config +-- ---------------------------- +DROP TABLE IF EXISTS `code_config`; +CREATE TABLE `code_config` ( `config_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', `table_name` varchar(255) DEFAULT NULL COMMENT '表名', `author` varchar(255) DEFAULT NULL COMMENT '作者', @@ -56,134 +62,15 @@ CREATE TABLE `code_gen_config` ( `api_alias` varchar(255) DEFAULT NULL COMMENT '接口名称', PRIMARY KEY (`config_id`) USING BTREE, KEY `idx_table_name` (`table_name`(100)) -) ENGINE=InnoDB AUTO_INCREMENT=7 ROW_FORMAT=COMPACT COMMENT='代码生成器配置'; +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='代码生成器配置'; -- ---------------------------- --- Table structure for mnt_app --- ---------------------------- -DROP TABLE IF EXISTS `mnt_app`; -CREATE TABLE `mnt_app` ( - `app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `name` varchar(255) DEFAULT NULL COMMENT '应用名称', - `upload_path` varchar(255) DEFAULT NULL COMMENT '上传目录', - `deploy_path` varchar(255) DEFAULT NULL COMMENT '部署路径', - `backup_path` varchar(255) DEFAULT NULL COMMENT '备份路径', - `port` int(255) DEFAULT NULL COMMENT '应用端口', - `start_script` varchar(4000) DEFAULT NULL COMMENT '启动脚本', - `deploy_script` varchar(4000) DEFAULT NULL COMMENT '部署脚本', - `create_by` varchar(255) DEFAULT NULL COMMENT '创建者', - `update_by` varchar(255) DEFAULT NULL COMMENT '更新者', - `create_time` datetime DEFAULT NULL COMMENT '创建日期', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`app_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='应用管理'; - --- ---------------------------- --- Records of mnt_app +-- Records of code_config -- ---------------------------- BEGIN; +INSERT INTO `code_config` (`config_id`, `table_name`, `author`, `cover`, `module_name`, `pack`, `path`, `api_path`, `prefix`, `api_alias`) VALUES (7, 'sys_role', 'test', b'0', 'test', 'test', 'test', 'test/', NULL, 'test'); COMMIT; --- ---------------------------- --- Table structure for mnt_database --- ---------------------------- -DROP TABLE IF EXISTS `mnt_database`; -CREATE TABLE `mnt_database` ( - `db_id` varchar(50) NOT NULL COMMENT 'ID', - `name` varchar(255) NOT NULL COMMENT '名称', - `jdbc_url` varchar(255) NOT NULL COMMENT 'jdbc连接', - `user_name` varchar(255) NOT NULL COMMENT '账号', - `pwd` varchar(255) NOT NULL COMMENT '密码', - `create_by` varchar(255) DEFAULT NULL COMMENT '创建者', - `update_by` varchar(255) DEFAULT NULL COMMENT '更新者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`db_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='数据库管理'; - --- ---------------------------- --- Records of mnt_database --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_deploy --- ---------------------------- -DROP TABLE IF EXISTS `mnt_deploy`; -CREATE TABLE `mnt_deploy` ( - `deploy_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `app_id` bigint(20) DEFAULT NULL COMMENT '应用编号', - `create_by` varchar(255) DEFAULT NULL COMMENT '创建者', - `update_by` varchar(255) DEFAULT NULL COMMENT '更新者', - `create_time` datetime DEFAULT NULL, - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`deploy_id`) USING BTREE, - KEY `FK6sy157pseoxx4fmcqr1vnvvhy` (`app_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='部署管理'; - --- ---------------------------- --- Records of mnt_deploy --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_deploy_history --- ---------------------------- -DROP TABLE IF EXISTS `mnt_deploy_history`; -CREATE TABLE `mnt_deploy_history` ( - `history_id` varchar(50) NOT NULL COMMENT 'ID', - `app_name` varchar(255) NOT NULL COMMENT '应用名称', - `deploy_date` datetime NOT NULL COMMENT '部署日期', - `deploy_user` varchar(50) NOT NULL COMMENT '部署用户', - `ip` varchar(20) NOT NULL COMMENT '服务器IP', - `deploy_id` bigint(20) DEFAULT NULL COMMENT '部署编号', - PRIMARY KEY (`history_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='部署历史管理'; - --- ---------------------------- --- Records of mnt_deploy_history --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_deploy_server --- ---------------------------- -DROP TABLE IF EXISTS `mnt_deploy_server`; -CREATE TABLE `mnt_deploy_server` ( - `deploy_id` bigint(20) NOT NULL COMMENT '部署ID', - `server_id` bigint(20) NOT NULL COMMENT '服务ID', - PRIMARY KEY (`deploy_id`,`server_id`) USING BTREE, - KEY `FKeaaha7jew9a02b3bk9ghols53` (`server_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='应用与服务器关联'; - --- ---------------------------- --- Records of mnt_deploy_server --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for mnt_server --- ---------------------------- -DROP TABLE IF EXISTS `mnt_server`; -CREATE TABLE `mnt_server` ( - `server_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `account` varchar(50) DEFAULT NULL COMMENT '账号', - `ip` varchar(20) DEFAULT NULL COMMENT 'IP地址', - `name` varchar(100) DEFAULT NULL COMMENT '名称', - `password` varchar(100) DEFAULT NULL COMMENT '密码', - `port` int(11) DEFAULT NULL COMMENT '端口', - `create_by` varchar(255) DEFAULT NULL COMMENT '创建者', - `update_by` varchar(255) DEFAULT NULL COMMENT '更新者', - `create_time` datetime DEFAULT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`server_id`) USING BTREE, - KEY `idx_ip` (`ip`) -) ENGINE=InnoDB AUTO_INCREMENT=2 ROW_FORMAT=COMPACT COMMENT='服务器管理'; - -- ---------------------------- -- Table structure for sys_dept -- ---------------------------- @@ -200,21 +87,21 @@ CREATE TABLE `sys_dept` ( `create_time` datetime DEFAULT NULL COMMENT '创建日期', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`dept_id`) USING BTREE, - KEY `inx_pid` (`pid`), - KEY `inx_enabled` (`enabled`) -) ENGINE=InnoDB AUTO_INCREMENT=18 ROW_FORMAT=COMPACT COMMENT='部门'; + KEY `idx_pid` (`pid`), + KEY `idx_enabled` (`enabled`) +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='部门'; -- ---------------------------- -- Records of sys_dept -- ---------------------------- BEGIN; -INSERT INTO `sys_dept` VALUES (2, 7, 1, '研发部', 3, b'1', 'admin', 'admin', '2019-03-25 09:15:32', '2020-08-02 14:48:47'); -INSERT INTO `sys_dept` VALUES (5, 7, 0, '运维部', 4, b'1', 'admin', 'admin', '2019-03-25 09:20:44', '2020-05-17 14:27:27'); -INSERT INTO `sys_dept` VALUES (6, 8, 0, '测试部', 6, b'1', 'admin', 'admin', '2019-03-25 09:52:18', '2020-06-08 11:59:21'); -INSERT INTO `sys_dept` VALUES (7, NULL, 2, '华南分部', 0, b'1', 'admin', 'admin', '2019-03-25 11:04:50', '2020-06-08 12:08:56'); -INSERT INTO `sys_dept` VALUES (8, NULL, 2, '华北分部', 1, b'1', 'admin', 'admin', '2019-03-25 11:04:53', '2020-05-14 12:54:00'); -INSERT INTO `sys_dept` VALUES (15, 8, 0, 'UI部门', 7, b'1', 'admin', 'admin', '2020-05-13 22:56:53', '2020-05-14 12:54:13'); -INSERT INTO `sys_dept` VALUES (17, 2, 0, '研发一组', 999, b'1', 'admin', 'admin', '2020-08-02 14:49:07', '2020-08-02 14:49:07'); +INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 7, 1, '研发部', 3, b'1', 'admin', 'admin', '2019-03-25 09:15:32', '2020-08-02 14:48:47'); +INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 7, 0, '运维部', 4, b'1', 'admin', 'admin', '2019-03-25 09:20:44', '2020-05-17 14:27:27'); +INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 8, 0, '测试部', 6, b'1', 'admin', 'admin', '2019-03-25 09:52:18', '2020-06-08 11:59:21'); +INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, NULL, 2, '华南分部', 0, b'1', 'admin', 'admin', '2019-03-25 11:04:50', '2020-06-08 12:08:56'); +INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, NULL, 2, '华北分部', 1, b'1', 'admin', 'admin', '2019-03-25 11:04:53', '2020-05-14 12:54:00'); +INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 8, 0, 'UI部门', 7, b'1', 'admin', 'admin', '2020-05-13 22:56:53', '2020-05-14 12:54:13'); +INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (17, 2, 0, '研发一组', 999, b'1', 'admin', 'admin', '2020-08-02 14:49:07', '2020-08-02 14:49:07'); COMMIT; -- ---------------------------- @@ -230,15 +117,15 @@ CREATE TABLE `sys_dict` ( `create_time` datetime DEFAULT NULL COMMENT '创建日期', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`dict_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=6 ROW_FORMAT=COMPACT COMMENT='数据字典'; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='数据字典'; -- ---------------------------- -- Records of sys_dict -- ---------------------------- BEGIN; -INSERT INTO `sys_dict` VALUES (1, 'user_status', '用户状态', NULL, NULL, '2019-10-27 20:31:36', NULL); -INSERT INTO `sys_dict` VALUES (4, 'dept_status', '部门状态', NULL, NULL, '2019-10-27 20:31:36', NULL); -INSERT INTO `sys_dict` VALUES (5, 'job_status', '岗位状态', NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 'user_status', '用户状态', NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 'dept_status', '部门状态', NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'job_status', '岗位状态', NULL, NULL, '2019-10-27 20:31:36', NULL); COMMIT; -- ---------------------------- @@ -256,19 +143,19 @@ CREATE TABLE `sys_dict_detail` ( `create_time` datetime DEFAULT NULL COMMENT '创建日期', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`detail_id`) USING BTREE, - KEY `FK5tpkputc6d9nboxojdbgnpmyb` (`dict_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=7 ROW_FORMAT=COMPACT COMMENT='数据字典详情'; + KEY `idx_dict_id` (`dict_id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='数据字典详情'; -- ---------------------------- -- Records of sys_dict_detail -- ---------------------------- BEGIN; -INSERT INTO `sys_dict_detail` VALUES (1, 1, '激活', 'true', 1, NULL, NULL, '2019-10-27 20:31:36', NULL); -INSERT INTO `sys_dict_detail` VALUES (2, 1, '禁用', 'false', 2, NULL, NULL, NULL, NULL); -INSERT INTO `sys_dict_detail` VALUES (3, 4, '启用', 'true', 1, NULL, NULL, NULL, NULL); -INSERT INTO `sys_dict_detail` VALUES (4, 4, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); -INSERT INTO `sys_dict_detail` VALUES (5, 5, '启用', 'true', 1, NULL, NULL, NULL, NULL); -INSERT INTO `sys_dict_detail` VALUES (6, 5, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 1, '激活', 'true', 1, NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, '禁用', 'false', 2, NULL, NULL, NULL, NULL); +INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 4, '启用', 'true', 1, NULL, NULL, NULL, NULL); +INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 4, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); +INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 5, '启用', 'true', 1, NULL, NULL, NULL, NULL); +INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 5, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL); COMMIT; -- ---------------------------- @@ -286,17 +173,17 @@ CREATE TABLE `sys_job` ( `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`job_id`) USING BTREE, UNIQUE KEY `uniq_name` (`name`), - KEY `inx_enabled` (`enabled`) -) ENGINE=InnoDB AUTO_INCREMENT=13 ROW_FORMAT=COMPACT COMMENT='岗位'; + KEY `idx_enabled` (`enabled`) +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='岗位'; -- ---------------------------- -- Records of sys_job -- ---------------------------- BEGIN; -INSERT INTO `sys_job` VALUES (8, '人事专员', b'1', 3, NULL, NULL, '2019-03-29 14:52:28', NULL); -INSERT INTO `sys_job` VALUES (10, '产品经理', b'1', 4, NULL, NULL, '2019-03-29 14:55:51', NULL); -INSERT INTO `sys_job` VALUES (11, '全栈开发', b'1', 2, NULL, 'admin', '2019-03-31 13:39:30', '2020-05-05 11:33:43'); -INSERT INTO `sys_job` VALUES (12, '软件测试', b'1', 5, NULL, 'admin', '2019-03-31 13:39:43', '2020-05-10 19:56:26'); +INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, '人事专员', b'1', 3, NULL, NULL, '2019-03-29 14:52:28', NULL); +INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, '产品经理', b'1', 4, NULL, NULL, '2019-03-29 14:55:51', NULL); +INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, '全栈开发', b'1', 2, NULL, 'admin', '2019-03-31 13:39:30', '2020-05-05 11:33:43'); +INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (12, '软件测试', b'1', 5, NULL, 'admin', '2019-03-31 13:39:43', '2020-05-10 19:56:26'); COMMIT; -- ---------------------------- @@ -305,21 +192,27 @@ COMMIT; DROP TABLE IF EXISTS `sys_log`; CREATE TABLE `sys_log` ( `log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `description` varchar(255) DEFAULT NULL, - `log_type` varchar(10) DEFAULT NULL, - `method` varchar(255) DEFAULT NULL, - `params` text DEFAULT NULL, - `request_ip` varchar(255) DEFAULT NULL, - `time` bigint(20) DEFAULT NULL, - `username` varchar(255) DEFAULT NULL, - `address` varchar(255) DEFAULT NULL, - `browser` varchar(255) DEFAULT NULL, - `exception_detail` text DEFAULT NULL, - `create_time` datetime DEFAULT NULL, + `description` varchar(255) DEFAULT NULL COMMENT '描述', + `log_type` varchar(10) NOT NULL COMMENT '日志类型:INFI/ERROR', + `method` varchar(255) DEFAULT NULL COMMENT '方法名', + `params` text DEFAULT NULL COMMENT '参数', + `request_ip` varchar(255) DEFAULT NULL COMMENT '请求IP', + `time` bigint(20) DEFAULT NULL COMMENT '执行时间', + `username` varchar(255) DEFAULT NULL COMMENT '用户名', + `address` varchar(255) DEFAULT NULL COMMENT '地址', + `browser` varchar(255) DEFAULT NULL COMMENT '浏览器', + `exception_detail` text DEFAULT NULL COMMENT '异常', + `create_time` datetime NOT NULL COMMENT '创建时间', PRIMARY KEY (`log_id`) USING BTREE, - KEY `log_create_time_index` (`create_time`), - KEY `inx_log_type` (`log_type`) -) ENGINE=InnoDB AUTO_INCREMENT=3537 ROW_FORMAT=COMPACT COMMENT='系统日志'; + KEY `idx_create_time_index` (`create_time`), + KEY `idx_log_type` (`log_type`) +) ENGINE=InnoDB AUTO_INCREMENT=3593 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统日志'; + +-- ---------------------------- +-- Records of sys_log +-- ---------------------------- +BEGIN; +COMMIT; -- ---------------------------- -- Table structure for sys_menu @@ -347,89 +240,70 @@ CREATE TABLE `sys_menu` ( PRIMARY KEY (`menu_id`) USING BTREE, UNIQUE KEY `uniq_title` (`title`), UNIQUE KEY `uniq_name` (`name`), - KEY `inx_pid` (`pid`) -) ENGINE=InnoDB AUTO_INCREMENT=118 ROW_FORMAT=COMPACT COMMENT='系统菜单'; + KEY `idx_pid` (`pid`) +) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统菜单'; -- ---------------------------- -- Records of sys_menu -- ---------------------------- BEGIN; -INSERT INTO `sys_menu` VALUES (1, NULL, 7, 0, '系统管理', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:11:29', NULL); -INSERT INTO `sys_menu` VALUES (2, 1, 3, 1, '用户管理', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', NULL, NULL, '2018-12-18 15:14:44', NULL); -INSERT INTO `sys_menu` VALUES (3, 1, 3, 1, '角色管理', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', NULL, NULL, '2018-12-18 15:16:07', NULL); -INSERT INTO `sys_menu` VALUES (5, 1, 3, 1, '菜单管理', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', NULL, NULL, '2018-12-18 15:17:28', NULL); -INSERT INTO `sys_menu` VALUES (6, NULL, 5, 0, '系统监控', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:17:48', NULL); -INSERT INTO `sys_menu` VALUES (7, 6, 0, 1, '操作日志', 'Log', 'monitor/log/index', 11, 'log', 'logs', b'0', b'1', b'0', NULL, NULL, 'admin', '2018-12-18 15:18:26', '2020-06-06 13:11:57'); -INSERT INTO `sys_menu` VALUES (9, 6, 0, 1, 'SQL监控', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:19:34', NULL); -INSERT INTO `sys_menu` VALUES (10, NULL, 5, 0, '组件管理', NULL, NULL, 50, 'zujian', 'components', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:16', NULL); -INSERT INTO `sys_menu` VALUES (11, 10, 0, 1, '图标库', 'Icons', 'components/icons/index', 51, 'icon', 'icon', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:49', NULL); -INSERT INTO `sys_menu` VALUES (14, 36, 0, 1, '邮件工具', 'Email', 'tools/email/index', 35, 'email', 'email', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 10:13:09', NULL); -INSERT INTO `sys_menu` VALUES (15, 10, 0, 1, '富文本', 'Editor', 'components/Editor', 52, 'fwb', 'tinymce', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 11:58:25', NULL); -INSERT INTO `sys_menu` VALUES (18, 36, 3, 1, '存储管理', 'Storage', 'tools/storage/index', 34, 'qiniu', 'storage', b'0', b'0', b'0', 'storage:list', NULL, NULL, '2018-12-31 11:12:15', NULL); -INSERT INTO `sys_menu` VALUES (19, 36, 0, 1, '支付宝工具', 'AliPay', 'tools/aliPay/index', 37, 'alipay', 'aliPay', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-31 14:52:38', NULL); -INSERT INTO `sys_menu` VALUES (21, NULL, 2, 0, '多级菜单', NULL, '', 900, 'menu', 'nested', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:22:03', '2020-06-21 17:27:35'); -INSERT INTO `sys_menu` VALUES (22, 21, 2, 0, '二级菜单1', NULL, '', 999, 'menu', 'menu1', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:23:29', '2020-06-21 17:27:20'); -INSERT INTO `sys_menu` VALUES (23, 21, 0, 1, '二级菜单2', NULL, 'nested/menu2/index', 999, 'menu', 'menu2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:23:57', NULL); -INSERT INTO `sys_menu` VALUES (24, 22, 0, 1, '三级菜单1', 'Test', 'nested/menu1/menu1-1', 999, 'menu', 'menu1-1', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:24:48', NULL); -INSERT INTO `sys_menu` VALUES (27, 22, 0, 1, '三级菜单2', NULL, 'nested/menu1/menu1-2', 999, 'menu', 'menu1-2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-07 17:27:32', NULL); -INSERT INTO `sys_menu` VALUES (28, 1, 3, 1, '任务调度', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'0', 'timing:list', NULL, NULL, '2019-01-07 20:34:40', NULL); -INSERT INTO `sys_menu` VALUES (30, 36, 0, 1, '代码生成', 'GeneratorIndex', 'generator/index', 32, 'dev', 'generator', b'0', b'1', b'0', NULL, NULL, NULL, '2019-01-11 15:45:55', NULL); -INSERT INTO `sys_menu` VALUES (32, 6, 0, 1, '异常日志', 'ErrorLog', 'monitor/log/errorLog', 12, 'error', 'errorLog', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-13 13:49:03', NULL); -INSERT INTO `sys_menu` VALUES (33, 10, 0, 1, 'Markdown', 'Markdown', 'components/MarkDown', 53, 'markdown', 'markdown', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 13:46:44', NULL); -INSERT INTO `sys_menu` VALUES (34, 10, 0, 1, 'Yaml编辑器', 'YamlEdit', 'components/YamlEdit', 54, 'dev', 'yaml', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 15:49:40', NULL); -INSERT INTO `sys_menu` VALUES (35, 1, 3, 1, '部门管理', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'0', 'dept:list', NULL, NULL, '2019-03-25 09:46:00', NULL); -INSERT INTO `sys_menu` VALUES (36, NULL, 7, 0, '系统工具', NULL, '', 30, 'sys-tools', 'sys-tools', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-29 10:57:35', NULL); -INSERT INTO `sys_menu` VALUES (37, 1, 3, 1, '岗位管理', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'0', 'job:list', NULL, NULL, '2019-03-29 13:51:18', NULL); -INSERT INTO `sys_menu` VALUES (38, 36, 0, 1, '接口文档', 'Swagger', 'tools/swagger/index', 36, 'swagger', 'swagger2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-29 19:57:53', NULL); -INSERT INTO `sys_menu` VALUES (39, 1, 3, 1, '字典管理', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'0', 'dict:list', NULL, NULL, '2019-04-10 11:49:04', NULL); -INSERT INTO `sys_menu` VALUES (41, 6, 0, 1, '在线用户', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, NULL, NULL, '2019-10-26 22:08:43', NULL); -INSERT INTO `sys_menu` VALUES (44, 2, 0, 2, '用户新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', NULL, NULL, '2019-10-29 10:59:46', NULL); -INSERT INTO `sys_menu` VALUES (45, 2, 0, 2, '用户编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', NULL, NULL, '2019-10-29 11:00:08', NULL); -INSERT INTO `sys_menu` VALUES (46, 2, 0, 2, '用户删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', NULL, NULL, '2019-10-29 11:00:23', NULL); -INSERT INTO `sys_menu` VALUES (48, 3, 0, 2, '角色创建', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', NULL, NULL, '2019-10-29 12:45:34', NULL); -INSERT INTO `sys_menu` VALUES (49, 3, 0, 2, '角色修改', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', NULL, NULL, '2019-10-29 12:46:16', NULL); -INSERT INTO `sys_menu` VALUES (50, 3, 0, 2, '角色删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', NULL, NULL, '2019-10-29 12:46:51', NULL); -INSERT INTO `sys_menu` VALUES (52, 5, 0, 2, '菜单新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', NULL, NULL, '2019-10-29 12:55:07', NULL); -INSERT INTO `sys_menu` VALUES (53, 5, 0, 2, '菜单编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', NULL, NULL, '2019-10-29 12:55:40', NULL); -INSERT INTO `sys_menu` VALUES (54, 5, 0, 2, '菜单删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', NULL, NULL, '2019-10-29 12:56:00', NULL); -INSERT INTO `sys_menu` VALUES (56, 35, 0, 2, '部门新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', NULL, NULL, '2019-10-29 12:57:09', NULL); -INSERT INTO `sys_menu` VALUES (57, 35, 0, 2, '部门编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', NULL, NULL, '2019-10-29 12:57:27', NULL); -INSERT INTO `sys_menu` VALUES (58, 35, 0, 2, '部门删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', NULL, NULL, '2019-10-29 12:57:41', NULL); -INSERT INTO `sys_menu` VALUES (60, 37, 0, 2, '岗位新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', NULL, NULL, '2019-10-29 12:58:27', NULL); -INSERT INTO `sys_menu` VALUES (61, 37, 0, 2, '岗位编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', NULL, NULL, '2019-10-29 12:58:45', NULL); -INSERT INTO `sys_menu` VALUES (62, 37, 0, 2, '岗位删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', NULL, NULL, '2019-10-29 12:59:04', NULL); -INSERT INTO `sys_menu` VALUES (64, 39, 0, 2, '字典新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', NULL, NULL, '2019-10-29 13:00:17', NULL); -INSERT INTO `sys_menu` VALUES (65, 39, 0, 2, '字典编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', NULL, NULL, '2019-10-29 13:00:42', NULL); -INSERT INTO `sys_menu` VALUES (66, 39, 0, 2, '字典删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', NULL, NULL, '2019-10-29 13:00:59', NULL); -INSERT INTO `sys_menu` VALUES (73, 28, 0, 2, '任务新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', NULL, NULL, '2019-10-29 13:07:28', NULL); -INSERT INTO `sys_menu` VALUES (74, 28, 0, 2, '任务编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', NULL, NULL, '2019-10-29 13:07:41', NULL); -INSERT INTO `sys_menu` VALUES (75, 28, 0, 2, '任务删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', NULL, NULL, '2019-10-29 13:07:54', NULL); -INSERT INTO `sys_menu` VALUES (77, 18, 0, 2, '上传文件', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', NULL, NULL, '2019-10-29 13:09:09', NULL); -INSERT INTO `sys_menu` VALUES (78, 18, 0, 2, '文件编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', NULL, NULL, '2019-10-29 13:09:22', NULL); -INSERT INTO `sys_menu` VALUES (79, 18, 0, 2, '文件删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', NULL, NULL, '2019-10-29 13:09:34', NULL); -INSERT INTO `sys_menu` VALUES (80, 6, 0, 1, '服务监控', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', NULL, 'admin', '2019-11-07 13:06:39', '2020-05-04 18:20:50'); -INSERT INTO `sys_menu` VALUES (82, 36, 0, 1, '生成配置', 'GeneratorConfig', 'generator/config', 33, 'dev', 'generator/config/:tableName', b'0', b'1', b'1', '', NULL, NULL, '2019-11-17 20:08:56', NULL); -INSERT INTO `sys_menu` VALUES (83, 10, 0, 1, '图表库', 'Echarts', 'components/Echarts', 50, 'chart', 'echarts', b'0', b'1', b'0', '', NULL, NULL, '2019-11-21 09:04:32', NULL); -INSERT INTO `sys_menu` VALUES (90, NULL, 5, 1, '运维管理', 'Mnt', '', 20, 'mnt', 'mnt', b'0', b'0', b'0', NULL, NULL, NULL, '2019-11-09 10:31:08', NULL); -INSERT INTO `sys_menu` VALUES (92, 90, 3, 1, '服务器', 'ServerDeploy', 'mnt/server/index', 22, 'server', 'mnt/serverDeploy', b'0', b'0', b'0', 'serverDeploy:list', NULL, NULL, '2019-11-10 10:29:25', NULL); -INSERT INTO `sys_menu` VALUES (93, 90, 3, 1, '应用管理', 'App', 'mnt/app/index', 23, 'app', 'mnt/app', b'0', b'0', b'0', 'app:list', NULL, NULL, '2019-11-10 11:05:16', NULL); -INSERT INTO `sys_menu` VALUES (94, 90, 3, 1, '部署管理', 'Deploy', 'mnt/deploy/index', 24, 'deploy', 'mnt/deploy', b'0', b'0', b'0', 'deploy:list', NULL, NULL, '2019-11-10 15:56:55', NULL); -INSERT INTO `sys_menu` VALUES (97, 90, 1, 1, '部署备份', 'DeployHistory', 'mnt/deployHistory/index', 25, 'backup', 'mnt/deployHistory', b'0', b'0', b'0', 'deployHistory:list', NULL, NULL, '2019-11-10 16:49:44', NULL); -INSERT INTO `sys_menu` VALUES (98, 90, 3, 1, '数据库管理', 'Database', 'mnt/database/index', 26, 'database', 'mnt/database', b'0', b'0', b'0', 'database:list', NULL, NULL, '2019-11-10 20:40:04', NULL); -INSERT INTO `sys_menu` VALUES (102, 97, 0, 2, '删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deployHistory:del', NULL, NULL, '2019-11-17 09:32:48', NULL); -INSERT INTO `sys_menu` VALUES (103, 92, 0, 2, '服务器新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:add', NULL, NULL, '2019-11-17 11:08:33', NULL); -INSERT INTO `sys_menu` VALUES (104, 92, 0, 2, '服务器编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:edit', NULL, NULL, '2019-11-17 11:08:57', NULL); -INSERT INTO `sys_menu` VALUES (105, 92, 0, 2, '服务器删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:del', NULL, NULL, '2019-11-17 11:09:15', NULL); -INSERT INTO `sys_menu` VALUES (106, 93, 0, 2, '应用新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:add', NULL, NULL, '2019-11-17 11:10:03', NULL); -INSERT INTO `sys_menu` VALUES (107, 93, 0, 2, '应用编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:edit', NULL, NULL, '2019-11-17 11:10:28', NULL); -INSERT INTO `sys_menu` VALUES (108, 93, 0, 2, '应用删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:del', NULL, NULL, '2019-11-17 11:10:55', NULL); -INSERT INTO `sys_menu` VALUES (109, 94, 0, 2, '部署新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:add', NULL, NULL, '2019-11-17 11:11:22', NULL); -INSERT INTO `sys_menu` VALUES (110, 94, 0, 2, '部署编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:edit', NULL, NULL, '2019-11-17 11:11:41', NULL); -INSERT INTO `sys_menu` VALUES (111, 94, 0, 2, '部署删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:del', NULL, NULL, '2019-11-17 11:12:01', NULL); -INSERT INTO `sys_menu` VALUES (112, 98, 0, 2, '数据库新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'database:add', NULL, NULL, '2019-11-17 11:12:43', NULL); -INSERT INTO `sys_menu` VALUES (113, 98, 0, 2, '数据库编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'database:edit', NULL, NULL, '2019-11-17 11:12:58', NULL); -INSERT INTO `sys_menu` VALUES (114, 98, 0, 2, '数据库删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'database:del', NULL, NULL, '2019-11-17 11:13:14', NULL); -INSERT INTO `sys_menu` VALUES (116, 36, 0, 1, '生成预览', 'Preview', 'generator/preview', 999, 'java', 'generator/preview/:tableName', b'0', b'1', b'1', NULL, NULL, NULL, '2019-11-26 14:54:36', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, NULL, 7, 0, '系统管理', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:11:29', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, 3, 1, '用户管理', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', NULL, NULL, '2018-12-18 15:14:44', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 1, 3, 1, '角色管理', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', NULL, NULL, '2018-12-18 15:16:07', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 1, 3, 1, '菜单管理', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', NULL, NULL, '2018-12-18 15:17:28', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, NULL, 5, 0, '系统监控', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:17:48', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, 6, 0, 1, '操作日志', 'Log', 'monitor/log/index', 11, 'log', 'logs', b'0', b'1', b'0', NULL, NULL, 'admin', '2018-12-18 15:18:26', '2020-06-06 13:11:57'); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (9, 6, 0, 1, 'SQL监控', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:19:34', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, NULL, 5, 0, '组件管理', NULL, NULL, 50, 'zujian', 'components', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:16', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, 10, 0, 1, '图标库', 'Icons', 'components/icons/index', 51, 'icon', 'icon', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:49', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (14, 36, 0, 1, '邮件工具', 'Email', 'tools/email/index', 35, 'email', 'email', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 10:13:09', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 10, 0, 1, '富文本', 'Editor', 'components/Editor', 52, 'fwb', 'tinymce', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 11:58:25', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (18, 36, 3, 1, '存储管理', 'Storage', 'tools/storage/index', 34, 'qiniu', 'storage', b'0', b'0', b'0', 'storage:list', NULL, NULL, '2018-12-31 11:12:15', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (19, 36, 0, 1, '支付宝工具', 'AliPay', 'tools/aliPay/index', 37, 'alipay', 'aliPay', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-31 14:52:38', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (21, NULL, 2, 0, '多级菜单', NULL, '', 900, 'menu', 'nested', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:22:03', '2020-06-21 17:27:35'); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (22, 21, 2, 0, '二级菜单1', NULL, '', 999, 'menu', 'menu1', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:23:29', '2020-06-21 17:27:20'); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (23, 21, 0, 1, '二级菜单2', NULL, 'nested/menu2/index', 999, 'menu', 'menu2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:23:57', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (24, 22, 0, 1, '三级菜单1', 'Test', 'nested/menu1/menu1-1', 999, 'menu', 'menu1-1', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:24:48', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (27, 22, 0, 1, '三级菜单2', NULL, 'nested/menu1/menu1-2', 999, 'menu', 'menu1-2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-07 17:27:32', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (28, 1, 3, 1, '任务调度', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'0', 'timing:list', NULL, NULL, '2019-01-07 20:34:40', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (30, 36, 0, 1, '代码生成', 'GeneratorIndex', 'generator/index', 32, 'dev', 'generator', b'0', b'1', b'0', NULL, NULL, NULL, '2019-01-11 15:45:55', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (32, 6, 0, 1, '异常日志', 'ErrorLog', 'monitor/log/errorLog', 12, 'error', 'errorLog', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-13 13:49:03', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (33, 10, 0, 1, 'Markdown', 'Markdown', 'components/MarkDown', 53, 'markdown', 'markdown', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 13:46:44', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (34, 10, 0, 1, 'Yaml编辑器', 'YamlEdit', 'components/YamlEdit', 54, 'dev', 'yaml', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 15:49:40', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (35, 1, 3, 1, '部门管理', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'0', 'dept:list', NULL, NULL, '2019-03-25 09:46:00', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (36, NULL, 7, 0, '系统工具', NULL, '', 30, 'sys-tools', 'sys-tools', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-29 10:57:35', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (37, 1, 3, 1, '岗位管理', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'0', 'job:list', NULL, NULL, '2019-03-29 13:51:18', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (38, 36, 0, 1, '接口文档', 'Swagger', 'tools/swagger/index', 36, 'swagger', 'swagger2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-29 19:57:53', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (39, 1, 3, 1, '字典管理', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'0', 'dict:list', NULL, NULL, '2019-04-10 11:49:04', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (41, 6, 0, 1, '在线用户', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, NULL, NULL, '2019-10-26 22:08:43', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (44, 2, 0, 2, '用户新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', NULL, NULL, '2019-10-29 10:59:46', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (45, 2, 0, 2, '用户编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', NULL, NULL, '2019-10-29 11:00:08', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (46, 2, 0, 2, '用户删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', NULL, NULL, '2019-10-29 11:00:23', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (48, 3, 0, 2, '角色创建', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', NULL, NULL, '2019-10-29 12:45:34', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (49, 3, 0, 2, '角色修改', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', NULL, NULL, '2019-10-29 12:46:16', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (50, 3, 0, 2, '角色删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', NULL, NULL, '2019-10-29 12:46:51', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (52, 5, 0, 2, '菜单新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', NULL, NULL, '2019-10-29 12:55:07', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (53, 5, 0, 2, '菜单编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', NULL, NULL, '2019-10-29 12:55:40', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (54, 5, 0, 2, '菜单删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', NULL, NULL, '2019-10-29 12:56:00', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (56, 35, 0, 2, '部门新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', NULL, NULL, '2019-10-29 12:57:09', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (57, 35, 0, 2, '部门编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', NULL, NULL, '2019-10-29 12:57:27', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (58, 35, 0, 2, '部门删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', NULL, NULL, '2019-10-29 12:57:41', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (60, 37, 0, 2, '岗位新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', NULL, NULL, '2019-10-29 12:58:27', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (61, 37, 0, 2, '岗位编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', NULL, NULL, '2019-10-29 12:58:45', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (62, 37, 0, 2, '岗位删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', NULL, NULL, '2019-10-29 12:59:04', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (64, 39, 0, 2, '字典新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', NULL, NULL, '2019-10-29 13:00:17', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (65, 39, 0, 2, '字典编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', NULL, NULL, '2019-10-29 13:00:42', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (66, 39, 0, 2, '字典删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', NULL, NULL, '2019-10-29 13:00:59', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (73, 28, 0, 2, '任务新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', NULL, NULL, '2019-10-29 13:07:28', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (74, 28, 0, 2, '任务编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', NULL, NULL, '2019-10-29 13:07:41', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (75, 28, 0, 2, '任务删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', NULL, NULL, '2019-10-29 13:07:54', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (77, 18, 0, 2, '上传文件', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', NULL, NULL, '2019-10-29 13:09:09', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (78, 18, 0, 2, '文件编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', NULL, NULL, '2019-10-29 13:09:22', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (79, 18, 0, 2, '文件删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', NULL, NULL, '2019-10-29 13:09:34', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (80, 6, 0, 1, '服务监控', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', NULL, 'admin', '2019-11-07 13:06:39', '2020-05-04 18:20:50'); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (82, 36, 0, 1, '生成配置', 'GeneratorConfig', 'generator/config', 33, 'dev', 'generator/config/:tableName', b'0', b'1', b'1', '', NULL, NULL, '2019-11-17 20:08:56', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (83, 10, 0, 1, '图表库', 'Echarts', 'components/Echarts', 50, 'chart', 'echarts', b'0', b'1', b'0', '', NULL, NULL, '2019-11-21 09:04:32', NULL); +INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (116, 36, 0, 1, '生成预览', 'Preview', 'generator/preview', 999, 'java', 'generator/preview/:tableName', b'0', b'1', b'1', NULL, NULL, NULL, '2019-11-26 14:54:36', NULL); COMMIT; -- ---------------------------- @@ -454,17 +328,17 @@ CREATE TABLE `sys_quartz_job` ( `create_time` datetime DEFAULT NULL COMMENT '创建日期', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`job_id`) USING BTREE, - KEY `inx_is_pause` (`is_pause`) -) ENGINE=InnoDB AUTO_INCREMENT=7 ROW_FORMAT=COMPACT COMMENT='定时任务'; + KEY `idx_is_pause` (`is_pause`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='定时任务'; -- ---------------------------- -- Records of sys_quartz_job -- ---------------------------- BEGIN; -INSERT INTO `sys_quartz_job` VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '测试', NULL, NULL, NULL, NULL, 'admin', '2019-08-22 14:08:29', '2020-05-24 13:58:33'); -INSERT INTO `sys_quartz_job` VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试', 'run', '', '不带参测试', 'Zheng Jie', '', '5,6', b'1', NULL, 'admin', '2019-09-26 16:44:39', '2020-05-24 14:48:12'); -INSERT INTO `sys_quartz_job` VALUES (5, 'Test', '0/5 * * * * ?', b'1', '任务告警测试', 'run', NULL, '测试', 'test', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:32:41', '2020-05-05 20:36:13'); -INSERT INTO `sys_quartz_job` VALUES (6, 'testTask', '0/5 * * * * ?', b'1', '测试3', 'run2', NULL, '测试3', 'Zheng Jie', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:35:41', '2020-05-05 20:36:07'); +INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '测试', NULL, NULL, NULL, NULL, 'admin', '2019-08-22 14:08:29', '2020-05-24 13:58:33'); +INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试', 'run', '', '不带参测试', 'Zheng Jie', '', '6', b'1', NULL, 'admin', '2019-09-26 16:44:39', '2020-05-24 14:48:12'); +INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'Test', '0/5 * * * * ?', b'1', '任务告警测试', 'run', NULL, '测试', 'test', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:32:41', '2020-05-05 20:36:13'); +INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 'testTask', '0/5 * * * * ?', b'1', '测试3', 'run2', NULL, '测试3', 'Zheng Jie', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:35:41', '2020-05-05 20:36:07'); COMMIT; -- ---------------------------- @@ -473,17 +347,23 @@ COMMIT; DROP TABLE IF EXISTS `sys_quartz_log`; CREATE TABLE `sys_quartz_log` ( `log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `bean_name` varchar(255) DEFAULT NULL, - `create_time` datetime DEFAULT NULL, - `cron_expression` varchar(255) DEFAULT NULL, - `exception_detail` text DEFAULT NULL, - `is_success` bit(1) DEFAULT NULL, - `job_name` varchar(255) DEFAULT NULL, - `method_name` varchar(255) DEFAULT NULL, - `params` varchar(255) DEFAULT NULL, - `time` bigint(20) DEFAULT NULL, + `bean_name` varchar(255) DEFAULT NULL COMMENT 'Bean名称', + `cron_expression` varchar(255) DEFAULT NULL COMMENT 'cron 表达式', + `is_success` bit(1) DEFAULT NULL COMMENT '是否执行成功', + `job_name` varchar(255) DEFAULT NULL COMMENT '任务名称', + `method_name` varchar(255) DEFAULT NULL COMMENT '方法名称', + `params` varchar(255) DEFAULT NULL COMMENT '参数', + `time` bigint(20) DEFAULT NULL COMMENT '执行耗时', + `exception_detail` text DEFAULT NULL COMMENT '异常详情', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', PRIMARY KEY (`log_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=151 ROW_FORMAT=COMPACT COMMENT='定时任务日志'; +) ENGINE=InnoDB AUTO_INCREMENT=171 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='定时任务日志'; + +-- ---------------------------- +-- Records of sys_quartz_log +-- ---------------------------- +BEGIN; +COMMIT; -- ---------------------------- -- Table structure for sys_role @@ -501,15 +381,15 @@ CREATE TABLE `sys_role` ( `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`role_id`) USING BTREE, UNIQUE KEY `uniq_name` (`name`), - KEY `role_name_index` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=3 ROW_FORMAT=COMPACT COMMENT='角色表'; + KEY `idx_level` (`level`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='角色表'; -- ---------------------------- -- Records of sys_role -- ---------------------------- BEGIN; -INSERT INTO `sys_role` VALUES (1, '超级管理员', 1, '-', '全部', NULL, 'admin', '2018-11-23 11:04:37', '2020-08-06 16:10:24'); -INSERT INTO `sys_role` VALUES (2, '普通用户', 2, '-', '本级', NULL, 'admin', '2018-11-23 13:09:06', '2020-09-05 10:45:12'); +INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, '超级管理员', 1, '-', '全部', NULL, 'admin', '2018-11-23 11:04:37', '2020-08-06 16:10:24'); +INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, '普通用户', 2, '-', '本级', NULL, 'admin', '2018-11-23 13:09:06', '2020-09-05 10:45:12'); COMMIT; -- ---------------------------- @@ -517,11 +397,18 @@ COMMIT; -- ---------------------------- DROP TABLE IF EXISTS `sys_roles_depts`; CREATE TABLE `sys_roles_depts` ( - `role_id` bigint(20) NOT NULL, - `dept_id` bigint(20) NOT NULL, + `role_id` bigint(20) NOT NULL COMMENT '角色ID', + `dept_id` bigint(20) NOT NULL COMMENT '部门ID', PRIMARY KEY (`role_id`,`dept_id`) USING BTREE, - KEY `FK7qg6itn5ajdoa9h9o78v9ksur` (`dept_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='角色部门关联'; + KEY `idx_role_id` (`role_id`), + KEY `idx_dept_id` (`dept_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='角色部门关联'; + +-- ---------------------------- +-- Records of sys_roles_depts +-- ---------------------------- +BEGIN; +COMMIT; -- ---------------------------- -- Table structure for sys_roles_menus @@ -531,113 +418,95 @@ CREATE TABLE `sys_roles_menus` ( `menu_id` bigint(20) NOT NULL COMMENT '菜单ID', `role_id` bigint(20) NOT NULL COMMENT '角色ID', PRIMARY KEY (`menu_id`,`role_id`) USING BTREE, - KEY `FKcngg2qadojhi3a651a5adkvbq` (`role_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='角色菜单关联'; + KEY `idx_menu_id` (`menu_id`), + KEY `idx_role_id` (`role_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='角色菜单关联'; -- ---------------------------- -- Records of sys_roles_menus -- ---------------------------- BEGIN; -INSERT INTO `sys_roles_menus` VALUES (1, 1); -INSERT INTO `sys_roles_menus` VALUES (2, 1); -INSERT INTO `sys_roles_menus` VALUES (3, 1); -INSERT INTO `sys_roles_menus` VALUES (5, 1); -INSERT INTO `sys_roles_menus` VALUES (6, 1); -INSERT INTO `sys_roles_menus` VALUES (7, 1); -INSERT INTO `sys_roles_menus` VALUES (9, 1); -INSERT INTO `sys_roles_menus` VALUES (10, 1); -INSERT INTO `sys_roles_menus` VALUES (11, 1); -INSERT INTO `sys_roles_menus` VALUES (14, 1); -INSERT INTO `sys_roles_menus` VALUES (15, 1); -INSERT INTO `sys_roles_menus` VALUES (18, 1); -INSERT INTO `sys_roles_menus` VALUES (19, 1); -INSERT INTO `sys_roles_menus` VALUES (21, 1); -INSERT INTO `sys_roles_menus` VALUES (22, 1); -INSERT INTO `sys_roles_menus` VALUES (23, 1); -INSERT INTO `sys_roles_menus` VALUES (24, 1); -INSERT INTO `sys_roles_menus` VALUES (27, 1); -INSERT INTO `sys_roles_menus` VALUES (28, 1); -INSERT INTO `sys_roles_menus` VALUES (30, 1); -INSERT INTO `sys_roles_menus` VALUES (32, 1); -INSERT INTO `sys_roles_menus` VALUES (33, 1); -INSERT INTO `sys_roles_menus` VALUES (34, 1); -INSERT INTO `sys_roles_menus` VALUES (35, 1); -INSERT INTO `sys_roles_menus` VALUES (36, 1); -INSERT INTO `sys_roles_menus` VALUES (37, 1); -INSERT INTO `sys_roles_menus` VALUES (38, 1); -INSERT INTO `sys_roles_menus` VALUES (39, 1); -INSERT INTO `sys_roles_menus` VALUES (41, 1); -INSERT INTO `sys_roles_menus` VALUES (44, 1); -INSERT INTO `sys_roles_menus` VALUES (45, 1); -INSERT INTO `sys_roles_menus` VALUES (46, 1); -INSERT INTO `sys_roles_menus` VALUES (48, 1); -INSERT INTO `sys_roles_menus` VALUES (49, 1); -INSERT INTO `sys_roles_menus` VALUES (50, 1); -INSERT INTO `sys_roles_menus` VALUES (52, 1); -INSERT INTO `sys_roles_menus` VALUES (53, 1); -INSERT INTO `sys_roles_menus` VALUES (54, 1); -INSERT INTO `sys_roles_menus` VALUES (56, 1); -INSERT INTO `sys_roles_menus` VALUES (57, 1); -INSERT INTO `sys_roles_menus` VALUES (58, 1); -INSERT INTO `sys_roles_menus` VALUES (60, 1); -INSERT INTO `sys_roles_menus` VALUES (61, 1); -INSERT INTO `sys_roles_menus` VALUES (62, 1); -INSERT INTO `sys_roles_menus` VALUES (64, 1); -INSERT INTO `sys_roles_menus` VALUES (65, 1); -INSERT INTO `sys_roles_menus` VALUES (66, 1); -INSERT INTO `sys_roles_menus` VALUES (73, 1); -INSERT INTO `sys_roles_menus` VALUES (74, 1); -INSERT INTO `sys_roles_menus` VALUES (75, 1); -INSERT INTO `sys_roles_menus` VALUES (77, 1); -INSERT INTO `sys_roles_menus` VALUES (78, 1); -INSERT INTO `sys_roles_menus` VALUES (79, 1); -INSERT INTO `sys_roles_menus` VALUES (80, 1); -INSERT INTO `sys_roles_menus` VALUES (82, 1); -INSERT INTO `sys_roles_menus` VALUES (83, 1); -INSERT INTO `sys_roles_menus` VALUES (90, 1); -INSERT INTO `sys_roles_menus` VALUES (92, 1); -INSERT INTO `sys_roles_menus` VALUES (93, 1); -INSERT INTO `sys_roles_menus` VALUES (94, 1); -INSERT INTO `sys_roles_menus` VALUES (97, 1); -INSERT INTO `sys_roles_menus` VALUES (98, 1); -INSERT INTO `sys_roles_menus` VALUES (102, 1); -INSERT INTO `sys_roles_menus` VALUES (103, 1); -INSERT INTO `sys_roles_menus` VALUES (104, 1); -INSERT INTO `sys_roles_menus` VALUES (105, 1); -INSERT INTO `sys_roles_menus` VALUES (106, 1); -INSERT INTO `sys_roles_menus` VALUES (107, 1); -INSERT INTO `sys_roles_menus` VALUES (108, 1); -INSERT INTO `sys_roles_menus` VALUES (109, 1); -INSERT INTO `sys_roles_menus` VALUES (110, 1); -INSERT INTO `sys_roles_menus` VALUES (111, 1); -INSERT INTO `sys_roles_menus` VALUES (112, 1); -INSERT INTO `sys_roles_menus` VALUES (113, 1); -INSERT INTO `sys_roles_menus` VALUES (114, 1); -INSERT INTO `sys_roles_menus` VALUES (116, 1); -INSERT INTO `sys_roles_menus` VALUES (1, 2); -INSERT INTO `sys_roles_menus` VALUES (2, 2); -INSERT INTO `sys_roles_menus` VALUES (6, 2); -INSERT INTO `sys_roles_menus` VALUES (7, 2); -INSERT INTO `sys_roles_menus` VALUES (9, 2); -INSERT INTO `sys_roles_menus` VALUES (10, 2); -INSERT INTO `sys_roles_menus` VALUES (11, 2); -INSERT INTO `sys_roles_menus` VALUES (14, 2); -INSERT INTO `sys_roles_menus` VALUES (15, 2); -INSERT INTO `sys_roles_menus` VALUES (19, 2); -INSERT INTO `sys_roles_menus` VALUES (21, 2); -INSERT INTO `sys_roles_menus` VALUES (22, 2); -INSERT INTO `sys_roles_menus` VALUES (23, 2); -INSERT INTO `sys_roles_menus` VALUES (24, 2); -INSERT INTO `sys_roles_menus` VALUES (27, 2); -INSERT INTO `sys_roles_menus` VALUES (30, 2); -INSERT INTO `sys_roles_menus` VALUES (32, 2); -INSERT INTO `sys_roles_menus` VALUES (33, 2); -INSERT INTO `sys_roles_menus` VALUES (34, 2); -INSERT INTO `sys_roles_menus` VALUES (36, 2); -INSERT INTO `sys_roles_menus` VALUES (80, 2); -INSERT INTO `sys_roles_menus` VALUES (82, 2); -INSERT INTO `sys_roles_menus` VALUES (83, 2); -INSERT INTO `sys_roles_menus` VALUES (116, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (1, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (1, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (2, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (2, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (3, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (5, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (6, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (6, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (7, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (7, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (9, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (9, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (10, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (10, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (11, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (11, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (14, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (14, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (15, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (15, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (18, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (19, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (19, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (21, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (21, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (22, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (22, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (23, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (23, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (24, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (24, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (27, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (27, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (28, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (30, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (30, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (32, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (32, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (33, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (33, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (34, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (34, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (35, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (36, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (36, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (37, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (38, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (39, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (41, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (44, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (45, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (46, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (48, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (49, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (50, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (52, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (53, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (54, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (56, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (57, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (58, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (60, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (61, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (62, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (64, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (65, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (66, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (73, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (74, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (75, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (77, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (78, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (79, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (80, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (80, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (82, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (82, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (83, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (83, 2); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (116, 1); +INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (116, 2); COMMIT; -- ---------------------------- @@ -663,20 +532,18 @@ CREATE TABLE `sys_user` ( `create_time` datetime DEFAULT NULL COMMENT '创建日期', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`user_id`) USING BTREE, - UNIQUE KEY `UK_kpubos9gc2cvtkb0thktkbkes` (`email`) USING BTREE, - UNIQUE KEY `username` (`username`) USING BTREE, - UNIQUE KEY `uniq_username` (`username`), - UNIQUE KEY `uniq_email` (`email`), - KEY `FK5rwmryny6jthaaxkogownknqp` (`dept_id`) USING BTREE, - KEY `inx_enabled` (`enabled`) -) ENGINE=InnoDB AUTO_INCREMENT=3 ROW_FORMAT=COMPACT COMMENT='系统用户'; + UNIQUE KEY `uniq_email` (`email`) USING BTREE, + UNIQUE KEY `uniq_username` (`username`) USING BTREE, + KEY `idx_dept_id` (`dept_id`) USING BTREE, + KEY `idx_enabled` (`enabled`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统用户'; -- ---------------------------- -- Records of sys_user -- ---------------------------- BEGIN; -INSERT INTO `sys_user` VALUES (1, 2, 'admin', '管理员', '男', '18888888888', '201507802@qq.com', 'avatar-20200806032259161.png', '/Users/jie/Documents/work/me/admin/eladmin/~/avatar/avatar-20200806032259161.png', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'1', 1, NULL, 'admin', '2020-05-03 16:38:31', '2018-08-23 09:11:56', '2020-09-05 10:43:31'); -INSERT INTO `sys_user` VALUES (2, 2, 'test', '测试', '男', '19999999999', '231@qq.com', NULL, NULL, '$2a$10$4XcyudOYTSz6fue6KFNMHeUQnCX5jbBQypLEnGk1PmekXt5c95JcK', b'0', 1, 'admin', 'admin', NULL, '2020-05-05 11:15:49', '2020-09-05 10:43:38'); +INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (1, 2, 'admin', '管理员', '男', '18888888888', '201507802@qq.com', 'avatar-20250114101539224.png', '/Users/jie/Documents/work/me/admin/eladmin-mp/eladmin/~/avatar/avatar-20250114101539224.png', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'1', b'1', NULL, 'admin', '2020-05-03 16:38:31', '2018-08-23 09:11:56', '2020-09-05 10:43:31'); +INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (2, 2, 'test', '测试', '男', '19999999999', '231@qq.com', NULL, NULL, '$2a$10$4XcyudOYTSz6fue6KFNMHeUQnCX5jbBQypLEnGk1PmekXt5c95JcK', b'0', b'1', 'admin', 'admin', NULL, '2020-05-05 11:15:49', '2020-09-05 10:43:38'); COMMIT; -- ---------------------------- @@ -686,15 +553,17 @@ DROP TABLE IF EXISTS `sys_users_jobs`; CREATE TABLE `sys_users_jobs` ( `user_id` bigint(20) NOT NULL COMMENT '用户ID', `job_id` bigint(20) NOT NULL COMMENT '岗位ID', - PRIMARY KEY (`user_id`,`job_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; + PRIMARY KEY (`user_id`,`job_id`), + KEY `idx_user_id` (`user_id`), + KEY `idx_job_id` (`job_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='用户与岗位关联表'; -- ---------------------------- -- Records of sys_users_jobs -- ---------------------------- BEGIN; -INSERT INTO `sys_users_jobs` VALUES (1, 11); -INSERT INTO `sys_users_jobs` VALUES (2, 12); +INSERT INTO `sys_users_jobs` (`user_id`, `job_id`) VALUES (1, 11); +INSERT INTO `sys_users_jobs` (`user_id`, `job_id`) VALUES (2, 12); COMMIT; -- ---------------------------- @@ -705,15 +574,16 @@ CREATE TABLE `sys_users_roles` ( `user_id` bigint(20) NOT NULL COMMENT '用户ID', `role_id` bigint(20) NOT NULL COMMENT '角色ID', PRIMARY KEY (`user_id`,`role_id`) USING BTREE, - KEY `FKq4eq273l04bpu4efj0jd0jb98` (`role_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='用户角色关联'; + KEY `idx_user_id` (`user_id`), + KEY `idx_role_id` (`role_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='用户角色关联'; -- ---------------------------- -- Records of sys_users_roles -- ---------------------------- BEGIN; -INSERT INTO `sys_users_roles` VALUES (1, 1); -INSERT INTO `sys_users_roles` VALUES (2, 2); +INSERT INTO `sys_users_roles` (`user_id`, `role_id`) VALUES (1, 1); +INSERT INTO `sys_users_roles` (`user_id`, `role_id`) VALUES (2, 2); COMMIT; -- ---------------------------- @@ -733,14 +603,7 @@ CREATE TABLE `tool_alipay_config` ( `sign_type` varchar(255) DEFAULT NULL COMMENT '签名方式', `sys_service_provider_id` varchar(255) DEFAULT NULL COMMENT '商户号', PRIMARY KEY (`config_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='支付宝配置类'; - --- ---------------------------- --- Records of tool_alipay_config --- ---------------------------- -BEGIN; -INSERT INTO `tool_alipay_config` VALUES (1, '2016091700532697', 'utf-8', 'JSON', 'https://openapi.alipaydev.com/gateway.do', 'http://api.auauz.net/api/aliPay/notify', 'MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5js8sInU10AJ0cAQ8UMMyXrQ+oHZEkVt5lBwsStmTJ7YikVYgbskx1YYEXTojRsWCb+SH/kDmDU4pK/u91SJ4KFCRMF2411piYuXU/jF96zKrADznYh/zAraqT6hvAIVtQAlMHN53nx16rLzZ/8jDEkaSwT7+HvHiS+7sxSojnu/3oV7BtgISoUNstmSe8WpWHOaWv19xyS+Mce9MY4BfseFhzTICUymUQdd/8hXA28/H6osUfAgsnxAKv7Wil3aJSgaJczWuflYOve0dJ3InZkhw5Cvr0atwpk8YKBQjy5CdkoHqvkOcIB+cYHXJKzOE5tqU7inSwVbHzOLQ3XbnAgMBAAECggEAVJp5eT0Ixg1eYSqFs9568WdetUNCSUchNxDBu6wxAbhUgfRUGZuJnnAll63OCTGGck+EGkFh48JjRcBpGoeoHLL88QXlZZbC/iLrea6gcDIhuvfzzOffe1RcZtDFEj9hlotg8dQj1tS0gy9pN9g4+EBH7zeu+fyv+qb2e/v1l6FkISXUjpkD7RLQr3ykjiiEw9BpeKb7j5s7Kdx1NNIzhkcQKNqlk8JrTGDNInbDM6inZfwwIO2R1DHinwdfKWkvOTODTYa2MoAvVMFT9Bec9FbLpoWp7ogv1JMV9svgrcF9XLzANZ/OQvkbe9TV9GWYvIbxN6qwQioKCWO4GPnCAQKBgQDgW5MgfhX8yjXqoaUy/d1VjI8dHeIyw8d+OBAYwaxRSlCfyQ+tieWcR2HdTzPca0T0GkWcKZm0ei5xRURgxt4DUDLXNh26HG0qObbtLJdu/AuBUuCqgOiLqJ2f1uIbrz6OZUHns+bT/jGW2Ws8+C13zTCZkZt9CaQsrp3QOGDx5wKBgQDTul39hp3ZPwGNFeZdkGoUoViOSd5Lhowd5wYMGAEXWRLlU8z+smT5v0POz9JnIbCRchIY2FAPKRdVTICzmPk2EPJFxYTcwaNbVqL6lN7J2IlXXMiit5QbiLauo55w7plwV6LQmKm9KV7JsZs5XwqF7CEovI7GevFzyD3w+uizAQKBgC3LY1eRhOlpWOIAhpjG6qOoohmeXOphvdmMlfSHq6WYFqbWwmV4rS5d/6LNpNdL6fItXqIGd8I34jzql49taCmi+A2nlR/E559j0mvM20gjGDIYeZUz5MOE8k+K6/IcrhcgofgqZ2ZED1ksHdB/E8DNWCswZl16V1FrfvjeWSNnAoGAMrBplCrIW5xz+J0Hm9rZKrs+AkK5D4fUv8vxbK/KgxZ2KaUYbNm0xv39c+PZUYuFRCz1HDGdaSPDTE6WeWjkMQd5mS6ikl9hhpqFRkyh0d0fdGToO9yLftQKOGE/q3XUEktI1XvXF0xyPwNgUCnq0QkpHyGVZPtGFxwXiDvpvgECgYA5PoB+nY8iDiRaJNko9w0hL4AeKogwf+4TbCw+KWVEn6jhuJa4LFTdSqp89PktQaoVpwv92el/AhYjWOl/jVCm122f9b7GyoelbjMNolToDwe5pF5RnSpEuDdLy9MfE8LnE3PlbE7E5BipQ3UjSebkgNboLHH/lNZA5qvEtvbfvQ==', 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAut9evKRuHJ/2QNfDlLwvN/S8l9hRAgPbb0u61bm4AtzaTGsLeMtScetxTWJnVvAVpMS9luhEJjt+Sbk5TNLArsgzzwARgaTKOLMT1TvWAK5EbHyI+eSrc3s7Awe1VYGwcubRFWDm16eQLv0k7iqiw+4mweHSz/wWyvBJVgwLoQ02btVtAQErCfSJCOmt0Q/oJQjj08YNRV4EKzB19+f5A+HQVAKy72dSybTzAK+3FPtTtNen/+b5wGeat7c32dhYHnGorPkPeXLtsqqUTp1su5fMfd4lElNdZaoCI7osZxWWUo17vBCZnyeXc9fk0qwD9mK6yRAxNbrY72Xx5VqIqwIDAQAB', 'http://api.auauz.net/api/aliPay/return', 'RSA2', '2088102176044281'); -COMMIT; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='支付宝配置类'; -- ---------------------------- -- Table structure for tool_email_config @@ -754,7 +617,13 @@ CREATE TABLE `tool_email_config` ( `port` varchar(255) DEFAULT NULL COMMENT '端口', `user` varchar(255) DEFAULT NULL COMMENT '发件者用户名', PRIMARY KEY (`config_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='邮箱配置'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='邮箱配置'; + +-- ---------------------------- +-- Records of tool_email_config +-- ---------------------------- +BEGIN; +COMMIT; -- ---------------------------- -- Table structure for tool_local_storage @@ -773,7 +642,7 @@ CREATE TABLE `tool_local_storage` ( `create_time` datetime DEFAULT NULL COMMENT '创建日期', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`storage_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=10 ROW_FORMAT=COMPACT COMMENT='本地存储'; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='本地存储'; -- ---------------------------- -- Records of tool_local_storage @@ -794,7 +663,13 @@ CREATE TABLE `tool_qiniu_config` ( `type` varchar(255) DEFAULT NULL COMMENT '空间类型', `zone` varchar(255) DEFAULT NULL COMMENT '机房', PRIMARY KEY (`config_id`) USING BTREE -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='七牛云配置'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='七牛云配置'; + +-- ---------------------------- +-- Records of tool_qiniu_config +-- ---------------------------- +BEGIN; +COMMIT; -- ---------------------------- -- Table structure for tool_qiniu_content @@ -811,7 +686,7 @@ CREATE TABLE `tool_qiniu_content` ( `update_time` datetime DEFAULT NULL COMMENT '上传或同步的时间', PRIMARY KEY (`content_id`) USING BTREE, UNIQUE KEY `uniq_name` (`name`) -) ENGINE=InnoDB ROW_FORMAT=COMPACT COMMENT='七牛云文件存储'; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='七牛云文件存储'; -- ---------------------------- -- Records of tool_qiniu_content