Commit 75d21928a41ab0773153b62152fbaa6c9294622a

Authored by wangkai
2 parents 0d09d305 28d9ecee

Merge branch 'master' into unit_logger_system

# Conflicts:
#	src/test/resources/sql/clean.sql
#	src/test/resources/sql/create_tables.sql
Showing 59 changed files with 1952 additions and 635 deletions
README.md
1 1 ## 平台简介
2 2  
3   -**芋道** 是基于 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue) **重构**,一套**全部开源**的**企业级**的快速开发平台,毫无保留给个人及企业免费使用。
  3 +**芋道**,一套**全部开源**的**企业级**的快速开发平台,毫无保留给个人及企业免费使用。
4 4  
5 5 > 有任何问题,或者想要的功能,可以在 _Issues_ 中提给艿艿。
6 6  
... ... @@ -17,40 +17,63 @@
17 17 * 基础设施
18 18 * 研发工具
19 19  
  20 +> 友情提示:本项目基于 RuoYi-Vue 修改,**重构优化**后端的代码,**美化**前端的界面。
  21 +>
  22 +> 额外新增的功能,我们使用 🚀 标记。
  23 +
  24 +🙂 所有功能,都通过 **单元测试** 保证高质量。
  25 +
20 26 ### 系统功能
21 27  
22   -1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置
23   -1. 在线用户:当前系统中活跃用户状态监控
24   -1. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分
25   -1. 菜单管理:配置系统菜单,操作权限,按钮权限标识等
26   -1. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限
27   -1. 岗位管理:配置系统用户所属担任职务
28   -1. 字典管理:对系统中经常使用的一些较为固定的数据进行维护
29   -1. 通知公告:系统通知公告信息发布维护
30   -1. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询
31   -1. 登录日志:系统登录日志记录查询包含登录异常
  28 +
  29 +| | 功能 | 描述 |
  30 +| --- | --- | --- |
  31 +| | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 |
  32 +| | 在线用户 | 当前系统中活跃用户状态监控,支持手动踢下线 |
  33 +| | 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 |
  34 +| | 菜单管理 | 配置系统菜单,操作权限,按钮权限标识等 |
  35 +| | 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限 |
  36 +| | 岗位管理 | 配置系统用户所属担任职务 |
  37 +| | 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 |
  38 +| | 通知公告 | 系统通知公告信息发布维护 |
  39 +| 🚀 | 操作日志 | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 |
  40 +| | 登录日志 | 系统登录日志记录查询包含登录异常 |
  41 +
  42 +计划新增功能:
  43 +* 短信
  44 +* 邮件
  45 +* 钉钉、飞书等通知
32 46  
33 47 ### 基础设施
34 48  
35   -1. 配置管理:对系统动态配置常用参数
36   -1. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志
37   -1. API 日志:包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题
38   -1. MySQL 监控:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈
39   -1. Redis 监控:监控 Redis 数据库的使用情况,使用的 Redis Key 管理
40   -1. Java 监控:基于 Spring Boot Admin 实现 Java 应用的监控
41   -1. 链路追踪:基于 SkyWalking 实现性能监控,特别是链路的追踪
42   -1. 分布式锁:基于 Redis 实现分布式锁,满足并发场景
43   -1. 幂等组件:基于 Redis 实现幂等组件,解决重复请求问题
44   -1. 服务保障:基于 Resilience4j 实现服务的稳定性,包括限流、熔断等功能
45   -1. 日志服务:轻量级日志中心,查看远程服务器的日志
46   -1. 单元测试:基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等
  49 +| | 功能 | 描述 |
  50 +| --- | --- | --- |
  51 +| 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 |
  52 +| | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
  53 +| 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 |
  54 +| | MySQL 监控 | 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈 |
  55 +| | Redis 监控 |监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
  56 +| 🚀 |Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 |
  57 +| 🚀 | 链路追踪 | 基于 SkyWalking 实现性能监控,特别是链路的追踪 |
  58 +| 🚀 | 分布式锁 | 基于 Redis 实现分布式锁,满足并发场景 |
  59 +| 🚀 | 幂等组件 | 基于 Redis 实现幂等组件,解决重复请求问题 |
  60 +| 🚀 | 服务保障 | 基于 Resilience4j 实现服务的稳定性,包括限流、熔断等功能 |
  61 +| 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 |
  62 +| 🚀 | 单元测试 |基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 |
  63 +
  64 +计划新增:
  65 +* 工作流
  66 +* 错误码
  67 +* 文件服务
47 68  
48 69 ### 研发工具
49 70  
50   -1. 表单构建:拖动表单元素生成相应的 HTML 代码
51   -1. 代码生成:前后端代码的生成(Java、Vue、SQL、单元测试),支持 CRUD 下载
52   -1. 系统接口:基于 Swagger 自动生成相关的 RESTful API 接口文档
53   -1. 数据库文档:基于 Screw 自动生成数据库文档
  71 +| | 功能 | 描述 |
  72 +| --- | --- | --- |
  73 +| 🚀 | 代码生成 |前后端代码的生成(Java、Vue、SQL、单元测试),支持 CRUD 下载 |
  74 +| 🚀 | 系统接口 | 基于 Swagger 自动生成相关的 RESTful API 接口文档 |
  75 +| 🚀 | 数据库文档 | 基于 Screw 自动生成数据库文档,支持导出 Word、HTML、MD 格式 |
  76 +| | 表单构建 | 拖动表单元素生成相应的 HTML 代码 |
54 77  
55 78 ## 在线体验
56 79  
... ... @@ -86,7 +109,7 @@
86 109 | [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.4.1 | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) |
87 110 | [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.16.14 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) |
88 111 | [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.7.0 | - |
89   -| [Mockito](https://junit.org/junit5/) | Java Mock 框架 | 3.6.28 | - |
  112 +| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 3.6.28 | - |
90 113  
91 114 **前端**
92 115  
... ...
... ... @@ -2,7 +2,7 @@
2 2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5   - <modelVersion>4.0.0</modelVersion>
  5 + <modelVersion>4.0.0</modelVersion>
6 6  
7 7 <groupId>cn.iocoder</groupId>
8 8 <artifactId>dashboard</artifactId>
... ... @@ -25,6 +25,7 @@
25 25 <spring.boot.version>2.4.2</spring.boot.version>
26 26 <!-- Web 相关 -->
27 27 <knife4j.version>3.0.2</knife4j.version>
  28 + <swagger-annotations.version>1.5.22</swagger-annotations.version>
28 29 <!-- DB 相关 -->
29 30 <mysql-connector-java.version>5.1.46</mysql-connector-java.version>
30 31 <druid.version>1.2.4</druid.version>
... ... @@ -104,8 +105,17 @@
104 105 <artifactId>guava</artifactId>
105 106 <groupId>com.google.guava</groupId>
106 107 </exclusion>
  108 + <exclusion>
  109 + <artifactId>swagger-annotations</artifactId>
  110 + <groupId>io.swagger</groupId>
  111 + </exclusion>
107 112 </exclusions>
108 113 </dependency>
  114 + <dependency>
  115 + <groupId>io.swagger</groupId>
  116 + <artifactId>swagger-annotations</artifactId>
  117 + <version>${swagger-annotations.version}</version>
  118 + </dependency>
109 119  
110 120 <!-- DB 相关 -->
111 121 <dependency>
... ...
ruoyi-ui/src/views/infra/config/index.vue
... ... @@ -2,24 +2,12 @@
2 2 <div class="app-container">
3 3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
4 4 <el-form-item label="参数名称" prop="name">
5   - <el-input
6   - v-model="queryParams.name"
7   - placeholder="请输入参数名称"
8   - clearable
9   - size="small"
10   - style="width: 240px"
11   - @keyup.enter.native="handleQuery"
12   - />
  5 + <el-input v-model="queryParams.name" placeholder="请输入参数名称" clearable size="small" style="width: 240px"
  6 + @keyup.enter.native="handleQuery"/>
13 7 </el-form-item>
14 8 <el-form-item label="参数键名" prop="key">
15   - <el-input
16   - v-model="queryParams.key"
17   - placeholder="请输入参数键名"
18   - clearable
19   - size="small"
20   - style="width: 240px"
21   - @keyup.enter.native="handleQuery"
22   - />
  9 + <el-input v-model="queryParams.key" placeholder="请输入参数键名" clearable size="small" style="width: 240px"
  10 + @keyup.enter.native="handleQuery"/>
23 11 </el-form-item>
24 12 <el-form-item label="系统内置" prop="type">
25 13 <el-select v-model="queryParams.type" placeholder="系统内置" clearable size="small">
... ... @@ -56,7 +44,7 @@
56 44 icon="el-icon-plus"
57 45 size="mini"
58 46 @click="handleAdd"
59   - v-hasPermi="['infra:config:add']"
  47 + v-hasPermi="['infra:config:create']"
60 48 >新增</el-button>
61 49 </el-col>
62 50 <el-col :span="1.5">
... ... @@ -95,31 +83,15 @@
95 83 </el-table-column>
96 84 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
97 85 <template slot-scope="scope">
98   - <el-button
99   - size="mini"
100   - type="text"
101   - icon="el-icon-edit"
102   - @click="handleUpdate(scope.row)"
103   - v-hasPermi="['infra:config:edit']"
104   - >修改</el-button>
105   - <el-button
106   - size="mini"
107   - type="text"
108   - icon="el-icon-delete"
109   - @click="handleDelete(scope.row)"
110   - v-hasPermi="['infra:config:remove']"
111   - >删除</el-button>
  86 + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
  87 + v-hasPermi="['infra:config:update']">修改</el-button>
  88 + <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
  89 + v-hasPermi="['infra:config:delete']">删除</el-button>
112 90 </template>
113 91 </el-table-column>
114 92 </el-table>
115 93  
116   - <pagination
117   - v-show="total>0"
118   - :total="total"
119   - :page.sync="queryParams.pageNo"
120   - :limit.sync="queryParams.pageSize"
121   - @pagination="getList"
122   - />
  94 + <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="getList"/>
123 95  
124 96 <!-- 添加或修改参数配置对话框 -->
125 97 <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
... ...
sql/ruoyi-vue-pro.sql
... ... @@ -11,7 +11,7 @@
11 11 Target Server Version : 50718
12 12 File Encoding : 65001
13 13  
14   - Date: 07/03/2021 00:43:34
  14 + Date: 10/03/2021 01:31:28
15 15 */
16 16  
17 17 SET NAMES utf8mb4;
... ... @@ -37,18 +37,93 @@ CREATE TABLE `inf_api_access_log` (
37 37 `duration` int(11) NOT NULL COMMENT '执行时长',
38 38 `result_code` int(11) NOT NULL DEFAULT '0' COMMENT '结果ç ',
39 39 `result_msg` varchar(512) DEFAULT '' COMMENT '结果æç¤º',
40   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  40 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
41 41 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
42   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  42 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
43 43 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
44 44 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
45 45 PRIMARY KEY (`id`) USING BTREE
46   -) ENGINE=InnoDB AUTO_INCREMENT=1822 DEFAULT CHARSET=utf8mb4 COMMENT='API 访问日志表';
  46 +) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8mb4 COMMENT='API 访问日志表';
47 47  
48 48 -- ----------------------------
49 49 -- Records of inf_api_access_log
50 50 -- ----------------------------
51 51 BEGIN;
  52 +INSERT INTO `inf_api_access_log` VALUES (1, 'd8909966-2abb-43b1-998f-850779178463', 0, 2, 'dashboard', 'GET', '/api/get-permission-info', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:46', '2021-03-10 01:11:47', 127, 0, '', NULL, '2021-03-10 01:11:47', NULL, '2021-03-10 01:11:47', b'0');
  53 +INSERT INTO `inf_api_access_log` VALUES (2, 'f40ee1af-4b8e-4351-ba77-c0ca41865d01', 0, 2, 'dashboard', 'GET', '/api/system/dict-data/list-all-simple', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:46', '2021-03-10 01:11:47', 127, 0, '', NULL, '2021-03-10 01:11:47', NULL, '2021-03-10 01:11:47', b'0');
  54 +INSERT INTO `inf_api_access_log` VALUES (3, '38657f93-449b-4c92-a412-d76c32c3ba74', 0, 2, 'dashboard', 'POST', '/api/logout', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:47', '2021-03-10 01:11:47', 3, 0, '', NULL, '2021-03-10 01:11:47', NULL, '2021-03-10 01:11:47', b'0');
  55 +INSERT INTO `inf_api_access_log` VALUES (4, '24303cdb-dae9-4f09-b316-e9eb38023ddf', 0, 2, 'dashboard', 'POST', '/api/logout', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:48', '2021-03-10 01:11:48', 2, 0, '', NULL, '2021-03-10 01:11:48', NULL, '2021-03-10 01:11:48', b'0');
  56 +INSERT INTO `inf_api_access_log` VALUES (5, 'fe324978-a665-4e25-8e16-ee78750de461', 0, 2, 'dashboard', 'GET', '/api/system/captcha/get-image', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:47', '2021-03-10 01:11:50', 2698, 0, '', NULL, '2021-03-10 01:11:50', NULL, '2021-03-10 01:11:50', b'0');
  57 +INSERT INTO `inf_api_access_log` VALUES (6, '205b39bd-471c-4e0c-bbeb-f9ad836d47c7', 0, 2, 'dashboard', 'GET', '/api/system/captcha/get-image', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:49', '2021-03-10 01:11:50', 1157, 0, '', NULL, '2021-03-10 01:11:50', NULL, '2021-03-10 01:11:50', b'0');
  58 +INSERT INTO `inf_api_access_log` VALUES (7, 'aff42e1b-73d9-431d-95b9-7a7d18595a5b', 0, 2, 'dashboard', 'POST', '/api/login', '{\"query\":{},\"body\":\"{\\\"username\\\":\\\"admin\\\",\\\"password\\\":\\\"admin123\\\",\\\"code\\\":\\\"1nfjj\\\",\\\"uuid\\\":\\\"8466085c41534a948632f82140e8d9e1\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:53', '2021-03-10 01:11:53', 35, 1002000003, '验è¯ç ä¸å­˜åœ¨', NULL, '2021-03-10 01:11:53', NULL, '2021-03-10 01:11:53', b'0');
  59 +INSERT INTO `inf_api_access_log` VALUES (8, '25f0e932-cf92-4b95-b3fb-5a4896bd9241', 0, 2, 'dashboard', 'GET', '/api/system/captcha/get-image', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:53', '2021-03-10 01:11:53', 13, 0, '', NULL, '2021-03-10 01:11:53', NULL, '2021-03-10 01:11:53', b'0');
  60 +INSERT INTO `inf_api_access_log` VALUES (9, 'ad750e4c-5310-4e42-9e41-0871033ca55d', 0, 2, 'dashboard', 'POST', '/api/login', '{\"query\":{},\"body\":\"{\\\"username\\\":\\\"admin\\\",\\\"password\\\":\\\"admin123\\\",\\\"code\\\":\\\"1nfjj\\\",\\\"uuid\\\":\\\"8466085c41534a948632f82140e8d9e1\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:53', '2021-03-10 01:11:53', 273, 0, '', NULL, '2021-03-10 01:11:53', NULL, '2021-03-10 01:11:53', b'0');
  61 +INSERT INTO `inf_api_access_log` VALUES (10, '0e1a7560-d447-4e95-935a-e3f6cf4a222d', 1, 2, 'dashboard', 'GET', '/api/system/dict-data/list-all-simple', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:53', '2021-03-10 01:11:53', 31, 0, '', NULL, '2021-03-10 01:11:53', NULL, '2021-03-10 01:11:53', b'0');
  62 +INSERT INTO `inf_api_access_log` VALUES (11, '0bf76082-8584-4725-ad8e-d23b44f1a886', 1, 2, 'dashboard', 'GET', '/api/get-permission-info', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:53', '2021-03-10 01:11:53', 34, 0, '', NULL, '2021-03-10 01:11:53', NULL, '2021-03-10 01:11:53', b'0');
  63 +INSERT INTO `inf_api_access_log` VALUES (12, 'f9aed1f8-5a1d-4175-946a-e58e2772e4a3', 1, 2, 'dashboard', 'GET', '/api/list-menus', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:53', '2021-03-10 01:11:53', 12, 0, '', NULL, '2021-03-10 01:11:53', NULL, '2021-03-10 01:11:53', b'0');
  64 +INSERT INTO `inf_api_access_log` VALUES (13, '2feeb4ff-e8a6-48a9-8370-9a1b8b1dea5e', 0, 2, 'dashboard', 'GET', '/api/system/file/get/add5ec1891a7d97d2cc1d60847e16294.jpg', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:11:54', '2021-03-10 01:11:54', 26, 0, '', NULL, '2021-03-10 01:11:54', NULL, '2021-03-10 01:11:54', b'0');
  65 +INSERT INTO `inf_api_access_log` VALUES (14, '36b77d6f-30d3-483e-ad79-196975d8fe0b', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:02', '2021-03-10 01:12:02', 31, 0, '', NULL, '2021-03-10 01:12:02', NULL, '2021-03-10 01:12:02', b'0');
  66 +INSERT INTO `inf_api_access_log` VALUES (15, 'e50a5433-90b7-4e8f-9d1a-59f15c1a4e0a', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:07', '2021-03-10 01:12:07', 16, 0, '', NULL, '2021-03-10 01:12:07', NULL, '2021-03-10 01:12:07', b'0');
  67 +INSERT INTO `inf_api_access_log` VALUES (16, 'b1ef7809-57f1-4aad-99cb-f53d1c85ae8a', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"106\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:07', '2021-03-10 01:12:07', 11, 0, '', NULL, '2021-03-10 01:12:07', NULL, '2021-03-10 01:12:07', b'0');
  68 +INSERT INTO `inf_api_access_log` VALUES (17, '18c41274-8fc2-4012-8d63-14fe72a0cc64', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":106,\\\"status\\\":0,\\\"createTime\\\":1609837428000,\\\"name\\\":\\\"é…置管ç†\\\",\\\"permission\\\":\\\"\\\",\\\"type\\\":2,\\\"sort\\\":1,\\\"parentId\\\":2,\\\"path\\\":\\\"config\\\",\\\"icon\\\":\\\"edit\\\",\\\"component\\\":\\\"infra/config/index\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:09', '2021-03-10 01:12:10', 54, 0, '', NULL, '2021-03-10 01:12:10', NULL, '2021-03-10 01:12:10', b'0');
  69 +INSERT INTO `inf_api_access_log` VALUES (18, '3ec30780-7d9e-40fd-b9e1-df0758530bc9', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:10', '2021-03-10 01:12:10', 15, 0, '', NULL, '2021-03-10 01:12:10', NULL, '2021-03-10 01:12:10', b'0');
  70 +INSERT INTO `inf_api_access_log` VALUES (19, '3a0dd3e6-60e8-43cc-82aa-d63d332dcd74', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1032\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:12', '2021-03-10 01:12:12', 7, 0, '', NULL, '2021-03-10 01:12:12', NULL, '2021-03-10 01:12:12', b'0');
  71 +INSERT INTO `inf_api_access_log` VALUES (20, '3dc6e855-0aff-48f2-a236-a5255385de82', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:12', '2021-03-10 01:12:12', 15, 0, '', NULL, '2021-03-10 01:12:12', NULL, '2021-03-10 01:12:12', b'0');
  72 +INSERT INTO `inf_api_access_log` VALUES (21, '0eab1e77-e039-4924-b6f5-cdcd73ad9897', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":1032,\\\"status\\\":0,\\\"createTime\\\":1609837428000,\\\"name\\\":\\\"é…置新增\\\",\\\"permission\\\":\\\"infra:config:create\\\",\\\"type\\\":3,\\\"sort\\\":2,\\\"parentId\\\":106,\\\"path\\\":\\\"\\\",\\\"icon\\\":\\\"\\\",\\\"component\\\":\\\"\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:18', '2021-03-10 01:12:18', 18, 0, '', NULL, '2021-03-10 01:12:18', NULL, '2021-03-10 01:12:18', b'0');
  73 +INSERT INTO `inf_api_access_log` VALUES (22, '5d309b5e-76be-4776-be3c-e961e3144269', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:18', '2021-03-10 01:12:18', 14, 0, '', NULL, '2021-03-10 01:12:18', NULL, '2021-03-10 01:12:18', b'0');
  74 +INSERT INTO `inf_api_access_log` VALUES (23, '359ddde9-67d2-427c-8738-17fb0773f3ca', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:25', '2021-03-10 01:12:25', 13, 0, '', NULL, '2021-03-10 01:12:25', NULL, '2021-03-10 01:12:25', b'0');
  75 +INSERT INTO `inf_api_access_log` VALUES (24, 'cab05ea8-98e4-4b81-a629-696e6c47c680', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1033\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:25', '2021-03-10 01:12:25', 5, 0, '', NULL, '2021-03-10 01:12:25', NULL, '2021-03-10 01:12:25', b'0');
  76 +INSERT INTO `inf_api_access_log` VALUES (25, '291cb66f-21d9-4798-a3c1-d3b0270d3850', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":1033,\\\"status\\\":0,\\\"createTime\\\":1609837428000,\\\"name\\\":\\\"é…置修改\\\",\\\"permission\\\":\\\"infra:config:update\\\",\\\"type\\\":3,\\\"sort\\\":3,\\\"parentId\\\":106,\\\"path\\\":\\\"\\\",\\\"icon\\\":\\\"\\\",\\\"component\\\":\\\"\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:30', '2021-03-10 01:12:30', 19, 0, '', NULL, '2021-03-10 01:12:30', NULL, '2021-03-10 01:12:30', b'0');
  77 +INSERT INTO `inf_api_access_log` VALUES (26, '5cf67e7f-8b32-4b17-96a6-325dfcba865f', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:30', '2021-03-10 01:12:30', 14, 0, '', NULL, '2021-03-10 01:12:30', NULL, '2021-03-10 01:12:30', b'0');
  78 +INSERT INTO `inf_api_access_log` VALUES (27, '869bcc0c-2d7c-4a80-9fda-11b412162c0d', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1034\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:31', '2021-03-10 01:12:31', 7, 0, '', NULL, '2021-03-10 01:12:31', NULL, '2021-03-10 01:12:31', b'0');
  79 +INSERT INTO `inf_api_access_log` VALUES (28, '5c110575-2d45-4353-a653-50796f3ffc36', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:31', '2021-03-10 01:12:31', 14, 0, '', NULL, '2021-03-10 01:12:31', NULL, '2021-03-10 01:12:31', b'0');
  80 +INSERT INTO `inf_api_access_log` VALUES (29, '4bd68903-d159-4728-aaa0-cfcc810bf65d', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":1034,\\\"status\\\":0,\\\"createTime\\\":1609837428000,\\\"name\\\":\\\"é…置删除\\\",\\\"permission\\\":\\\"infra:config:delete\\\",\\\"type\\\":3,\\\"sort\\\":4,\\\"parentId\\\":106,\\\"path\\\":\\\"\\\",\\\"icon\\\":\\\"\\\",\\\"component\\\":\\\"\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:36', '2021-03-10 01:12:36', 18, 0, '', NULL, '2021-03-10 01:12:36', NULL, '2021-03-10 01:12:36', b'0');
  81 +INSERT INTO `inf_api_access_log` VALUES (30, 'f42d28d1-1442-44f6-aaa9-b200307e0755', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:36', '2021-03-10 01:12:36', 13, 0, '', NULL, '2021-03-10 01:12:36', NULL, '2021-03-10 01:12:36', b'0');
  82 +INSERT INTO `inf_api_access_log` VALUES (31, 'c2ad9fea-1e4f-4f19-8ad3-8ffac3a2ad6a', 1, 2, 'dashboard', 'GET', '/api/infra/config/page', '{\"query\":{\"pageNo\":\"1\",\"pageSize\":\"10\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:12:40', '2021-03-10 01:12:40', 119, 0, '', NULL, '2021-03-10 01:12:40', NULL, '2021-03-10 01:12:40', b'0');
  83 +INSERT INTO `inf_api_access_log` VALUES (32, 'a3ce04b6-103e-4567-9f3a-22a516957122', 1, 2, 'dashboard', 'GET', '/api/system/dict-data/list-all-simple', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:25:41', '2021-03-10 01:25:41', 225, 0, '', NULL, '2021-03-10 01:25:41', NULL, '2021-03-10 01:25:41', b'0');
  84 +INSERT INTO `inf_api_access_log` VALUES (33, '82f37563-862a-4f50-9e5b-1c15b3b672d5', 1, 2, 'dashboard', 'GET', '/api/get-permission-info', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:25:41', '2021-03-10 01:25:41', 225, 0, '', NULL, '2021-03-10 01:25:41', NULL, '2021-03-10 01:25:41', b'0');
  85 +INSERT INTO `inf_api_access_log` VALUES (34, '8469ee76-cdf6-4cf2-ae6b-91573e06d0c9', 1, 2, 'dashboard', 'GET', '/api/list-menus', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:25:41', '2021-03-10 01:25:41', 16, 0, '', NULL, '2021-03-10 01:25:41', NULL, '2021-03-10 01:25:41', b'0');
  86 +INSERT INTO `inf_api_access_log` VALUES (35, '27f7ffa8-7ce3-42d4-8e65-1a6996dde9d4', 0, 2, 'dashboard', 'GET', '/api/system/file/get/add5ec1891a7d97d2cc1d60847e16294.jpg', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:25:42', '2021-03-10 01:25:42', 28, 0, '', NULL, '2021-03-10 01:25:42', NULL, '2021-03-10 01:25:42', b'0');
  87 +INSERT INTO `inf_api_access_log` VALUES (36, '23254cf0-c51f-4a52-8838-fc7ebbce3042', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:25:42', '2021-03-10 01:25:42', 47, 0, '', NULL, '2021-03-10 01:25:42', NULL, '2021-03-10 01:25:42', b'0');
  88 +INSERT INTO `inf_api_access_log` VALUES (37, '215c6c13-12e7-442a-805f-3efc0bf646e4', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"110\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:25:49', '2021-03-10 01:25:49', 13, 0, '', NULL, '2021-03-10 01:25:49', NULL, '2021-03-10 01:25:49', b'0');
  89 +INSERT INTO `inf_api_access_log` VALUES (38, '56ee2e75-5775-4a26-a9e7-972876ed891e', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:25:49', '2021-03-10 01:25:49', 20, 0, '', NULL, '2021-03-10 01:25:49', NULL, '2021-03-10 01:25:49', b'0');
  90 +INSERT INTO `inf_api_access_log` VALUES (39, '680c28fa-764e-4de5-8dc0-909ab842eb43', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":110,\\\"status\\\":0,\\\"createTime\\\":1609837428000,\\\"name\\\":\\\"定时任务\\\",\\\"permission\\\":\\\"\\\",\\\"type\\\":2,\\\"sort\\\":2,\\\"parentId\\\":2,\\\"path\\\":\\\"job\\\",\\\"icon\\\":\\\"job\\\",\\\"component\\\":\\\"infra/job/index\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:25:51', '2021-03-10 01:25:51', 56, 0, '', NULL, '2021-03-10 01:25:51', NULL, '2021-03-10 01:25:51', b'0');
  91 +INSERT INTO `inf_api_access_log` VALUES (40, '74a051a8-4150-442c-8986-6b22ae166ae6', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:25:51', '2021-03-10 01:25:51', 22, 0, '', NULL, '2021-03-10 01:25:51', NULL, '2021-03-10 01:25:51', b'0');
  92 +INSERT INTO `inf_api_access_log` VALUES (41, '5228cabc-3ff5-4c3a-a9d0-a7c14a9e92a5', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:26:02', '2021-03-10 01:26:02', 17, 0, '', NULL, '2021-03-10 01:26:02', NULL, '2021-03-10 01:26:02', b'0');
  93 +INSERT INTO `inf_api_access_log` VALUES (42, 'c659072d-1d29-469b-b84b-b6ed4b6c964e', 1, 2, 'dashboard', 'POST', '/api/system/menu/create', '{\"query\":{},\"body\":\"{\\\"parentId\\\":110,\\\"name\\\":\\\"任务查询\\\",\\\"type\\\":3,\\\"sort\\\":1,\\\"status\\\":0,\\\"permission\\\":\\\"infra:job:query\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:26:19', '2021-03-10 01:26:19', 29, 0, '', NULL, '2021-03-10 01:26:19', NULL, '2021-03-10 01:26:19', b'0');
  94 +INSERT INTO `inf_api_access_log` VALUES (43, '1627b483-95b0-4ddc-b4f8-c27f931fde1a', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:26:19', '2021-03-10 01:26:19', 17, 0, '', NULL, '2021-03-10 01:26:19', NULL, '2021-03-10 01:26:19', b'0');
  95 +INSERT INTO `inf_api_access_log` VALUES (44, '6c497f1e-da23-4ca6-bb04-1a5c0bb768ad', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1078\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:27:42', '2021-03-10 01:27:43', 188, 0, '', NULL, '2021-03-10 01:27:43', NULL, '2021-03-10 01:27:43', b'0');
  96 +INSERT INTO `inf_api_access_log` VALUES (45, 'ba231b78-1b76-4116-b54d-a42abc10ac9b', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:27:42', '2021-03-10 01:27:43', 188, 0, '', NULL, '2021-03-10 01:27:43', NULL, '2021-03-10 01:27:43', b'0');
  97 +INSERT INTO `inf_api_access_log` VALUES (46, '1440ae67-0972-4d04-9efe-9080acc615bb', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:27:45', '2021-03-10 01:27:46', 20, 0, '', NULL, '2021-03-10 01:27:46', NULL, '2021-03-10 01:27:46', b'0');
  98 +INSERT INTO `inf_api_access_log` VALUES (47, '391845d4-1e42-492d-bc44-4ef878be4b41', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:27:50', '2021-03-10 01:27:50', 21, 0, '', NULL, '2021-03-10 01:27:50', NULL, '2021-03-10 01:27:50', b'0');
  99 +INSERT INTO `inf_api_access_log` VALUES (48, 'dd2b9b7e-df39-497c-bd1a-456a5af54799', 1, 2, 'dashboard', 'POST', '/api/system/menu/create', '{\"query\":{},\"body\":\"{\\\"parentId\\\":1078,\\\"name\\\":\\\"日志查询\\\",\\\"type\\\":3,\\\"sort\\\":1,\\\"status\\\":0,\\\"permission\\\":\\\"infra:api-error-log:query\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:04', '2021-03-10 01:28:04', 45, 0, '', NULL, '2021-03-10 01:28:04', NULL, '2021-03-10 01:28:04', b'0');
  100 +INSERT INTO `inf_api_access_log` VALUES (49, '292da48c-21a0-4066-8a3a-40ddd0e9c759', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:04', '2021-03-10 01:28:04', 23, 0, '', NULL, '2021-03-10 01:28:04', NULL, '2021-03-10 01:28:04', b'0');
  101 +INSERT INTO `inf_api_access_log` VALUES (50, '13432c7e-35c4-451f-9aa7-438f7f5c646a', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1078\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:07', '2021-03-10 01:28:07', 13, 0, '', NULL, '2021-03-10 01:28:07', NULL, '2021-03-10 01:28:07', b'0');
  102 +INSERT INTO `inf_api_access_log` VALUES (51, 'f06ad98f-7136-4157-83d6-9ff18b76c701', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:07', '2021-03-10 01:28:07', 20, 0, '', NULL, '2021-03-10 01:28:07', NULL, '2021-03-10 01:28:07', b'0');
  103 +INSERT INTO `inf_api_access_log` VALUES (52, '255cc516-6b95-404c-ae2c-38d713ca3a59', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":1078,\\\"status\\\":0,\\\"createTime\\\":1614274379000,\\\"name\\\":\\\"访问日志\\\",\\\"permission\\\":\\\"\\\",\\\"type\\\":2,\\\"sort\\\":1,\\\"parentId\\\":1083,\\\"path\\\":\\\"api-access-log\\\",\\\"icon\\\":\\\"log\\\",\\\"component\\\":\\\"infra/apiAccessLog/index\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:09', '2021-03-10 01:28:09', 33, 0, '', NULL, '2021-03-10 01:28:09', NULL, '2021-03-10 01:28:09', b'0');
  104 +INSERT INTO `inf_api_access_log` VALUES (53, '0b75788a-e1cb-43f7-959e-4f8cbb40b3cc', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:09', '2021-03-10 01:28:09', 18, 0, '', NULL, '2021-03-10 01:28:09', NULL, '2021-03-10 01:28:09', b'0');
  105 +INSERT INTO `inf_api_access_log` VALUES (54, 'aebfea9a-ae91-4746-bf71-d315da4f5d49', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1082\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:11', '2021-03-10 01:28:11', 8, 0, '', NULL, '2021-03-10 01:28:11', NULL, '2021-03-10 01:28:11', b'0');
  106 +INSERT INTO `inf_api_access_log` VALUES (55, '149f2f74-9d4b-491f-b016-19c5b381fcc7', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:11', '2021-03-10 01:28:11', 15, 0, '', NULL, '2021-03-10 01:28:11', NULL, '2021-03-10 01:28:11', b'0');
  107 +INSERT INTO `inf_api_access_log` VALUES (56, 'aeec1ebf-5aeb-4888-a2dd-60c473ae6b78', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":1082,\\\"status\\\":0,\\\"createTime\\\":1614274379000,\\\"name\\\":\\\"日志导出\\\",\\\"permission\\\":\\\"infra:api-access-log:export\\\",\\\"type\\\":3,\\\"sort\\\":2,\\\"parentId\\\":1078,\\\"path\\\":\\\"\\\",\\\"icon\\\":\\\"\\\",\\\"component\\\":\\\"\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:13', '2021-03-10 01:28:13', 23, 0, '', NULL, '2021-03-10 01:28:13', NULL, '2021-03-10 01:28:13', b'0');
  108 +INSERT INTO `inf_api_access_log` VALUES (57, 'd2cc4ee9-d289-4886-be34-0f93edb52bc0', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:13', '2021-03-10 01:28:13', 16, 0, '', NULL, '2021-03-10 01:28:13', NULL, '2021-03-10 01:28:13', b'0');
  109 +INSERT INTO `inf_api_access_log` VALUES (58, '73efd4a2-fe8b-4819-a657-6aca7425e7c0', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1085\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:15', '2021-03-10 01:28:15', 9, 0, '', NULL, '2021-03-10 01:28:15', NULL, '2021-03-10 01:28:15', b'0');
  110 +INSERT INTO `inf_api_access_log` VALUES (59, 'f222df67-e4c0-419f-a022-4bc304319f4d', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:15', '2021-03-10 01:28:15', 17, 0, '', NULL, '2021-03-10 01:28:15', NULL, '2021-03-10 01:28:15', b'0');
  111 +INSERT INTO `inf_api_access_log` VALUES (60, 'd304f696-6bd3-4218-b73a-7cff04565b54', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":1085,\\\"status\\\":0,\\\"createTime\\\":1614297200000,\\\"name\\\":\\\"日志处ç†\\\",\\\"permission\\\":\\\"infra:api-error-log:update-status\\\",\\\"type\\\":3,\\\"sort\\\":2,\\\"parentId\\\":1084,\\\"path\\\":\\\"\\\",\\\"icon\\\":\\\"\\\",\\\"component\\\":\\\"\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:18', '2021-03-10 01:28:18', 23, 0, '', NULL, '2021-03-10 01:28:18', NULL, '2021-03-10 01:28:18', b'0');
  112 +INSERT INTO `inf_api_access_log` VALUES (61, '224f263e-0e4f-49a8-8205-2de44ba8e045', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:18', '2021-03-10 01:28:18', 16, 0, '', NULL, '2021-03-10 01:28:18', NULL, '2021-03-10 01:28:18', b'0');
  113 +INSERT INTO `inf_api_access_log` VALUES (62, '9fd2373f-a641-4865-ae3f-259b4386d816', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1086\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:19', '2021-03-10 01:28:19', 7, 0, '', NULL, '2021-03-10 01:28:19', NULL, '2021-03-10 01:28:19', b'0');
  114 +INSERT INTO `inf_api_access_log` VALUES (63, 'a97c2b96-9486-4bde-a532-bbb8f077a393', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:19', '2021-03-10 01:28:19', 15, 0, '', NULL, '2021-03-10 01:28:19', NULL, '2021-03-10 01:28:19', b'0');
  115 +INSERT INTO `inf_api_access_log` VALUES (64, '1cbb3fa8-9a84-4568-8089-c74c2ff38d80', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":1086,\\\"status\\\":0,\\\"createTime\\\":1614297200000,\\\"name\\\":\\\"日志导出\\\",\\\"permission\\\":\\\"infra:api-error-log:export\\\",\\\"type\\\":3,\\\"sort\\\":3,\\\"parentId\\\":1084,\\\"path\\\":\\\"\\\",\\\"icon\\\":\\\"\\\",\\\"component\\\":\\\"\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:21', '2021-03-10 01:28:21', 21, 0, '', NULL, '2021-03-10 01:28:21', NULL, '2021-03-10 01:28:21', b'0');
  116 +INSERT INTO `inf_api_access_log` VALUES (65, '7f913e0c-0dfd-45cc-bb7d-eb55e7eb653d', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:21', '2021-03-10 01:28:21', 16, 0, '', NULL, '2021-03-10 01:28:21', NULL, '2021-03-10 01:28:21', b'0');
  117 +INSERT INTO `inf_api_access_log` VALUES (66, '6b39ec06-2bf5-4d92-9245-18223625251f', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:34', '2021-03-10 01:28:34', 13, 0, '', NULL, '2021-03-10 01:28:34', NULL, '2021-03-10 01:28:34', b'0');
  118 +INSERT INTO `inf_api_access_log` VALUES (67, '74045997-4753-48b6-98ee-1de5106d8633', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:28:47', '2021-03-10 01:28:47', 14, 0, '', NULL, '2021-03-10 01:28:47', NULL, '2021-03-10 01:28:47', b'0');
  119 +INSERT INTO `inf_api_access_log` VALUES (68, '14dcf39c-9b29-4cd0-8c08-9a17cd0234f6', 1, 2, 'dashboard', 'POST', '/api/system/menu/create', '{\"query\":{},\"body\":\"{\\\"parentId\\\":1084,\\\"name\\\":\\\"日志查询\\\",\\\"type\\\":3,\\\"sort\\\":1,\\\"status\\\":0,\\\"permission\\\":\\\"infra:api-error-log:query\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:29:09', '2021-03-10 01:29:09', 19, 0, '', NULL, '2021-03-10 01:29:09', NULL, '2021-03-10 01:29:09', b'0');
  120 +INSERT INTO `inf_api_access_log` VALUES (69, '6ed66070-c685-4871-9321-372161cb71f7', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:29:09', '2021-03-10 01:29:09', 15, 0, '', NULL, '2021-03-10 01:29:09', NULL, '2021-03-10 01:29:09', b'0');
  121 +INSERT INTO `inf_api_access_log` VALUES (70, 'f47ae56b-6de3-40b2-9da8-b86f38491645', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1088\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:29:24', '2021-03-10 01:29:24', 8, 0, '', NULL, '2021-03-10 01:29:24', NULL, '2021-03-10 01:29:24', b'0');
  122 +INSERT INTO `inf_api_access_log` VALUES (71, 'c498e660-4608-4051-bda3-3d980e6873f0', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:29:24', '2021-03-10 01:29:24', 18, 0, '', NULL, '2021-03-10 01:29:24', NULL, '2021-03-10 01:29:24', b'0');
  123 +INSERT INTO `inf_api_access_log` VALUES (72, '7a9be5f0-16b7-4924-9352-c8c6bdb36f6d', 1, 2, 'dashboard', 'GET', '/api/system/menu/get', '{\"query\":{\"id\":\"1088\"},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:29:32', '2021-03-10 01:29:32', 7, 0, '', NULL, '2021-03-10 01:29:32', NULL, '2021-03-10 01:29:32', b'0');
  124 +INSERT INTO `inf_api_access_log` VALUES (73, '7dcc44ce-63f0-4013-b4ee-332de28e473d', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:29:32', '2021-03-10 01:29:32', 16, 0, '', NULL, '2021-03-10 01:29:32', NULL, '2021-03-10 01:29:32', b'0');
  125 +INSERT INTO `inf_api_access_log` VALUES (74, 'a7541572-c68d-443e-95f6-69d1f6f55fab', 1, 2, 'dashboard', 'POST', '/api/system/menu/update', '{\"query\":{},\"body\":\"{\\\"id\\\":1088,\\\"status\\\":0,\\\"createTime\\\":1615310884000,\\\"name\\\":\\\"日志查询\\\",\\\"permission\\\":\\\"infra:api-access-log:query\\\",\\\"type\\\":3,\\\"sort\\\":1,\\\"parentId\\\":1078,\\\"path\\\":\\\"\\\",\\\"icon\\\":\\\"\\\",\\\"component\\\":\\\"\\\"}\"}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:29:38', '2021-03-10 01:29:38', 22, 0, '', NULL, '2021-03-10 01:29:38', NULL, '2021-03-10 01:29:38', b'0');
  126 +INSERT INTO `inf_api_access_log` VALUES (75, '822a488f-fc4a-4981-924c-40deba7b8a25', 1, 2, 'dashboard', 'GET', '/api/system/menu/list', '{\"query\":{},\"body\":null}', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '2021-03-10 01:29:38', '2021-03-10 01:29:38', 14, 0, '', NULL, '2021-03-10 01:29:38', NULL, '2021-03-10 01:29:38', b'0');
52 127 COMMIT;
53 128  
54 129 -- ----------------------------
... ... @@ -78,13 +153,13 @@ CREATE TABLE `inf_api_error_log` (
78 153 `process_status` tinyint(4) NOT NULL COMMENT '处ç†çжæ€',
79 154 `process_time` datetime DEFAULT NULL COMMENT 'å¤„ç†æ—¶é—´',
80 155 `process_user_id` int(11) DEFAULT '0' COMMENT '处ç†ç”¨æˆ·ç¼–å·',
81   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  156 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
82 157 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
83   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  158 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
84 159 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
85 160 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
86 161 PRIMARY KEY (`id`) USING BTREE
87   -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='系统异常日志';
  162 +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统异常日志';
88 163  
89 164 -- ----------------------------
90 165 -- Records of inf_api_error_log
... ... @@ -105,9 +180,9 @@ CREATE TABLE `inf_config` (
105 180 `value` varchar(500) NOT NULL DEFAULT '' COMMENT '傿•°é”®å€¼',
106 181 `sensitive` bit(1) NOT NULL COMMENT 'æ˜¯å¦æ•感',
107 182 `remark` varchar(500) DEFAULT NULL COMMENT '备注',
108   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  183 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
109 184 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
110   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  185 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
111 186 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
112 187 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
113 188 PRIMARY KEY (`id`) USING BTREE
... ... @@ -138,9 +213,9 @@ CREATE TABLE `inf_job` (
138 213 `retry_count` int(11) NOT NULL DEFAULT '0' COMMENT 'é‡è¯•次数',
139 214 `retry_interval` int(11) NOT NULL DEFAULT '0' COMMENT 'é‡è¯•é—´éš”',
140 215 `monitor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '监控超时时间',
141   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  216 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
142 217 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
143   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  218 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
144 219 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
145 220 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
146 221 PRIMARY KEY (`id`) USING BTREE
... ... @@ -169,18 +244,69 @@ CREATE TABLE `inf_job_log` (
169 244 `duration` int(11) DEFAULT NULL COMMENT '执行时长',
170 245 `status` tinyint(4) NOT NULL COMMENT '任务状æ€',
171 246 `result` varchar(4000) DEFAULT '' COMMENT '结果数æ®',
172   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  247 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
173 248 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
174   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  249 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
175 250 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
176 251 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
177 252 PRIMARY KEY (`id`) USING BTREE
178   -) ENGINE=InnoDB AUTO_INCREMENT=4458 DEFAULT CHARSET=utf8mb4 COMMENT='定时任务日志表';
  253 +) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8mb4 COMMENT='定时任务日志表';
179 254  
180 255 -- ----------------------------
181 256 -- Records of inf_job_log
182 257 -- ----------------------------
183 258 BEGIN;
  259 +INSERT INTO `inf_job_log` VALUES (1, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:17:51', '2021-03-09 21:17:51', 61, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:17:51', NULL, '2021-03-09 21:17:51', b'0');
  260 +INSERT INTO `inf_job_log` VALUES (2, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:18:00', '2021-03-09 21:18:00', 16, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:18:00', NULL, '2021-03-09 21:18:00', b'0');
  261 +INSERT INTO `inf_job_log` VALUES (3, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:19:00', '2021-03-09 21:19:00', 10, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:19:00', NULL, '2021-03-09 21:19:00', b'0');
  262 +INSERT INTO `inf_job_log` VALUES (4, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:20:00', '2021-03-09 21:20:00', 12, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:20:00', NULL, '2021-03-09 21:20:00', b'0');
  263 +INSERT INTO `inf_job_log` VALUES (5, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:21:00', '2021-03-09 21:21:00', 7, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:21:00', NULL, '2021-03-09 21:21:00', b'0');
  264 +INSERT INTO `inf_job_log` VALUES (6, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:22:00', '2021-03-09 21:22:00', 9, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:22:00', NULL, '2021-03-09 21:22:00', b'0');
  265 +INSERT INTO `inf_job_log` VALUES (7, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:23:00', '2021-03-09 21:23:00', 10, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:23:00', NULL, '2021-03-09 21:23:00', b'0');
  266 +INSERT INTO `inf_job_log` VALUES (8, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:24:00', '2021-03-09 21:24:00', 11, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:24:00', NULL, '2021-03-09 21:24:00', b'0');
  267 +INSERT INTO `inf_job_log` VALUES (9, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:25:00', '2021-03-09 21:25:00', 7, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:25:00', NULL, '2021-03-09 21:25:00', b'0');
  268 +INSERT INTO `inf_job_log` VALUES (10, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:26:00', '2021-03-09 21:26:00', 11, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:26:00', NULL, '2021-03-09 21:26:00', b'0');
  269 +INSERT INTO `inf_job_log` VALUES (11, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:27:00', '2021-03-09 21:27:00', 12, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:27:00', NULL, '2021-03-09 21:27:00', b'0');
  270 +INSERT INTO `inf_job_log` VALUES (12, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:28:00', '2021-03-09 21:28:00', 6, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:28:00', NULL, '2021-03-09 21:28:00', b'0');
  271 +INSERT INTO `inf_job_log` VALUES (13, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:29:00', '2021-03-09 21:29:00', 9, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:29:00', NULL, '2021-03-09 21:29:00', b'0');
  272 +INSERT INTO `inf_job_log` VALUES (14, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:30:00', '2021-03-09 21:30:00', 6, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:30:00', NULL, '2021-03-09 21:30:00', b'0');
  273 +INSERT INTO `inf_job_log` VALUES (15, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:31:00', '2021-03-09 21:31:00', 7, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:31:00', NULL, '2021-03-09 21:31:00', b'0');
  274 +INSERT INTO `inf_job_log` VALUES (16, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:32:00', '2021-03-09 21:32:00', 8, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:32:00', NULL, '2021-03-09 21:32:00', b'0');
  275 +INSERT INTO `inf_job_log` VALUES (17, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-09 21:49:02', '2021-03-09 21:49:02', 87, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-09 21:49:02', NULL, '2021-03-09 21:49:02', b'0');
  276 +INSERT INTO `inf_job_log` VALUES (18, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 00:55:34', '2021-03-10 00:55:34', 60, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 00:55:34', NULL, '2021-03-10 00:55:34', b'0');
  277 +INSERT INTO `inf_job_log` VALUES (19, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 00:56:00', '2021-03-10 00:56:00', 16, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 00:56:00', NULL, '2021-03-10 00:56:00', b'0');
  278 +INSERT INTO `inf_job_log` VALUES (20, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 00:57:00', '2021-03-10 00:57:00', 9, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 00:57:00', NULL, '2021-03-10 00:57:00', b'0');
  279 +INSERT INTO `inf_job_log` VALUES (21, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 00:58:00', '2021-03-10 00:58:00', 17, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 00:58:00', NULL, '2021-03-10 00:58:00', b'0');
  280 +INSERT INTO `inf_job_log` VALUES (22, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 00:59:00', '2021-03-10 00:59:00', 8, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 00:59:00', NULL, '2021-03-10 00:59:00', b'0');
  281 +INSERT INTO `inf_job_log` VALUES (23, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:00:00', '2021-03-10 01:00:00', 10, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:00:00', NULL, '2021-03-10 01:00:00', b'0');
  282 +INSERT INTO `inf_job_log` VALUES (24, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:01:00', '2021-03-10 01:01:00', 8, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:01:00', NULL, '2021-03-10 01:01:00', b'0');
  283 +INSERT INTO `inf_job_log` VALUES (25, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:02:00', '2021-03-10 01:02:00', 9, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:02:00', NULL, '2021-03-10 01:02:00', b'0');
  284 +INSERT INTO `inf_job_log` VALUES (26, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:03:00', '2021-03-10 01:03:00', 7, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:03:00', NULL, '2021-03-10 01:03:00', b'0');
  285 +INSERT INTO `inf_job_log` VALUES (27, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:04:00', '2021-03-10 01:04:00', 8, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:04:00', NULL, '2021-03-10 01:04:00', b'0');
  286 +INSERT INTO `inf_job_log` VALUES (28, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:05:00', '2021-03-10 01:05:00', 16, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:05:00', NULL, '2021-03-10 01:05:00', b'0');
  287 +INSERT INTO `inf_job_log` VALUES (29, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:06:00', '2021-03-10 01:06:00', 15, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:06:00', NULL, '2021-03-10 01:06:00', b'0');
  288 +INSERT INTO `inf_job_log` VALUES (30, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:07:00', '2021-03-10 01:07:00', 7, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:07:00', NULL, '2021-03-10 01:07:00', b'0');
  289 +INSERT INTO `inf_job_log` VALUES (31, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:08:00', '2021-03-10 01:08:00', 7, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:08:00', NULL, '2021-03-10 01:08:00', b'0');
  290 +INSERT INTO `inf_job_log` VALUES (32, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:09:00', '2021-03-10 01:09:00', 8, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:09:00', NULL, '2021-03-10 01:09:00', b'0');
  291 +INSERT INTO `inf_job_log` VALUES (33, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:10:00', '2021-03-10 01:10:00', 16, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:10:00', NULL, '2021-03-10 01:10:00', b'0');
  292 +INSERT INTO `inf_job_log` VALUES (34, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:11:00', '2021-03-10 01:11:00', 7, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:11:00', NULL, '2021-03-10 01:11:00', b'0');
  293 +INSERT INTO `inf_job_log` VALUES (35, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:12:00', '2021-03-10 01:12:00', 7, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:12:00', NULL, '2021-03-10 01:12:00', b'0');
  294 +INSERT INTO `inf_job_log` VALUES (36, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:13:00', '2021-03-10 01:13:00', 8, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:13:00', NULL, '2021-03-10 01:13:00', b'0');
  295 +INSERT INTO `inf_job_log` VALUES (37, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:14:00', '2021-03-10 01:14:00', 6, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:14:00', NULL, '2021-03-10 01:14:00', b'0');
  296 +INSERT INTO `inf_job_log` VALUES (38, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:15:00', '2021-03-10 01:15:00', 5, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:15:00', NULL, '2021-03-10 01:15:00', b'0');
  297 +INSERT INTO `inf_job_log` VALUES (39, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:16:00', '2021-03-10 01:16:00', 8, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:16:00', NULL, '2021-03-10 01:16:00', b'0');
  298 +INSERT INTO `inf_job_log` VALUES (40, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:17:00', '2021-03-10 01:17:00', 9, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:17:00', NULL, '2021-03-10 01:17:00', b'0');
  299 +INSERT INTO `inf_job_log` VALUES (41, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:18:00', '2021-03-10 01:18:00', 6, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:18:00', NULL, '2021-03-10 01:18:00', b'0');
  300 +INSERT INTO `inf_job_log` VALUES (42, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:19:00', '2021-03-10 01:19:00', 6, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:19:00', NULL, '2021-03-10 01:19:00', b'0');
  301 +INSERT INTO `inf_job_log` VALUES (43, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:20:00', '2021-03-10 01:20:00', 7, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:20:00', NULL, '2021-03-10 01:20:00', b'0');
  302 +INSERT INTO `inf_job_log` VALUES (44, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:21:00', '2021-03-10 01:21:00', 5, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:21:00', NULL, '2021-03-10 01:21:00', b'0');
  303 +INSERT INTO `inf_job_log` VALUES (45, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:23:09', '2021-03-10 01:23:09', 60, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:23:09', NULL, '2021-03-10 01:23:09', b'0');
  304 +INSERT INTO `inf_job_log` VALUES (46, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:25:41', '2021-03-10 01:25:41', 92, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:25:41', NULL, '2021-03-10 01:25:41', b'0');
  305 +INSERT INTO `inf_job_log` VALUES (47, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:26:00', '2021-03-10 01:26:00', 10, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:26:00', NULL, '2021-03-10 01:26:00', b'0');
  306 +INSERT INTO `inf_job_log` VALUES (48, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:27:42', '2021-03-10 01:27:42', 61, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:27:42', NULL, '2021-03-10 01:27:42', b'0');
  307 +INSERT INTO `inf_job_log` VALUES (49, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:28:00', '2021-03-10 01:28:00', 14, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:28:00', NULL, '2021-03-10 01:28:00', b'0');
  308 +INSERT INTO `inf_job_log` VALUES (50, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:29:00', '2021-03-10 01:29:00', 8, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:29:00', NULL, '2021-03-10 01:29:00', b'0');
  309 +INSERT INTO `inf_job_log` VALUES (51, 3, 'sysUserSessionTimeoutJob', NULL, 1, '2021-03-10 01:30:00', '2021-03-10 01:30:00', 8, 1, 'ç§»é™¤åœ¨çº¿ä¼šè¯æ•°é‡ä¸º 0 个', NULL, '2021-03-10 01:30:00', NULL, '2021-03-10 01:30:00', b'0');
184 310 COMMIT;
185 311  
186 312 -- ----------------------------
... ... @@ -196,9 +322,9 @@ CREATE TABLE `sys_dept` (
196 322 `phone` varchar(11) DEFAULT NULL COMMENT 'è”系电è¯',
197 323 `email` varchar(50) DEFAULT NULL COMMENT '邮箱',
198 324 `status` tinyint(4) NOT NULL COMMENT '部门状æ€ï¼ˆ0正常 1åœç”¨ï¼‰',
199   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  325 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
200 326 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
201   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  327 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
202 328 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
203 329 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
204 330 PRIMARY KEY (`id`) USING BTREE
... ... @@ -232,9 +358,9 @@ CREATE TABLE `sys_dict_data` (
232 358 `dict_type` varchar(100) NOT NULL DEFAULT '' COMMENT '字典类型',
233 359 `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状æ€ï¼ˆ0正常 1åœç”¨ï¼‰',
234 360 `remark` varchar(500) DEFAULT NULL COMMENT '备注',
235   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  361 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
236 362 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
237   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  363 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
238 364 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
239 365 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
240 366 PRIMARY KEY (`id`) USING BTREE
... ... @@ -310,9 +436,9 @@ CREATE TABLE `sys_dict_type` (
310 436 `type` varchar(100) NOT NULL DEFAULT '' COMMENT '字典类型',
311 437 `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状æ€ï¼ˆ0正常 1åœç”¨ï¼‰',
312 438 `remark` varchar(500) DEFAULT NULL COMMENT '备注',
313   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  439 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
314 440 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
315   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  441 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
316 442 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
317 443 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
318 444 PRIMARY KEY (`id`) USING BTREE,
... ... @@ -349,9 +475,9 @@ DROP TABLE IF EXISTS `sys_file`;
349 475 CREATE TABLE `sys_file` (
350 476 `id` varchar(188) NOT NULL COMMENT '文件路径',
351 477 `content` blob NOT NULL COMMENT '文件内容',
352   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  478 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
353 479 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
354   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  480 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
355 481 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
356 482 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
357 483 PRIMARY KEY (`id`) USING BTREE
... ... @@ -376,18 +502,20 @@ CREATE TABLE `sys_login_log` (
376 502 `result` tinyint(4) NOT NULL COMMENT '登陆结果',
377 503 `user_ip` varchar(50) NOT NULL COMMENT '用户 IP',
378 504 `user_agent` varchar(512) NOT NULL COMMENT 'æµè§ˆå™¨ UA',
379   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  505 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
380 506 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
381   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  507 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
382 508 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
383 509 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
384 510 PRIMARY KEY (`id`) USING BTREE
385   -) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8mb4 COMMENT='系统访问记录';
  511 +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='系统访问记录';
386 512  
387 513 -- ----------------------------
388 514 -- Records of sys_login_log
389 515 -- ----------------------------
390 516 BEGIN;
  517 +INSERT INTO `sys_login_log` VALUES (1, 100, '4143cdab-ff1d-46ec-8333-bc48483c4c4b', 'admin', 30, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', NULL, '2021-03-10 01:11:53', NULL, '2021-03-10 01:11:53', b'0');
  518 +INSERT INTO `sys_login_log` VALUES (2, 100, '783e9c51-4a58-46aa-85f1-66cac5512465', 'admin', 0, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', NULL, '2021-03-10 01:11:53', NULL, '2021-03-10 01:11:53', b'0');
391 519 COMMIT;
392 520  
393 521 -- ----------------------------
... ... @@ -405,13 +533,13 @@ CREATE TABLE `sys_menu` (
405 533 `icon` varchar(100) DEFAULT '#' COMMENT 'èœå•图标',
406 534 `component` varchar(255) DEFAULT NULL COMMENT '组件路径',
407 535 `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'èœå•状æ€ï¼ˆ0正常 1åœç”¨ï¼‰',
408   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  536 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
409 537 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
410   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  538 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
411 539 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
412 540 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
413 541 PRIMARY KEY (`id`) USING BTREE
414   -) ENGINE=InnoDB AUTO_INCREMENT=1087 DEFAULT CHARSET=utf8mb4 COMMENT='èœå•æƒé™è¡¨';
  542 +) ENGINE=InnoDB AUTO_INCREMENT=1090 DEFAULT CHARSET=utf8mb4 COMMENT='èœå•æƒé™è¡¨';
415 543  
416 544 -- ----------------------------
417 545 -- Records of sys_menu
... ... @@ -427,11 +555,11 @@ INSERT INTO `sys_menu` VALUES (102, &#39;èœå•管ç†&#39;, &#39;system:menu:list&#39;, 2, 3, 1,
427 555 INSERT INTO `sys_menu` VALUES (103, '部门管ç†', 'system:dept:list', 2, 4, 1, 'dept', 'tree', 'system/dept/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:45', b'0');
428 556 INSERT INTO `sys_menu` VALUES (104, 'å²—ä½ç®¡ç†', 'system:post:list', 2, 5, 1, 'post', 'post', 'system/post/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:45', b'0');
429 557 INSERT INTO `sys_menu` VALUES (105, '字典管ç†', 'system:dict:list', 2, 6, 1, 'dict', 'dict', 'system/dict/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:45', b'0');
430   -INSERT INTO `sys_menu` VALUES (106, 'é…置管ç†', 'infra:config:list', 2, 1, 2, 'config', 'edit', 'infra/config/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-08 20:03:57', b'0');
  558 +INSERT INTO `sys_menu` VALUES (106, 'é…置管ç†', '', 2, 1, 2, 'config', 'edit', 'infra/config/index', 0, 'admin', '2021-01-05 17:03:48', '1', '2021-03-10 01:12:10', b'0');
431 559 INSERT INTO `sys_menu` VALUES (107, '通知公告', 'system:notice:list', 2, 8, 1, 'notice', 'message', 'system/notice/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:45', b'0');
432 560 INSERT INTO `sys_menu` VALUES (108, '日志管ç†', '', 1, 9, 1, 'log', 'log', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:34:28', b'0');
433 561 INSERT INTO `sys_menu` VALUES (109, '在线用户', 'system:user-session:list', 2, 10, 1, 'user-session', 'online', 'system/session/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-26 08:21:20', b'0');
434   -INSERT INTO `sys_menu` VALUES (110, '定时任务', 'infra:job:query', 2, 2, 2, 'job', 'job', 'infra/job/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-07 13:01:36', b'0');
  562 +INSERT INTO `sys_menu` VALUES (110, '定时任务', '', 2, 2, 2, 'job', 'job', 'infra/job/index', 0, 'admin', '2021-01-05 17:03:48', '1', '2021-03-10 01:25:51', b'0');
435 563 INSERT INTO `sys_menu` VALUES (111, 'MySQL 监控', '', 2, 4, 2, 'druid', 'druid', 'infra/druid/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-26 02:18:32', b'0');
436 564 INSERT INTO `sys_menu` VALUES (112, 'Java 监控', '', 2, 6, 2, 'admin-server', 'server', 'infra/server', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-26 02:18:41', b'0');
437 565 INSERT INTO `sys_menu` VALUES (113, 'Redis 监控', '', 2, 5, 2, 'redis', 'redis', 'infra/redis/index', 0, 'admin', '2021-01-05 17:03:48', '', '2021-02-26 02:18:37', b'0');
... ... @@ -471,9 +599,9 @@ INSERT INTO `sys_menu` VALUES (1028, &#39;字典修改&#39;, &#39;system:dict:edit&#39;, 3, 3, 1
471 599 INSERT INTO `sys_menu` VALUES (1029, '字典删除', 'system:dict:remove', 3, 4, 105, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0');
472 600 INSERT INTO `sys_menu` VALUES (1030, '字典导出', 'system:dict:export', 3, 5, 105, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0');
473 601 INSERT INTO `sys_menu` VALUES (1031, 'é…置查询', 'infra:config:query', 3, 1, 106, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-20 14:34:00', b'0');
474   -INSERT INTO `sys_menu` VALUES (1032, 'é…置新增', 'infra:config:add', 3, 2, 106, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-20 14:34:05', b'0');
475   -INSERT INTO `sys_menu` VALUES (1033, 'é…置修改', 'infra:config:edit', 3, 3, 106, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-20 14:33:52', b'0');
476   -INSERT INTO `sys_menu` VALUES (1034, 'é…置删除', 'infra:config:remove', 3, 4, 106, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-20 14:34:12', b'0');
  602 +INSERT INTO `sys_menu` VALUES (1032, 'é…置新增', 'infra:config:create', 3, 2, 106, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '1', '2021-03-10 01:12:18', b'0');
  603 +INSERT INTO `sys_menu` VALUES (1033, 'é…置修改', 'infra:config:update', 3, 3, 106, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '1', '2021-03-10 01:12:30', b'0');
  604 +INSERT INTO `sys_menu` VALUES (1034, 'é…置删除', 'infra:config:delete', 3, 4, 106, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '1', '2021-03-10 01:12:36', b'0');
477 605 INSERT INTO `sys_menu` VALUES (1035, 'é…置导出', 'infra:config:export', 3, 5, 106, '', '', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-20 14:34:19', b'0');
478 606 INSERT INTO `sys_menu` VALUES (1036, '公告查询', 'system:notice:query', 3, 1, 107, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0');
479 607 INSERT INTO `sys_menu` VALUES (1037, '公告新增', 'system:notice:add', 3, 2, 107, '#', '#', '', 0, 'admin', '2021-01-05 17:03:48', '', '2021-01-05 22:36:55', b'0');
... ... @@ -511,15 +639,18 @@ INSERT INTO `sys_menu` VALUES (1074, &#39;测试示例表导出&#39;, &#39;tool:test-demo:ex
511 639 INSERT INTO `sys_menu` VALUES (1075, '任务触å‘', 'infra:job:trigger', 3, 8, 110, '', '', '', 0, '', '2021-02-07 13:03:10', '', '2021-02-07 13:03:10', b'0');
512 640 INSERT INTO `sys_menu` VALUES (1076, 'æ•°æ®åº“文档', '', 2, 5, 3, 'db-doc', 'table', 'tool/dbDoc/index', 0, '', '2021-02-08 01:41:47', '', '2021-02-08 01:49:00', b'0');
513 641 INSERT INTO `sys_menu` VALUES (1077, '链路追踪', '', 2, 7, 2, 'skywalking', 'eye-open', 'infra/skywalking', 0, '', '2021-02-08 20:41:31', '', '2021-02-26 02:18:45', b'0');
514   -INSERT INTO `sys_menu` VALUES (1078, '访问日志', 'infra:api-access-log:query', 2, 1, 1083, 'api-access-log', 'log', 'infra/apiAccessLog/index', 0, '', '2021-02-26 01:32:59', '', '2021-02-26 07:53:46', b'0');
  642 +INSERT INTO `sys_menu` VALUES (1078, '访问日志', '', 2, 1, 1083, 'api-access-log', 'log', 'infra/apiAccessLog/index', 0, '', '2021-02-26 01:32:59', '1', '2021-03-10 01:28:09', b'0');
515 643 INSERT INTO `sys_menu` VALUES (1079, 'API 访问日志表创建', 'system:api-access-log:create', 3, 1, 1078, '', '', '', 1, '', '2021-02-26 01:32:59', '', '2021-02-26 02:21:00', b'1');
516 644 INSERT INTO `sys_menu` VALUES (1080, 'API 访问日志表更新', 'system:api-access-log:update', 3, 2, 1078, '', '', '', 1, '', '2021-02-26 01:32:59', '', '2021-02-26 02:21:08', b'1');
517 645 INSERT INTO `sys_menu` VALUES (1081, 'API 访问日志表删除', 'system:api-access-log:delete', 3, 3, 1078, '', '', '', 1, '', '2021-02-26 01:32:59', '', '2021-02-26 02:21:27', b'1');
518   -INSERT INTO `sys_menu` VALUES (1082, '日志导出', 'infra:api-access-log:export', 3, 4, 1078, '', '', '', 0, '', '2021-02-26 01:32:59', '', '2021-02-26 02:23:22', b'0');
  646 +INSERT INTO `sys_menu` VALUES (1082, '日志导出', 'infra:api-access-log:export', 3, 2, 1078, '', '', '', 0, '', '2021-02-26 01:32:59', '1', '2021-03-10 01:28:13', b'0');
519 647 INSERT INTO `sys_menu` VALUES (1083, 'API 日志', '', 2, 3, 2, 'log', 'log', NULL, 0, '', '2021-02-26 02:18:24', '', '2021-02-26 02:20:17', b'0');
520 648 INSERT INTO `sys_menu` VALUES (1084, '错误日志', 'infra:api-error-log:query', 2, 2, 1083, 'api-error-log', 'log', 'infra/apiErrorLog/index', 0, '', '2021-02-26 07:53:20', '', '2021-02-26 07:54:40', b'0');
521   -INSERT INTO `sys_menu` VALUES (1085, '日志处ç†', 'infra:api-error-log:update-status', 3, 1, 1084, '', '', '', 0, '', '2021-02-26 07:53:20', '', '2021-02-26 07:53:20', b'0');
522   -INSERT INTO `sys_menu` VALUES (1086, '日志导出', 'infra:api-error-log:export', 3, 4, 1084, '', '', '', 0, '', '2021-02-26 07:53:20', '', '2021-02-26 07:53:20', b'0');
  649 +INSERT INTO `sys_menu` VALUES (1085, '日志处ç†', 'infra:api-error-log:update-status', 3, 2, 1084, '', '', '', 0, '', '2021-02-26 07:53:20', '1', '2021-03-10 01:28:18', b'0');
  650 +INSERT INTO `sys_menu` VALUES (1086, '日志导出', 'infra:api-error-log:export', 3, 3, 1084, '', '', '', 0, '', '2021-02-26 07:53:20', '1', '2021-03-10 01:28:21', b'0');
  651 +INSERT INTO `sys_menu` VALUES (1087, '任务查询', 'infra:job:query', 3, 1, 110, '', '', '', 0, '1', '2021-03-10 01:26:19', '1', '2021-03-10 01:26:19', b'0');
  652 +INSERT INTO `sys_menu` VALUES (1088, '日志查询', 'infra:api-access-log:query', 3, 1, 1078, '', '', '', 0, '1', '2021-03-10 01:28:04', '1', '2021-03-10 01:29:38', b'0');
  653 +INSERT INTO `sys_menu` VALUES (1089, '日志查询', 'infra:api-error-log:query', 3, 1, 1084, '', '', '', 0, '1', '2021-03-10 01:29:09', '1', '2021-03-10 01:29:09', b'0');
523 654 COMMIT;
524 655  
525 656 -- ----------------------------
... ... @@ -532,9 +663,9 @@ CREATE TABLE `sys_notice` (
532 663 `content` text NOT NULL COMMENT '公告内容',
533 664 `notice_type` tinyint(4) NOT NULL COMMENT '公告类型(1通知 2公告)',
534 665 `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '公告状æ€ï¼ˆ0正常 1关闭)',
535   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  666 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
536 667 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
537   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  668 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
538 669 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
539 670 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
540 671 PRIMARY KEY (`id`) USING BTREE
... ... @@ -573,18 +704,31 @@ CREATE TABLE `sys_operate_log` (
573 704 `result_code` int(11) NOT NULL DEFAULT '0' COMMENT '结果ç ',
574 705 `result_msg` varchar(512) DEFAULT '' COMMENT '结果æç¤º',
575 706 `result_data` varchar(4000) DEFAULT '' COMMENT '结果数æ®',
576   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  707 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
577 708 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
578   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  709 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
579 710 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
580 711 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
581 712 PRIMARY KEY (`id`) USING BTREE
582   -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='æ“作日志记录';
  713 +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COMMENT='æ“作日志记录';
583 714  
584 715 -- ----------------------------
585 716 -- Records of sys_operate_log
586 717 -- ----------------------------
587 718 BEGIN;
  719 +INSERT INTO `sys_operate_log` VALUES (1, 'de0ba312-0b69-4362-b674-7da54cacfb06', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"é…置管ç†\",\"permission\":\"\",\"type\":2,\"sort\":1,\"parentId\":2,\"path\":\"config\",\"icon\":\"edit\",\"component\":\"infra/config/index\",\"status\":0,\"id\":106}}', '2021-03-10 01:12:09', 27, 0, '', 'true', NULL, '2021-03-10 01:12:10', NULL, '2021-03-10 01:12:10', b'0');
  720 +INSERT INTO `sys_operate_log` VALUES (2, '17138b71-73b5-40c0-b735-57a1aab63a8d', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"é…置新增\",\"permission\":\"infra:config:create\",\"type\":3,\"sort\":2,\"parentId\":106,\"path\":\"\",\"icon\":\"\",\"component\":\"\",\"status\":0,\"id\":1032}}', '2021-03-10 01:12:18', 16, 0, '', 'true', NULL, '2021-03-10 01:12:18', NULL, '2021-03-10 01:12:18', b'0');
  721 +INSERT INTO `sys_operate_log` VALUES (3, '74aff106-7785-4b36-b48f-0ff46d7af074', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"é…置修改\",\"permission\":\"infra:config:update\",\"type\":3,\"sort\":3,\"parentId\":106,\"path\":\"\",\"icon\":\"\",\"component\":\"\",\"status\":0,\"id\":1033}}', '2021-03-10 01:12:30', 16, 0, '', 'true', NULL, '2021-03-10 01:12:30', NULL, '2021-03-10 01:12:30', b'0');
  722 +INSERT INTO `sys_operate_log` VALUES (4, '2cdfcdb3-2059-426b-8d18-4f08ac3d685b', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"é…置删除\",\"permission\":\"infra:config:delete\",\"type\":3,\"sort\":4,\"parentId\":106,\"path\":\"\",\"icon\":\"\",\"component\":\"\",\"status\":0,\"id\":1034}}', '2021-03-10 01:12:36', 14, 0, '', 'true', NULL, '2021-03-10 01:12:36', NULL, '2021-03-10 01:12:36', b'0');
  723 +INSERT INTO `sys_operate_log` VALUES (5, '72652932-6219-4298-b057-86afde0ce065', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"定时任务\",\"permission\":\"\",\"type\":2,\"sort\":2,\"parentId\":2,\"path\":\"job\",\"icon\":\"job\",\"component\":\"infra/job/index\",\"status\":0,\"id\":110}}', '2021-03-10 01:25:51', 28, 0, '', 'true', NULL, '2021-03-10 01:25:51', NULL, '2021-03-10 01:25:51', b'0');
  724 +INSERT INTO `sys_operate_log` VALUES (6, '9160878f-9a8d-47d9-bb54-271263dbc63c', 1, 'èœå•', '创建èœå•', 2, '', '', 'POST', '/api/system/menu/create', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.createMenu(SysMenuCreateReqVO)', '{\"reqVO\":{\"name\":\"任务查询\",\"permission\":\"infra:job:query\",\"type\":3,\"sort\":1,\"parentId\":110,\"path\":null,\"icon\":null,\"component\":null,\"status\":0}}', '2021-03-10 01:26:19', 16, 0, '', '1087', NULL, '2021-03-10 01:26:19', NULL, '2021-03-10 01:26:19', b'0');
  725 +INSERT INTO `sys_operate_log` VALUES (7, 'b6e1fbd8-1a2d-4d83-8cab-306dbdecb062', 1, 'èœå•', '创建èœå•', 2, '', '', 'POST', '/api/system/menu/create', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.createMenu(SysMenuCreateReqVO)', '{\"reqVO\":{\"name\":\"日志查询\",\"permission\":\"infra:api-error-log:query\",\"type\":3,\"sort\":1,\"parentId\":1078,\"path\":null,\"icon\":null,\"component\":null,\"status\":0}}', '2021-03-10 01:28:04', 24, 0, '', '1088', NULL, '2021-03-10 01:28:04', NULL, '2021-03-10 01:28:04', b'0');
  726 +INSERT INTO `sys_operate_log` VALUES (8, 'be86e04e-0dc9-4a68-8df0-b03ef0ed25cb', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"访问日志\",\"permission\":\"\",\"type\":2,\"sort\":1,\"parentId\":1083,\"path\":\"api-access-log\",\"icon\":\"log\",\"component\":\"infra/apiAccessLog/index\",\"status\":0,\"id\":1078}}', '2021-03-10 01:28:09', 21, 0, '', 'true', NULL, '2021-03-10 01:28:09', NULL, '2021-03-10 01:28:09', b'0');
  727 +INSERT INTO `sys_operate_log` VALUES (9, 'f744da18-ddc7-43ed-a85c-f88104734dbc', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"日志导出\",\"permission\":\"infra:api-access-log:export\",\"type\":3,\"sort\":2,\"parentId\":1078,\"path\":\"\",\"icon\":\"\",\"component\":\"\",\"status\":0,\"id\":1082}}', '2021-03-10 01:28:13', 18, 0, '', 'true', NULL, '2021-03-10 01:28:13', NULL, '2021-03-10 01:28:13', b'0');
  728 +INSERT INTO `sys_operate_log` VALUES (10, '3ebdb770-e942-4574-85b5-77f641a3ec54', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"日志处ç†\",\"permission\":\"infra:api-error-log:update-status\",\"type\":3,\"sort\":2,\"parentId\":1084,\"path\":\"\",\"icon\":\"\",\"component\":\"\",\"status\":0,\"id\":1085}}', '2021-03-10 01:28:18', 18, 0, '', 'true', NULL, '2021-03-10 01:28:18', NULL, '2021-03-10 01:28:18', b'0');
  729 +INSERT INTO `sys_operate_log` VALUES (11, '51d05bc9-b8a1-44a8-a141-f139b1843f0c', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"日志导出\",\"permission\":\"infra:api-error-log:export\",\"type\":3,\"sort\":3,\"parentId\":1084,\"path\":\"\",\"icon\":\"\",\"component\":\"\",\"status\":0,\"id\":1086}}', '2021-03-10 01:28:21', 16, 0, '', 'true', NULL, '2021-03-10 01:28:21', NULL, '2021-03-10 01:28:21', b'0');
  730 +INSERT INTO `sys_operate_log` VALUES (12, 'b5829295-81a5-47e1-9755-328f020d7037', 1, 'èœå•', '创建èœå•', 2, '', '', 'POST', '/api/system/menu/create', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.createMenu(SysMenuCreateReqVO)', '{\"reqVO\":{\"name\":\"日志查询\",\"permission\":\"infra:api-error-log:query\",\"type\":3,\"sort\":1,\"parentId\":1084,\"path\":null,\"icon\":null,\"component\":null,\"status\":0}}', '2021-03-10 01:29:09', 14, 0, '', '1089', NULL, '2021-03-10 01:29:09', NULL, '2021-03-10 01:29:09', b'0');
  731 +INSERT INTO `sys_operate_log` VALUES (13, 'f8797735-d948-43f9-9701-dac4533cee31', 1, 'èœå•', '修改èœå•', 2, '', '', 'POST', '/api/system/menu/update', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', 'CommonResult cn.iocoder.dashboard.modules.system.controller.permission.SysMenuController.updateMenu(SysMenuUpdateReqVO)', '{\"reqVO\":{\"name\":\"日志查询\",\"permission\":\"infra:api-access-log:query\",\"type\":3,\"sort\":1,\"parentId\":1078,\"path\":\"\",\"icon\":\"\",\"component\":\"\",\"status\":0,\"id\":1088}}', '2021-03-10 01:29:38', 17, 0, '', 'true', NULL, '2021-03-10 01:29:38', NULL, '2021-03-10 01:29:38', b'0');
588 732 COMMIT;
589 733  
590 734 -- ----------------------------
... ... @@ -598,9 +742,9 @@ CREATE TABLE `sys_post` (
598 742 `sort` int(4) NOT NULL COMMENT '显示顺åº',
599 743 `status` tinyint(4) NOT NULL COMMENT '状æ€ï¼ˆ0正常 1åœç”¨ï¼‰',
600 744 `remark` varchar(500) DEFAULT NULL COMMENT '备注',
601   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  745 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
602 746 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
603   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  747 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
604 748 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
605 749 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
606 750 PRIMARY KEY (`id`) USING BTREE
... ... @@ -631,9 +775,9 @@ CREATE TABLE `sys_role` (
631 775 `status` tinyint(4) NOT NULL COMMENT '角色状æ€ï¼ˆ0正常 1åœç”¨ï¼‰',
632 776 `type` tinyint(4) NOT NULL COMMENT '角色类型',
633 777 `remark` varchar(500) DEFAULT NULL COMMENT '备注',
634   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  778 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
635 779 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
636   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  780 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
637 781 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
638 782 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
639 783 PRIMARY KEY (`id`) USING BTREE
... ... @@ -656,9 +800,9 @@ CREATE TABLE `sys_role_menu` (
656 800 `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增编å·',
657 801 `role_id` bigint(20) NOT NULL COMMENT '角色ID',
658 802 `menu_id` bigint(20) NOT NULL COMMENT 'èœå•ID',
659   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  803 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
660 804 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
661   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  805 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
662 806 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
663 807 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
664 808 PRIMARY KEY (`id`) USING BTREE
... ... @@ -843,9 +987,9 @@ CREATE TABLE `sys_user` (
843 987 `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'å¸å·çжæ€ï¼ˆ0正常 1åœç”¨ï¼‰',
844 988 `login_ip` varchar(50) DEFAULT '' COMMENT '最åŽç™»å½•IP',
845 989 `login_date` datetime DEFAULT NULL COMMENT '最åŽç™»å½•æ—¶é—´',
846   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  990 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
847 991 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
848   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  992 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
849 993 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
850 994 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
851 995 PRIMARY KEY (`id`) USING BTREE
... ... @@ -870,9 +1014,9 @@ CREATE TABLE `sys_user_role` (
870 1014 `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增编å·',
871 1015 `user_id` bigint(20) NOT NULL COMMENT '用户ID',
872 1016 `role_id` bigint(20) NOT NULL COMMENT '角色ID',
873   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  1017 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
874 1018 `create_time` datetime DEFAULT NULL COMMENT '创建时间',
875   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  1019 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
876 1020 `update_time` datetime DEFAULT NULL COMMENT 'æ›´æ–°æ—¶é—´',
877 1021 `deleted` bit(1) DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
878 1022 PRIMARY KEY (`id`) USING BTREE
... ... @@ -898,11 +1042,13 @@ DROP TABLE IF EXISTS `sys_user_session`;
898 1042 CREATE TABLE `sys_user_session` (
899 1043 `id` varchar(32) NOT NULL COMMENT '会è¯ç¼–å·',
900 1044 `user_id` bigint(20) NOT NULL COMMENT '用户编å·',
  1045 + `session_timeout` datetime NOT NULL COMMENT '会è¯è¶…æ—¶æ—¶é—´',
  1046 + `username` varchar(30) NOT NULL COMMENT '用户账å·',
901 1047 `user_ip` varchar(50) NOT NULL COMMENT '用户 IP',
902 1048 `user_agent` varchar(512) NOT NULL COMMENT 'æµè§ˆå™¨ UA',
903   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  1049 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
904 1050 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
905   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  1051 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
906 1052 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
907 1053 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
908 1054 PRIMARY KEY (`id`) USING BTREE
... ... @@ -912,68 +1058,7 @@ CREATE TABLE `sys_user_session` (
912 1058 -- Records of sys_user_session
913 1059 -- ----------------------------
914 1060 BEGIN;
915   -INSERT INTO `sys_user_session` VALUES ('015797486c564c01b128cb2662bfa1f9', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 03:20:22', '', '2021-02-08 03:20:22', b'0');
916   -INSERT INTO `sys_user_session` VALUES ('019f009268e24cc1957c46763eef1fd4', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-07 08:36:48', '', '2021-02-14 20:04:33', b'0');
917   -INSERT INTO `sys_user_session` VALUES ('037f130370a744a4b1db19aef205b8ae', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 20:38:37', '', '2021-02-08 20:38:37', b'0');
918   -INSERT INTO `sys_user_session` VALUES ('04d51ff81ad54d05ab2f29e66b2a02f2', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 17:46:10', '', '2021-02-11 00:58:19', b'0');
919   -INSERT INTO `sys_user_session` VALUES ('055057e3356b4c249d56a6627ca057a7', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-03-04 16:54:24', '', '2021-03-05 01:25:51', b'0');
920   -INSERT INTO `sys_user_session` VALUES ('064ba2d647704f57bdf36a1803a724d7', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-26 02:17:35', '', '2021-02-27 12:04:09', b'0');
921   -INSERT INTO `sys_user_session` VALUES ('0df60899301d4080bd4164f24bccf18b', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-07 13:05:42', '', '2021-02-14 22:57:44', b'0');
922   -INSERT INTO `sys_user_session` VALUES ('1127b5eb9b0c4f9fa382d4d98a8a4a38', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 06:49:00', '', '2021-02-10 11:10:31', b'0');
923   -INSERT INTO `sys_user_session` VALUES ('11aa2d7861d445349790804fa8676754', 1, '127.0.0.1', 'Mozilla/5.0 (Linux; Android 10; PCT-AL10 Build/HUAWEIPCT-AL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045513 Mobile Safari/537.36 MMWEBID/2883 MicroMessenger/8.0.1.1841(0x28000159) Process/tools WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64', '', '2021-02-09 00:06:03', '', '2021-02-09 00:06:03', b'0');
924   -INSERT INTO `sys_user_session` VALUES ('135db2c6d88a4f41aaf4df46f3a3e0ea', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-03-06 01:44:25', '', '2021-03-06 01:44:25', b'0');
925   -INSERT INTO `sys_user_session` VALUES ('1bcac32d34b94422893f10718f643320', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-09 12:14:10', '', '2021-02-09 12:14:10', b'0');
926   -INSERT INTO `sys_user_session` VALUES ('20109910c52e4b02bbc0531212bff8cb', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 02:39:48', '', '2021-02-06 02:39:48', b'0');
927   -INSERT INTO `sys_user_session` VALUES ('2024509755b3444690c2a1dddaebd812', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 06:22:30', '', '2021-02-05 06:22:30', b'0');
928   -INSERT INTO `sys_user_session` VALUES ('260facb728964db7a3df8461b4eebe86', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 23:10:08', '', '2021-02-08 23:10:08', b'0');
929   -INSERT INTO `sys_user_session` VALUES ('27858c1f13c64a2a8889063932419885', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 18:27:13', '', '2021-02-20 16:11:21', b'0');
930   -INSERT INTO `sys_user_session` VALUES ('27d6db8abb3b4ed88d446ad489b9db23', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-07 06:38:34', '', '2021-02-14 10:57:34', b'0');
931   -INSERT INTO `sys_user_session` VALUES ('27dbe0b1051b41eb9efe6558af7cd681', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-03-06 00:51:14', '', '2021-03-06 19:10:23', b'0');
932   -INSERT INTO `sys_user_session` VALUES ('285af833677642448bbd19c40a279825', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 04:17:09', '', '2021-02-18 20:23:05', b'0');
933   -INSERT INTO `sys_user_session` VALUES ('31e5ff8584794ca58460ecf68a177c3f', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 11:48:57', '', '2021-02-12 20:56:44', b'0');
934   -INSERT INTO `sys_user_session` VALUES ('39cdef31685d4e93931a053d88ff0279', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 08:09:33', '', '2021-02-05 08:09:33', b'0');
935   -INSERT INTO `sys_user_session` VALUES ('3e111c66356d47da8ffc2755bfa3db52', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-09 14:00:25', '', '2021-02-09 14:00:25', b'0');
936   -INSERT INTO `sys_user_session` VALUES ('3f308ac8ff26481e829261dd14babbbb', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 01:33:07', '', '2021-02-17 22:01:24', b'0');
937   -INSERT INTO `sys_user_session` VALUES ('452d44e0616c4dca93485ce67ac946df', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-03-06 03:41:56', '', '2021-03-06 21:59:07', b'0');
938   -INSERT INTO `sys_user_session` VALUES ('50274d6c400f42f7bd5391a12858e262', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-26 11:45:04', '', '2021-02-26 11:45:04', b'0');
939   -INSERT INTO `sys_user_session` VALUES ('5636ae58b9644ea1b4ed934b025b76ea', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 04:24:59', '', '2021-02-09 18:40:06', b'0');
940   -INSERT INTO `sys_user_session` VALUES ('5891c4873bf746989a132929449d5f2b', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-03-06 01:55:18', '', '2021-03-06 20:55:38', b'0');
941   -INSERT INTO `sys_user_session` VALUES ('597956fbc5b34363981530b24e1b5327', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 13:47:15', '', '2021-02-12 20:36:16', b'0');
942   -INSERT INTO `sys_user_session` VALUES ('599102a1e8414ab59eddaf5492f98dad', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-26 06:40:37', '', '2021-02-27 21:25:52', b'0');
943   -INSERT INTO `sys_user_session` VALUES ('5a9b736ccaa8452394c57ac82bd0815e', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 10:57:52', '', '2021-02-10 16:52:48', b'0');
944   -INSERT INTO `sys_user_session` VALUES ('5aaeaa5c89434c6bbfa6c5af55097093', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-26 01:28:32', '', '2021-02-27 10:34:25', b'0');
945   -INSERT INTO `sys_user_session` VALUES ('5b6787e6cbfa4c7faba0dc825fc02816', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 17:25:20', '', '2021-02-20 14:49:27', b'0');
946   -INSERT INTO `sys_user_session` VALUES ('604ac07123a445ee8a81e58db1d6d695', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 16:33:53', '', '2021-02-05 16:33:53', b'0');
947   -INSERT INTO `sys_user_session` VALUES ('648563ff4a7f454dac0385cca0581fb3', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 09:34:50', '', '2021-02-19 09:55:44', b'0');
948   -INSERT INTO `sys_user_session` VALUES ('64fd3d0a54754b8fa13b62d2f261b1e2', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 01:36:09', '', '2021-02-09 16:05:22', b'0');
949   -INSERT INTO `sys_user_session` VALUES ('661be9d3983e4e2eb8b346c1329015f5', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 19:46:45', '', '2021-02-13 12:02:29', b'0');
950   -INSERT INTO `sys_user_session` VALUES ('6acbf1f210ff4c6594acb3505f0c3738', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-07 12:16:36', '', '2021-02-14 22:37:22', b'0');
951   -INSERT INTO `sys_user_session` VALUES ('6e7e89c4948f45658eb74878457ac611', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-09 21:29:20', '', '2021-02-23 01:54:44', b'0');
952   -INSERT INTO `sys_user_session` VALUES ('73c66b705ed94e18bc53df61abc2d102', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 15:00:55', '', '2021-02-06 15:00:55', b'0');
953   -INSERT INTO `sys_user_session` VALUES ('73cc914671034f3190f09f520d1b39e9', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-01-26 08:29:27', '', '2021-01-26 08:29:50', b'1');
954   -INSERT INTO `sys_user_session` VALUES ('7b008d71139f48a4903aeaab0bbbef2e', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-03-06 04:38:15', '', '2021-03-06 04:38:15', b'0');
955   -INSERT INTO `sys_user_session` VALUES ('7cbd0fdfb9304f298abb9ee2f58f7230', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 20:02:24', '', '2021-02-08 20:02:24', b'0');
956   -INSERT INTO `sys_user_session` VALUES ('830a1687977b44969025177ad3b6d051', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-10 01:56:00', '', '2021-02-10 01:56:00', b'0');
957   -INSERT INTO `sys_user_session` VALUES ('8331dbbca7be4348a3d2d02bf559b65e', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 13:29:04', '', '2021-02-10 19:06:26', b'0');
958   -INSERT INTO `sys_user_session` VALUES ('897714de63634dba9ac235247f9860c2', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-03-06 06:27:27', '', '2021-03-06 06:27:27', b'0');
959   -INSERT INTO `sys_user_session` VALUES ('8d7668c1276344ecbffaf7e4420595d7', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 09:56:09', '', '2021-02-19 19:17:42', b'0');
960   -INSERT INTO `sys_user_session` VALUES ('9a3a5b8dee1841b69d70454ce23a53a3', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-26 00:09:49', '', '2021-02-27 01:27:20', b'0');
961   -INSERT INTO `sys_user_session` VALUES ('9cc71dc2d7a24b978db1bfe0e4bae349', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-01-26 08:30:01', '', '2021-01-26 08:30:01', b'0');
962   -INSERT INTO `sys_user_session` VALUES ('9e47f4bfee5e444194530de88900e259', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-09 20:25:02', '', '2021-02-23 01:54:51', b'0');
963   -INSERT INTO `sys_user_session` VALUES ('a07756b7a4b24117b0bd14ec2c68b516', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-26 07:47:21', '', '2021-02-27 23:12:38', b'0');
964   -INSERT INTO `sys_user_session` VALUES ('a1d01dbed7ff4b6392c3f27c18ce8778', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-07 07:36:14', '', '2021-02-14 12:13:56', b'0');
965   -INSERT INTO `sys_user_session` VALUES ('a63c2208dd824440999bee9abc22ea7a', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-25 20:45:24', '', '2021-02-25 20:45:24', b'0');
966   -INSERT INTO `sys_user_session` VALUES ('a7c495d00e2e4543ba943b4edb8c8176', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-26 03:44:46', '', '2021-02-27 12:50:23', b'0');
967   -INSERT INTO `sys_user_session` VALUES ('a93edff183c447719ecb627d40ca22a6', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 20:28:51', '', '2021-02-05 20:28:51', b'0');
968   -INSERT INTO `sys_user_session` VALUES ('aa22b7a5754b440e957ec47b832c9fd6', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-06 21:22:31', '', '2021-02-06 21:22:31', b'0');
969   -INSERT INTO `sys_user_session` VALUES ('b3881aa0b09b4bcdaf9e5ce5f2bbf15a', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-09 20:18:33', '', '2021-02-09 20:18:33', b'0');
970   -INSERT INTO `sys_user_session` VALUES ('bafb6445d05a4ee1bd9cdcf2ee83aea9', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-09 13:57:15', '', '2021-02-09 13:57:15', b'0');
971   -INSERT INTO `sys_user_session` VALUES ('c1ede4001ac945f8844b3c7abdc86119', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 03:05:18', '', '2021-02-08 03:05:18', b'0');
972   -INSERT INTO `sys_user_session` VALUES ('c527dcd973454664a75bbf5dbeae834a', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-09 17:06:03', '', '2021-02-22 20:33:03', b'0');
973   -INSERT INTO `sys_user_session` VALUES ('df87c2afa8de4559a091292434df9fd8', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-09 20:05:45', '', '2021-02-23 00:25:16', b'0');
974   -INSERT INTO `sys_user_session` VALUES ('e3ad1ef8b9aa4b329855b29c7b372e8f', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 06:21:44', '', '2021-02-05 06:21:44', b'0');
975   -INSERT INTO `sys_user_session` VALUES ('ea0d48776db84da4ac0f4c2adf62c366', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-08 07:02:03', '', '2021-02-08 07:02:03', b'0');
976   -INSERT INTO `sys_user_session` VALUES ('f881f7dc67d04cd29574657fdde32a62', 1, '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', '', '2021-02-05 08:53:20', '', '2021-02-05 08:53:20', b'0');
  1061 +INSERT INTO `sys_user_session` VALUES ('f853b50d064340a581e9a49bba9411fc', 1, '2021-03-10 01:55:41', 'admin', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36', NULL, '2021-03-10 01:11:53', NULL, '2021-03-10 01:25:41', b'0');
977 1062 COMMIT;
978 1063  
979 1064 -- ----------------------------
... ... @@ -1000,13 +1085,13 @@ CREATE TABLE `tool_codegen_column` (
1000 1085 `list_operation_condition` varchar(32) NOT NULL DEFAULT '=' COMMENT 'List 查询æ“作的æ¡ä»¶ç±»åž‹',
1001 1086 `list_operation_result` bit(1) NOT NULL COMMENT '是å¦ä¸º List 查询æ“作的返回字段',
1002 1087 `html_type` varchar(32) NOT NULL COMMENT '显示类型',
1003   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  1088 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
1004 1089 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
1005   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  1090 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
1006 1091 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
1007 1092 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
1008 1093 PRIMARY KEY (`id`) USING BTREE
1009   -) ENGINE=InnoDB AUTO_INCREMENT=369 DEFAULT CHARSET=utf8mb4 COMMENT='代ç ç”Ÿæˆè¡¨å­—段定义';
  1094 +) ENGINE=InnoDB AUTO_INCREMENT=381 DEFAULT CHARSET=utf8mb4 COMMENT='代ç ç”Ÿæˆè¡¨å­—段定义';
1010 1095  
1011 1096 -- ----------------------------
1012 1097 -- Records of tool_codegen_column
... ... @@ -1018,9 +1103,9 @@ INSERT INTO `tool_codegen_column` VALUES (234, 20, &#39;status&#39;, &#39;tinyint(4)&#39;, &#39;状æ
1018 1103 INSERT INTO `tool_codegen_column` VALUES (235, 20, 'type', 'tinyint(4)', '类型', b'0', b'0', '0', 4, 'Integer', 'type', 'sys_operate_type', '2', b'1', b'1', b'1', '=', b'1', 'select', '', '2021-02-06 01:33:25', '', '2021-02-06 03:26:05', b'0');
1019 1104 INSERT INTO `tool_codegen_column` VALUES (236, 20, 'category', 'tinyint(4)', '分类', b'0', b'0', '0', 5, 'Integer', 'category', 'inf_redis_timeout_type', '3', b'1', b'1', b'1', '=', b'1', 'radio', '', '2021-02-06 01:33:25', '', '2021-02-06 13:17:53', b'0');
1020 1105 INSERT INTO `tool_codegen_column` VALUES (237, 20, 'remark', 'varchar(500)', '备注', b'1', b'0', '0', 6, 'String', 'remark', '', '我是备注', b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 01:33:25', '', '2021-02-06 03:26:08', b'0');
1021   -INSERT INTO `tool_codegen_column` VALUES (238, 20, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 7, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 01:33:25', '', '2021-02-06 03:26:09', b'0');
  1106 +INSERT INTO `tool_codegen_column` VALUES (238, 20, 'creator', 'varchar(64)', '创建者', b'1', b'0', '0', 7, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 01:33:25', '', '2021-02-06 03:26:09', b'0');
1022 1107 INSERT INTO `tool_codegen_column` VALUES (239, 20, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 8, 'Date', 'createTime', '', NULL, b'0', b'0', b'1', 'BETWEEN', b'1', 'datetime', '', '2021-02-06 01:33:25', '', '2021-02-06 07:50:41', b'0');
1023   -INSERT INTO `tool_codegen_column` VALUES (240, 20, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 9, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 01:33:25', '', '2021-02-06 03:26:13', b'0');
  1108 +INSERT INTO `tool_codegen_column` VALUES (240, 20, 'updater', 'varchar(64)', '更新者', b'1', b'0', '0', 9, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 01:33:25', '', '2021-02-06 03:26:13', b'0');
1024 1109 INSERT INTO `tool_codegen_column` VALUES (241, 20, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'0', b'0', '0', 10, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', '=', b'0', 'datetime', '', '2021-02-06 01:33:25', '', '2021-02-06 08:02:20', b'0');
1025 1110 INSERT INTO `tool_codegen_column` VALUES (242, 20, 'deleted', 'bit(1)', '是å¦åˆ é™¤', b'0', b'0', '0', 11, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'1', '=', b'0', 'radio', '', '2021-02-06 01:33:25', '', '2021-02-06 07:52:14', b'0');
1026 1111 INSERT INTO `tool_codegen_column` VALUES (243, 21, 'id', 'int(5)', '傿•°ä¸»é”®', b'0', b'1', '1', 1, 'Integer', 'id', '', NULL, b'0', b'1', b'0', '=', b'1', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0');
... ... @@ -1031,9 +1116,9 @@ INSERT INTO `tool_codegen_column` VALUES (247, 21, &#39;key&#39;, &#39;varchar(100)&#39;, &#39;傿•
1031 1116 INSERT INTO `tool_codegen_column` VALUES (248, 21, 'value', 'varchar(500)', '傿•°é”®å€¼', b'0', b'0', '0', 6, 'String', 'value', '', NULL, b'1', b'1', b'0', '=', b'1', 'input', '', '2021-02-06 19:51:35', '', '2021-03-06 02:20:02', b'0');
1032 1117 INSERT INTO `tool_codegen_column` VALUES (249, 21, 'sensitive', 'bit(1)', 'æ˜¯å¦æ•感', b'0', b'0', '0', 7, 'Boolean', 'sensitive', '', NULL, b'1', b'1', b'0', '=', b'1', 'radio', '', '2021-02-06 19:51:35', '', '2021-03-06 02:20:02', b'0');
1033 1118 INSERT INTO `tool_codegen_column` VALUES (250, 21, 'remark', 'varchar(500)', '备注', b'1', b'0', '0', 8, 'String', 'remark', '', NULL, b'1', b'1', b'0', '=', b'1', 'input', '', '2021-02-06 19:51:35', '', '2021-03-06 02:20:02', b'0');
1034   -INSERT INTO `tool_codegen_column` VALUES (251, 21, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 9, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0');
  1119 +INSERT INTO `tool_codegen_column` VALUES (251, 21, 'creator', 'varchar(64)', '创建者', b'1', b'0', '0', 9, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0');
1035 1120 INSERT INTO `tool_codegen_column` VALUES (252, 21, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 10, 'Date', 'createTime', '', NULL, b'0', b'0', b'1', 'BETWEEN', b'1', 'datetime', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0');
1036   -INSERT INTO `tool_codegen_column` VALUES (253, 21, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 11, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0');
  1121 +INSERT INTO `tool_codegen_column` VALUES (253, 21, 'updater', 'varchar(64)', '更新者', b'1', b'0', '0', 11, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0');
1037 1122 INSERT INTO `tool_codegen_column` VALUES (254, 21, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'0', b'0', '0', 12, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0');
1038 1123 INSERT INTO `tool_codegen_column` VALUES (255, 21, 'deleted', 'bit(1)', '是å¦åˆ é™¤', b'0', b'0', '0', 13, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'0', '=', b'0', 'radio', '', '2021-02-06 19:51:35', '', '2021-02-06 19:51:35', b'0');
1039 1124 INSERT INTO `tool_codegen_column` VALUES (256, 23, 'job_id', 'bigint(20)', '任务ID', b'0', b'1', '1', 1, 'Long', 'jobId', '', NULL, b'0', b'1', b'0', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-07 06:38:51', b'1');
... ... @@ -1044,9 +1129,9 @@ INSERT INTO `tool_codegen_column` VALUES (260, 23, &#39;cron_expression&#39;, &#39;varchar(2
1044 1129 INSERT INTO `tool_codegen_column` VALUES (261, 23, 'misfire_policy', 'varchar(20)', '计划执行错误策略(1ç«‹å³æ‰§è¡Œ 2执行一次 3放弃执行)', b'1', b'0', '0', 6, 'String', 'misfirePolicy', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1');
1045 1130 INSERT INTO `tool_codegen_column` VALUES (262, 23, 'concurrent', 'char(1)', '是å¦å¹¶å‘执行(0å…许 1ç¦æ­¢ï¼‰', b'1', b'0', '0', 7, 'String', 'concurrent', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1');
1046 1131 INSERT INTO `tool_codegen_column` VALUES (263, 23, 'status', 'char(1)', '状æ€ï¼ˆ0正常 1æš‚åœï¼‰', b'1', b'0', '0', 8, 'String', 'status', '', NULL, b'1', b'1', b'1', '=', b'1', 'radio', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1');
1047   -INSERT INTO `tool_codegen_column` VALUES (264, 23, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 9, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1');
  1132 +INSERT INTO `tool_codegen_column` VALUES (264, 23, 'creator', 'varchar(64)', '创建者', b'1', b'0', '0', 9, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1');
1048 1133 INSERT INTO `tool_codegen_column` VALUES (265, 23, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 10, 'Date', 'createTime', '', NULL, b'0', b'0', b'1', 'BETWEEN', b'1', 'datetime', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1');
1049   -INSERT INTO `tool_codegen_column` VALUES (266, 23, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 11, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1');
  1134 +INSERT INTO `tool_codegen_column` VALUES (266, 23, 'updater', 'varchar(64)', '更新者', b'1', b'0', '0', 11, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:46:49', b'1');
1050 1135 INSERT INTO `tool_codegen_column` VALUES (267, 23, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'1', b'0', '0', 12, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1');
1051 1136 INSERT INTO `tool_codegen_column` VALUES (268, 23, 'remark', 'varchar(500)', '备注信æ¯', b'1', b'0', '0', 13, 'String', 'remark', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-06 20:29:26', '', '2021-02-06 20:47:14', b'1');
1052 1137 INSERT INTO `tool_codegen_column` VALUES (269, 24, 'id', 'bigint(20)', '任务编å·', b'0', b'1', '1', 1, 'Long', 'id', '', '1024', b'0', b'1', b'0', '=', b'1', 'input', '', '2021-02-07 06:39:34', '', '2021-02-07 06:44:19', b'0');
... ... @@ -1060,9 +1145,9 @@ INSERT INTO `tool_codegen_column` VALUES (276, 24, &#39;execute_end_time&#39;, &#39;datetime
1060 1145 INSERT INTO `tool_codegen_column` VALUES (277, 24, 'fire_prev_time', 'datetime', 'ä¸Šä¸€æ¬¡è§¦å‘æ—¶é—´', b'1', b'0', '0', 9, 'Date', 'firePrevTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'1', 'datetime', '', '2021-02-07 06:39:34', '', '2021-02-07 07:53:27', b'0');
1061 1146 INSERT INTO `tool_codegen_column` VALUES (278, 24, 'fire_next_time', 'datetime', 'ä¸‹ä¸€æ¬¡è§¦å‘æ—¶é—´', b'1', b'0', '0', 10, 'Date', 'fireNextTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'1', 'datetime', '', '2021-02-07 06:39:34', '', '2021-02-07 07:53:27', b'0');
1062 1147 INSERT INTO `tool_codegen_column` VALUES (279, 24, 'monitor_timeout', 'int(11)', '监控超时时间', b'1', b'0', '0', 11, 'Integer', 'monitorTimeout', '', '1000', b'1', b'1', b'0', '=', b'1', 'input', '', '2021-02-07 06:39:34', '', '2021-02-07 06:44:19', b'0');
1063   -INSERT INTO `tool_codegen_column` VALUES (280, 24, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 12, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-07 06:39:34', '', '2021-02-07 06:39:34', b'0');
  1148 +INSERT INTO `tool_codegen_column` VALUES (280, 24, 'creator', 'varchar(64)', '创建者', b'1', b'0', '0', 12, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-07 06:39:34', '', '2021-02-07 06:39:34', b'0');
1064 1149 INSERT INTO `tool_codegen_column` VALUES (281, 24, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 13, 'Date', 'createTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'1', 'datetime', '', '2021-02-07 06:39:34', '', '2021-02-07 06:44:19', b'0');
1065   -INSERT INTO `tool_codegen_column` VALUES (282, 24, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 14, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-07 06:39:34', '', '2021-02-07 06:39:34', b'0');
  1150 +INSERT INTO `tool_codegen_column` VALUES (282, 24, 'updater', 'varchar(64)', '更新者', b'1', b'0', '0', 14, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-07 06:39:34', '', '2021-02-07 06:39:34', b'0');
1066 1151 INSERT INTO `tool_codegen_column` VALUES (283, 24, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'0', b'0', '0', 15, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-02-07 06:39:34', '', '2021-02-07 06:39:34', b'0');
1067 1152 INSERT INTO `tool_codegen_column` VALUES (284, 24, 'deleted', 'bit(1)', '是å¦åˆ é™¤', b'0', b'0', '0', 16, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'0', '=', b'0', 'radio', '', '2021-02-07 06:39:34', '', '2021-02-07 06:39:34', b'0');
1068 1153 INSERT INTO `tool_codegen_column` VALUES (285, 24, 'retry_count', 'int(11)', 'é‡è¯•次数', b'0', b'0', '0', 11, 'Integer', 'retryCount', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-08 04:17:27', '', '2021-02-08 04:17:27', b'0');
... ... @@ -1077,9 +1162,9 @@ INSERT INTO `tool_codegen_column` VALUES (293, 25, &#39;end_time&#39;, &#39;datetime&#39;, &#39;结æ
1077 1162 INSERT INTO `tool_codegen_column` VALUES (294, 25, 'duration', 'int(11)', '执行时长', b'1', b'0', '0', 8, 'Integer', 'duration', '', NULL, b'1', b'1', b'0', '=', b'1', 'input', '', '2021-02-08 04:58:41', '', '2021-02-08 05:06:07', b'0');
1078 1163 INSERT INTO `tool_codegen_column` VALUES (295, 25, 'status', 'tinyint(4)', '任务状æ€', b'0', b'0', '0', 9, 'Integer', 'status', 'inf_job_log_status', NULL, b'1', b'1', b'1', '=', b'1', 'radio', '', '2021-02-08 04:58:41', '', '2021-02-08 10:21:07', b'0');
1079 1164 INSERT INTO `tool_codegen_column` VALUES (296, 25, 'result', 'varchar(4000)', '结果数æ®', b'1', b'0', '0', 10, 'String', 'result', '', NULL, b'1', b'1', b'0', '=', b'1', 'input', '', '2021-02-08 04:58:41', '', '2021-02-08 05:06:07', b'0');
1080   -INSERT INTO `tool_codegen_column` VALUES (297, 25, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 11, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-08 04:58:41', '', '2021-02-08 04:58:41', b'0');
  1165 +INSERT INTO `tool_codegen_column` VALUES (297, 25, 'creator', 'varchar(64)', '创建者', b'1', b'0', '0', 11, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-08 04:58:41', '', '2021-02-08 04:58:41', b'0');
1081 1166 INSERT INTO `tool_codegen_column` VALUES (298, 25, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 12, 'Date', 'createTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'1', 'datetime', '', '2021-02-08 04:58:41', '', '2021-02-08 05:06:07', b'0');
1082   -INSERT INTO `tool_codegen_column` VALUES (299, 25, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 13, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-08 04:58:41', '', '2021-02-08 04:58:41', b'0');
  1167 +INSERT INTO `tool_codegen_column` VALUES (299, 25, 'updater', 'varchar(64)', '更新者', b'1', b'0', '0', 13, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-08 04:58:41', '', '2021-02-08 04:58:41', b'0');
1083 1168 INSERT INTO `tool_codegen_column` VALUES (300, 25, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'0', b'0', '0', 14, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-02-08 04:58:41', '', '2021-02-08 04:58:41', b'0');
1084 1169 INSERT INTO `tool_codegen_column` VALUES (301, 25, 'deleted', 'bit(1)', '是å¦åˆ é™¤', b'0', b'0', '0', 15, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'0', '=', b'0', 'radio', '', '2021-02-08 04:58:41', '', '2021-02-08 04:58:41', b'0');
1085 1170 INSERT INTO `tool_codegen_column` VALUES (302, 26, 'id', 'bigint(20)', '日志主键', b'0', b'1', '1', 1, 'Long', 'id', '', '1024', b'0', b'1', b'0', '=', b'1', 'input', '', '2021-02-26 00:13:35', '', '2021-02-26 00:18:03', b'0');
... ... @@ -1097,9 +1182,9 @@ INSERT INTO `tool_codegen_column` VALUES (314, 26, &#39;end_time&#39;, &#39;datetime&#39;, &#39;结æ
1097 1182 INSERT INTO `tool_codegen_column` VALUES (315, 26, 'duration', 'int(11)', '执行时长', b'0', b'0', '0', 14, 'Integer', 'duration', '', '100', b'1', b'1', b'1', '>=', b'1', 'input', '', '2021-02-26 00:13:35', '', '2021-02-26 00:29:12', b'0');
1098 1183 INSERT INTO `tool_codegen_column` VALUES (316, 26, 'result_code', 'int(11)', '结果ç ', b'0', b'0', '0', 15, 'Integer', 'resultCode', '', '0', b'1', b'1', b'1', '=', b'1', 'input', '', '2021-02-26 00:13:35', '', '2021-02-26 00:29:12', b'0');
1099 1184 INSERT INTO `tool_codegen_column` VALUES (317, 26, 'result_msg', 'varchar(512)', '结果æç¤º', b'1', b'0', '0', 16, 'String', 'resultMsg', '', 'èŠ‹é“æºç ï¼Œç‰›é€¼ï¼', b'1', b'1', b'0', '=', b'1', 'input', '', '2021-02-26 00:13:35', '', '2021-02-26 00:30:58', b'0');
1100   -INSERT INTO `tool_codegen_column` VALUES (318, 26, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 17, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-26 00:13:35', '', '2021-02-26 00:13:35', b'0');
  1185 +INSERT INTO `tool_codegen_column` VALUES (318, 26, 'creator', 'varchar(64)', '创建者', b'1', b'0', '0', 17, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-26 00:13:35', '', '2021-02-26 00:13:35', b'0');
1101 1186 INSERT INTO `tool_codegen_column` VALUES (319, 26, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 18, 'Date', 'createTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'1', 'datetime', '', '2021-02-26 00:13:35', '', '2021-02-26 00:33:02', b'0');
1102   -INSERT INTO `tool_codegen_column` VALUES (320, 26, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 19, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-26 00:13:35', '', '2021-02-26 00:13:35', b'0');
  1187 +INSERT INTO `tool_codegen_column` VALUES (320, 26, 'updater', 'varchar(64)', '更新者', b'1', b'0', '0', 19, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-26 00:13:35', '', '2021-02-26 00:13:35', b'0');
1103 1188 INSERT INTO `tool_codegen_column` VALUES (321, 26, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'0', b'0', '0', 20, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-02-26 00:13:35', '', '2021-02-26 00:13:35', b'0');
1104 1189 INSERT INTO `tool_codegen_column` VALUES (322, 26, 'deleted', 'bit(1)', '是å¦åˆ é™¤', b'0', b'0', '0', 21, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'0', '=', b'0', 'radio', '', '2021-02-26 00:13:35', '', '2021-02-26 00:13:35', b'0');
1105 1190 INSERT INTO `tool_codegen_column` VALUES (323, 27, 'id', 'int(11)', 'ç¼–å·', b'0', b'1', '1', 1, 'Integer', 'id', '', '1024', b'0', b'1', b'0', '=', b'1', 'input', '', '2021-02-26 06:54:49', '', '2021-02-26 06:58:23', b'0');
... ... @@ -1122,7 +1207,7 @@ INSERT INTO `tool_codegen_column` VALUES (339, 27, &#39;exception_file_name&#39;, &#39;varch
1122 1207 INSERT INTO `tool_codegen_column` VALUES (340, 27, 'exception_method_name', 'varchar(512)', '异常å‘生的方法å', b'0', b'0', '0', 18, 'String', 'exceptionMethodName', '', NULL, b'1', b'1', b'0', 'LIKE', b'1', 'input', '', '2021-02-26 06:54:49', '', '2021-02-26 07:10:19', b'0');
1123 1208 INSERT INTO `tool_codegen_column` VALUES (341, 27, 'exception_line_number', 'int(11)', '异常å‘生的方法所在行', b'0', b'0', '0', 19, 'Integer', 'exceptionLineNumber', '', NULL, b'1', b'1', b'0', '=', b'1', 'input', '', '2021-02-26 06:54:49', '', '2021-02-26 07:10:19', b'0');
1124 1209 INSERT INTO `tool_codegen_column` VALUES (342, 27, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 20, 'Date', 'createTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'1', 'datetime', '', '2021-02-26 06:54:49', '', '2021-02-26 06:56:14', b'0');
1125   -INSERT INTO `tool_codegen_column` VALUES (343, 27, 'update_by', 'varchar(64)', '更新者', b'0', b'0', '0', 21, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-26 06:54:49', '', '2021-02-26 06:56:14', b'0');
  1210 +INSERT INTO `tool_codegen_column` VALUES (343, 27, 'updater', 'varchar(64)', '更新者', b'0', b'0', '0', 21, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-02-26 06:54:49', '', '2021-02-26 06:56:14', b'0');
1126 1211 INSERT INTO `tool_codegen_column` VALUES (344, 27, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'0', b'0', '0', 22, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-02-26 06:54:49', '', '2021-02-26 06:54:49', b'0');
1127 1212 INSERT INTO `tool_codegen_column` VALUES (345, 27, 'deleted', 'bit(1)', '是å¦åˆ é™¤', b'0', b'0', '0', 23, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'0', '=', b'0', 'radio', '', '2021-02-26 06:54:49', '', '2021-02-26 06:54:49', b'0');
1128 1213 INSERT INTO `tool_codegen_column` VALUES (346, 27, 'process_status', 'tinyint(4)', '处ç†çжæ€', b'0', b'0', '0', 20, 'Integer', 'processStatus', 'inf_api_error_log_process_status', '0', b'1', b'1', b'1', '=', b'1', 'radio', '', '2021-02-26 07:01:49', '', '2021-02-26 07:11:29', b'0');
... ... @@ -1133,9 +1218,9 @@ INSERT INTO `tool_codegen_column` VALUES (350, 28, &#39;name&#39;, &#39;varchar(100)&#39;, &#39;å­—å
1133 1218 INSERT INTO `tool_codegen_column` VALUES (351, 28, 'dict_type', 'varchar(100)', '字典类型', b'0', b'0', '0', 3, 'String', 'dictType', '', NULL, b'1', b'1', b'1', '=', b'1', 'select', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
1134 1219 INSERT INTO `tool_codegen_column` VALUES (352, 28, 'status', 'tinyint(4)', '状æ€ï¼ˆ0正常 1åœç”¨ï¼‰', b'0', b'0', '0', 4, 'Integer', 'status', '', NULL, b'1', b'1', b'1', '=', b'1', 'radio', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
1135 1220 INSERT INTO `tool_codegen_column` VALUES (353, 28, 'remark', 'varchar(500)', '备注', b'1', b'0', '0', 5, 'String', 'remark', '', NULL, b'1', b'1', b'1', '=', b'1', 'input', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
1136   -INSERT INTO `tool_codegen_column` VALUES (354, 28, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 6, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
  1221 +INSERT INTO `tool_codegen_column` VALUES (354, 28, 'creator', 'varchar(64)', '创建者', b'1', b'0', '0', 6, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
1137 1222 INSERT INTO `tool_codegen_column` VALUES (355, 28, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 7, 'Date', 'createTime', '', NULL, b'0', b'0', b'1', 'BETWEEN', b'1', 'datetime', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
1138   -INSERT INTO `tool_codegen_column` VALUES (356, 28, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 8, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
  1223 +INSERT INTO `tool_codegen_column` VALUES (356, 28, 'updater', 'varchar(64)', '更新者', b'1', b'0', '0', 8, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
1139 1224 INSERT INTO `tool_codegen_column` VALUES (357, 28, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'0', b'0', '0', 9, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
1140 1225 INSERT INTO `tool_codegen_column` VALUES (358, 28, 'deleted', 'bit(1)', '是å¦åˆ é™¤', b'0', b'0', '0', 10, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'0', '=', b'0', 'radio', '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
1141 1226 INSERT INTO `tool_codegen_column` VALUES (359, 29, 'id', 'bigint(20)', '字典主键', b'0', b'1', '1', 1, 'Long', 'id', '', NULL, b'0', b'1', b'0', '=', b'1', 'input', '', '2021-03-06 03:52:57', '', '2021-03-06 03:52:57', b'0');
... ... @@ -1143,11 +1228,23 @@ INSERT INTO `tool_codegen_column` VALUES (360, 29, &#39;name&#39;, &#39;varchar(100)&#39;, &#39;å­—å
1143 1228 INSERT INTO `tool_codegen_column` VALUES (361, 29, 'type', 'varchar(100)', '字典类型', b'0', b'0', '0', 3, 'String', 'type', '', NULL, b'1', b'1', b'1', 'LIKE', b'1', 'select', '', '2021-03-06 03:52:57', '', '2021-03-06 03:54:48', b'0');
1144 1229 INSERT INTO `tool_codegen_column` VALUES (362, 29, 'status', 'tinyint(4)', '状æ€ï¼ˆ0正常 1åœç”¨ï¼‰', b'0', b'0', '0', 4, 'Integer', 'status', '', NULL, b'1', b'1', b'1', '=', b'1', 'radio', '', '2021-03-06 03:52:57', '', '2021-03-06 03:52:57', b'0');
1145 1230 INSERT INTO `tool_codegen_column` VALUES (363, 29, 'remark', 'varchar(500)', '备注', b'1', b'0', '0', 5, 'String', 'remark', '', NULL, b'1', b'1', b'0', '=', b'1', 'input', '', '2021-03-06 03:52:57', '', '2021-03-06 03:54:48', b'0');
1146   -INSERT INTO `tool_codegen_column` VALUES (364, 29, 'create_by', 'varchar(64)', '创建者', b'1', b'0', '0', 6, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 03:52:57', '', '2021-03-06 03:52:57', b'0');
  1231 +INSERT INTO `tool_codegen_column` VALUES (364, 29, 'creator', 'varchar(64)', '创建者', b'1', b'0', '0', 6, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 03:52:57', '', '2021-03-06 03:52:57', b'0');
1147 1232 INSERT INTO `tool_codegen_column` VALUES (365, 29, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 7, 'Date', 'createTime', '', NULL, b'0', b'0', b'1', 'BETWEEN', b'1', 'datetime', '', '2021-03-06 03:52:57', '', '2021-03-06 03:52:57', b'0');
1148   -INSERT INTO `tool_codegen_column` VALUES (366, 29, 'update_by', 'varchar(64)', '更新者', b'1', b'0', '0', 8, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 03:52:57', '', '2021-03-06 03:52:57', b'0');
  1233 +INSERT INTO `tool_codegen_column` VALUES (366, 29, 'updater', 'varchar(64)', '更新者', b'1', b'0', '0', 8, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 03:52:57', '', '2021-03-06 03:52:57', b'0');
1149 1234 INSERT INTO `tool_codegen_column` VALUES (367, 29, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'0', b'0', '0', 9, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-03-06 03:52:57', '', '2021-03-06 03:52:57', b'0');
1150 1235 INSERT INTO `tool_codegen_column` VALUES (368, 29, 'deleted', 'bit(1)', '是å¦åˆ é™¤', b'0', b'0', '0', 10, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'0', '=', b'0', 'radio', '', '2021-03-06 03:52:57', '', '2021-03-06 03:52:57', b'0');
  1236 +INSERT INTO `tool_codegen_column` VALUES (369, 30, 'id', 'bigint(20)', '字典编ç ', b'0', b'1', '1', 1, 'Long', 'id', '', NULL, b'0', b'1', b'0', '=', b'1', 'input', '', '2021-03-06 06:48:28', '', '2021-03-06 06:48:28', b'0');
  1237 +INSERT INTO `tool_codegen_column` VALUES (370, 30, 'sort', 'int(4)', '字典排åº', b'0', b'0', '0', 2, 'Integer', 'sort', '', NULL, b'1', b'1', b'0', '=', b'1', 'input', '', '2021-03-06 06:48:28', '', '2021-03-06 06:50:38', b'0');
  1238 +INSERT INTO `tool_codegen_column` VALUES (371, 30, 'label', 'varchar(100)', '字典标签', b'0', b'0', '0', 3, 'String', 'label', '', NULL, b'1', b'1', b'1', 'LIKE', b'1', 'input', '', '2021-03-06 06:48:28', '', '2021-03-06 06:50:38', b'0');
  1239 +INSERT INTO `tool_codegen_column` VALUES (372, 30, 'value', 'varchar(100)', '字典键值', b'0', b'0', '0', 4, 'String', 'value', '', NULL, b'1', b'1', b'0', '=', b'1', 'input', '', '2021-03-06 06:48:28', '', '2021-03-06 06:50:38', b'0');
  1240 +INSERT INTO `tool_codegen_column` VALUES (373, 30, 'dict_type', 'varchar(100)', '字典类型', b'0', b'0', '0', 5, 'String', 'dictType', '', NULL, b'1', b'1', b'1', 'LIKE', b'1', 'select', '', '2021-03-06 06:48:28', '', '2021-03-06 06:50:38', b'0');
  1241 +INSERT INTO `tool_codegen_column` VALUES (374, 30, 'status', 'tinyint(4)', '状æ€ï¼ˆ0正常 1åœç”¨ï¼‰', b'0', b'0', '0', 6, 'Integer', 'status', '', NULL, b'1', b'1', b'1', 'LIKE', b'1', 'radio', '', '2021-03-06 06:48:28', '', '2021-03-06 06:50:38', b'0');
  1242 +INSERT INTO `tool_codegen_column` VALUES (375, 30, 'remark', 'varchar(500)', '备注', b'1', b'0', '0', 7, 'String', 'remark', '', NULL, b'1', b'1', b'0', '=', b'1', 'input', '', '2021-03-06 06:48:28', '', '2021-03-06 06:50:38', b'0');
  1243 +INSERT INTO `tool_codegen_column` VALUES (376, 30, 'creator', 'varchar(64)', '创建者', b'1', b'0', '0', 8, 'String', 'createBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 06:48:28', '', '2021-03-06 06:48:28', b'0');
  1244 +INSERT INTO `tool_codegen_column` VALUES (377, 30, 'create_time', 'datetime', '创建时间', b'0', b'0', '0', 9, 'Date', 'createTime', '', NULL, b'0', b'0', b'1', 'BETWEEN', b'1', 'datetime', '', '2021-03-06 06:48:28', '', '2021-03-06 06:48:28', b'0');
  1245 +INSERT INTO `tool_codegen_column` VALUES (378, 30, 'updater', 'varchar(64)', '更新者', b'1', b'0', '0', 10, 'String', 'updateBy', '', NULL, b'0', b'0', b'0', '=', b'0', 'input', '', '2021-03-06 06:48:28', '', '2021-03-06 06:48:28', b'0');
  1246 +INSERT INTO `tool_codegen_column` VALUES (379, 30, 'update_time', 'datetime', 'æ›´æ–°æ—¶é—´', b'0', b'0', '0', 11, 'Date', 'updateTime', '', NULL, b'0', b'0', b'0', 'BETWEEN', b'0', 'datetime', '', '2021-03-06 06:48:28', '', '2021-03-06 06:48:28', b'0');
  1247 +INSERT INTO `tool_codegen_column` VALUES (380, 30, 'deleted', 'bit(1)', '是å¦åˆ é™¤', b'0', b'0', '0', 12, 'Boolean', 'deleted', '', NULL, b'0', b'0', b'0', '=', b'0', 'radio', '', '2021-03-06 06:48:28', '', '2021-03-06 06:48:28', b'0');
1151 1248 COMMIT;
1152 1249  
1153 1250 -- ----------------------------
... ... @@ -1167,13 +1264,13 @@ CREATE TABLE `tool_codegen_table` (
1167 1264 `author` varchar(50) NOT NULL COMMENT '作者',
1168 1265 `template_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '模æ¿ç±»åž‹',
1169 1266 `parent_menu_id` bigint(20) DEFAULT NULL COMMENT '父èœå•ç¼–å·',
1170   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  1267 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
1171 1268 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
1172   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  1269 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
1173 1270 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
1174 1271 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
1175 1272 PRIMARY KEY (`id`) USING BTREE
1176   -) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COMMENT='代ç ç”Ÿæˆè¡¨å®šä¹‰';
  1273 +) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COMMENT='代ç ç”Ÿæˆè¡¨å®šä¹‰';
1177 1274  
1178 1275 -- ----------------------------
1179 1276 -- Records of tool_codegen_table
... ... @@ -1189,6 +1286,7 @@ INSERT INTO `tool_codegen_table` VALUES (26, 1, &#39;inf_api_access_log&#39;, &#39;API 访é—
1189 1286 INSERT INTO `tool_codegen_table` VALUES (27, 1, 'inf_api_error_log', 'API 错误日志', NULL, 'infra', 'apiErrorLog', 'InfApiErrorLog', 'API 错误日志', 'èŠ‹é“æºç ', 1, 1083, '', '2021-02-26 06:54:49', '', '2021-02-26 07:53:03', b'0');
1190 1287 INSERT INTO `tool_codegen_table` VALUES (28, 1, 'sys_dict_type', '字典类型表', NULL, 'system', 'dictType', 'SysDictType', '字典类型', '芋艿', 1, NULL, '', '2021-03-06 03:45:55', '', '2021-03-06 03:51:02', b'1');
1191 1288 INSERT INTO `tool_codegen_table` VALUES (29, 1, 'sys_dict_type', '字典类型表', NULL, 'system', 'dict', 'SysDictType', '字典类型', '芋艿', 1, NULL, '', '2021-03-06 03:52:57', '', '2021-03-06 04:03:52', b'0');
  1289 +INSERT INTO `tool_codegen_table` VALUES (30, 1, 'sys_dict_data', '字典数æ®è¡¨', NULL, 'system', 'type', 'SysDictData', '字典数æ®', 'èŠ‹é“æºç ', 1, NULL, '', '2021-03-06 06:48:28', '', '2021-03-06 06:50:47', b'0');
1192 1290 COMMIT;
1193 1291  
1194 1292 -- ----------------------------
... ... @@ -1202,9 +1300,9 @@ CREATE TABLE `tool_test_demo` (
1202 1300 `type` tinyint(4) NOT NULL COMMENT '类型',
1203 1301 `category` tinyint(4) NOT NULL COMMENT '分类',
1204 1302 `remark` varchar(500) DEFAULT NULL COMMENT '备注',
1205   - `create_by` varchar(64) DEFAULT '' COMMENT '创建者',
  1303 + `creator` varchar(64) DEFAULT '' COMMENT '创建者',
1206 1304 `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
1207   - `update_by` varchar(64) DEFAULT '' COMMENT '更新者',
  1305 + `updater` varchar(64) DEFAULT '' COMMENT '更新者',
1208 1306 `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'æ›´æ–°æ—¶é—´',
1209 1307 `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是å¦åˆ é™¤',
1210 1308 PRIMARY KEY (`id`) USING BTREE
... ...
src/main/java/cn/iocoder/dashboard/framework/mybatis/config/MybatisConfiguration.java
1 1 package cn.iocoder.dashboard.framework.mybatis.config;
2 2  
  3 +import cn.iocoder.dashboard.framework.mybatis.core.handler.DefaultDBFieldHandler;
  4 +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
3 5 import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
4 6 import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
5 7 import org.apache.ibatis.annotations.Mapper;
... ... @@ -13,7 +15,8 @@ import org.springframework.context.annotation.Configuration;
13 15 * @author 芋道源码
14 16 */
15 17 @Configuration
16   -@MapperScan(value = "${yudao.info.base-package}", annotationClass = Mapper.class)
  18 +@MapperScan(value = "${yudao.info.base-package}", annotationClass = Mapper.class,
  19 + lazyInitialization = "${mybatis.lazy-initialization:false}") // Mapper 懒加载,目前仅用于单元测试
17 20 public class MybatisConfiguration {
18 21  
19 22 @Bean
... ... @@ -23,4 +26,9 @@ public class MybatisConfiguration {
23 26 return mybatisPlusInterceptor;
24 27 }
25 28  
  29 + @Bean
  30 + public MetaObjectHandler defaultMetaObjectHandler(){
  31 + return new DefaultDBFieldHandler(); // 自动填充参数类
  32 + }
  33 +
26 34 }
... ...
src/main/java/cn/iocoder/dashboard/framework/mybatis/core/dataobject/BaseDO.java
1 1 package cn.iocoder.dashboard.framework.mybatis.core.dataobject;
2 2  
  3 +import com.baomidou.mybatisplus.annotation.FieldFill;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
3 5 import com.baomidou.mybatisplus.annotation.TableLogic;
4 6 import lombok.Data;
5 7  
... ... @@ -15,19 +17,27 @@ public class BaseDO implements Serializable {
15 17 /**
16 18 * 创建时间
17 19 */
  20 + @TableField(fill = FieldFill.INSERT)
18 21 private Date createTime;
19 22 /**
20 23 * 最后更新时间
21 24 */
  25 + @TableField(fill = FieldFill.INSERT_UPDATE)
22 26 private Date updateTime;
23 27 /**
24   - * 创建者 TODO 芋艿:迁移成编号
  28 + * 创建者,目前使用 SysUser 的 id 编号
  29 + *
  30 + * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
25 31 */
26   - private String createBy;
  32 + @TableField(fill = FieldFill.INSERT)
  33 + private String creator;
27 34 /**
28   - * 更新者 TODO 芋艿:迁移成编号
  35 + * 更新者,目前使用 SysUser 的 id 编号
  36 + *
  37 + * 使用 String 类型的原因是,未来可能会存在非数值的情况,留好拓展性。
29 38 */
30   - private String updateBy;
  39 + @TableField(fill = FieldFill.INSERT_UPDATE)
  40 + private String updater;
31 41 /**
32 42 * 是否删除
33 43 */
... ...
src/main/java/cn/iocoder/dashboard/framework/mybatis/core/handler/DefaultDBFieldHandler.java 0 → 100644
  1 +package cn.iocoder.dashboard.framework.mybatis.core.handler;
  2 +
  3 +import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO;
  4 +import cn.iocoder.dashboard.framework.security.core.LoginUser;
  5 +import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils;
  6 +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
  7 +import org.apache.ibatis.reflection.MetaObject;
  8 +
  9 +import java.util.Date;
  10 +import java.util.Objects;
  11 +
  12 +/**
  13 + * 通用参数填充实现类
  14 + *
  15 + * 如果没有显式的对通用参数进行赋值,这里会对通用参数进行填充、赋值
  16 + *
  17 + * @author hexiaowu
  18 + */
  19 +public class DefaultDBFieldHandler implements MetaObjectHandler {
  20 +
  21 + @Override
  22 + public void insertFill(MetaObject metaObject) {
  23 + if (Objects.nonNull(metaObject) && metaObject.getOriginalObject() instanceof BaseDO) {
  24 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
  25 + BaseDO baseDO = (BaseDO) metaObject.getOriginalObject();
  26 + Date current = new Date();
  27 +
  28 + // 创建时间为空,则以当前时间为插入时间
  29 + if (Objects.isNull(baseDO.getCreateTime())) {
  30 + baseDO.setCreateTime(current);
  31 + }
  32 + // 更新时间为空,则以当前时间为更新时间
  33 + if (Objects.isNull(baseDO.getUpdateTime())) {
  34 + baseDO.setUpdateTime(current);
  35 + }
  36 + // 当前登录用户不为空,创建人为空,则当前登录用户为创建人
  37 + if (Objects.nonNull(loginUser) && Objects.isNull(baseDO.getCreator())) {
  38 + baseDO.setCreator(loginUser.getId().toString());
  39 + }
  40 + // 当前登录用户不为空,更新人为空,则当前登录用户为更新人
  41 + if (Objects.nonNull(loginUser) && Objects.isNull(baseDO.getUpdater())) {
  42 + baseDO.setUpdater(loginUser.getId().toString());
  43 + }
  44 + }
  45 + }
  46 +
  47 + @Override
  48 + public void updateFill(MetaObject metaObject) {
  49 + Object modifyTime = getFieldValByName("updateTime", metaObject);
  50 + Object modifier = getFieldValByName("updater", metaObject);
  51 + // 获取登录用户信息
  52 + LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
  53 +
  54 + // 更新时间为空,则以当前时间为更新时间
  55 + if (Objects.isNull(modifyTime)) {
  56 + setFieldValByName("updateTime", new Date(), metaObject);
  57 + }
  58 + // 当前登录用户不为空,更新人为空,则当前登录用户为更新人
  59 + if (Objects.nonNull(loginUser) && Objects.isNull(modifier)) {
  60 + setFieldValByName("updater", loginUser.getId().toString(), metaObject);
  61 + }
  62 + }
  63 +}
... ...
src/main/java/cn/iocoder/dashboard/framework/mybatis/core/mapper/BaseMapperX.java
... ... @@ -28,6 +28,10 @@ public interface BaseMapperX&lt;T&gt; extends BaseMapper&lt;T&gt; {
28 28 return selectOne(new QueryWrapper<T>().eq(field, value));
29 29 }
30 30  
  31 + default Integer selectCount(String field, Object value) {
  32 + return selectCount(new QueryWrapper<T>().eq(field, value));
  33 + }
  34 +
31 35 default List<T> selectList() {
32 36 return selectList(new QueryWrapper<>());
33 37 }
... ...
src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 安全框架 Spring Security 入门》.md deleted
1   -<http://www.iocoder.cn/Spring-Boot/Spring-Security/?github>
src/main/java/cn/iocoder/dashboard/framework/resilience4j/《芋道 Spring Boot 服务容错 Resilience4j 入门》.md 0 → 100644
  1 +<https://www.iocoder.cn/Spring-Boot/Resilience4j/?yudao>
... ...
src/main/java/cn/iocoder/dashboard/framework/security/config/SecurityConfiguration.java
... ... @@ -152,7 +152,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
152 152 .anyRequest().authenticated()
153 153 .and()
154 154 .headers().frameOptions().disable();
155   - httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
  155 + httpSecurity.logout().logoutUrl(webProperties.getApiPrefix() + "/logout").logoutSuccessHandler(logoutSuccessHandler);
156 156 // 添加 JWT Filter
157 157 httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
158 158 }
... ...
src/main/java/cn/iocoder/dashboard/framework/security/core/handler/LogoutSuccessHandlerImpl.java
1 1 package cn.iocoder.dashboard.framework.security.core.handler;
2 2  
3 3 import cn.hutool.core.util.StrUtil;
  4 +import cn.iocoder.dashboard.common.pojo.CommonResult;
4 5 import cn.iocoder.dashboard.framework.security.config.SecurityProperties;
5 6 import cn.iocoder.dashboard.framework.security.core.service.SecurityAuthFrameworkService;
6 7 import cn.iocoder.dashboard.framework.security.core.util.SecurityFrameworkUtils;
... ... @@ -36,6 +37,6 @@ public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler {
36 37 securityFrameworkService.logout(token);
37 38 }
38 39 // 返回成功
39   - ServletUtils.writeJSON(response, null);
  40 + ServletUtils.writeJSON(response, CommonResult.success(null));
40 41 }
41 42 }
... ...
src/main/java/cn/iocoder/dashboard/framework/security/core/util/SecurityFrameworkUtils.java
... ... @@ -2,7 +2,10 @@ package cn.iocoder.dashboard.framework.security.core.util;
2 2  
3 3 import cn.iocoder.dashboard.framework.security.core.LoginUser;
4 4 import cn.iocoder.dashboard.framework.web.core.util.WebFrameworkUtils;
  5 +import org.springframework.lang.Nullable;
5 6 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
  7 +import org.springframework.security.core.Authentication;
  8 +import org.springframework.security.core.context.SecurityContext;
6 9 import org.springframework.security.core.context.SecurityContextHolder;
7 10 import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
8 11 import org.springframework.util.StringUtils;
... ... @@ -40,9 +43,20 @@ public class SecurityFrameworkUtils {
40 43  
41 44 /**
42 45 * 获取当前用户
  46 + *
  47 + * @return 当前用户
43 48 */
  49 + @Nullable
44 50 public static LoginUser getLoginUser() {
45   - return (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
  51 + SecurityContext context = SecurityContextHolder.getContext();
  52 + if (context == null) {
  53 + return null;
  54 + }
  55 + Authentication authentication = context.getAuthentication();
  56 + if (authentication == null) {
  57 + return null;
  58 + }
  59 + return authentication.getPrincipal() instanceof LoginUser ? (LoginUser) authentication.getPrincipal() : null;
46 60 }
47 61  
48 62 /**
... ... @@ -50,8 +64,10 @@ public class SecurityFrameworkUtils {
50 64 *
51 65 * @return 用户编号
52 66 */
  67 + @Nullable
53 68 public static Long getLoginUserId() {
54   - return getLoginUser().getId();
  69 + LoginUser loginUser = getLoginUser();
  70 + return loginUser != null ? loginUser.getId() : null;
55 71 }
56 72  
57 73 /**
... ... @@ -59,8 +75,10 @@ public class SecurityFrameworkUtils {
59 75 *
60 76 * @return 角色编号数组
61 77 */
  78 + @Nullable
62 79 public static Set<Long> getLoginUserRoleIds() {
63   - return getLoginUser().getRoleIds();
  80 + LoginUser loginUser = getLoginUser();
  81 + return loginUser != null ? loginUser.getRoleIds() : null;
64 82 }
65 83  
66 84 /**
... ...
src/main/java/cn/iocoder/dashboard/framework/swagger/config/SwaggerAutoConfiguration.java
... ... @@ -10,15 +10,17 @@ import org.springframework.context.annotation.Configuration;
10 10 import org.springframework.http.HttpHeaders;
11 11 import springfox.documentation.builders.ApiInfoBuilder;
12 12 import springfox.documentation.builders.PathSelectors;
13   -import springfox.documentation.service.*;
  13 +import springfox.documentation.service.ApiInfo;
  14 +import springfox.documentation.service.ApiKey;
  15 +import springfox.documentation.service.AuthorizationScope;
  16 +import springfox.documentation.service.Contact;
  17 +import springfox.documentation.service.SecurityReference;
  18 +import springfox.documentation.service.SecurityScheme;
14 19 import springfox.documentation.spi.DocumentationType;
15 20 import springfox.documentation.spi.service.contexts.SecurityContext;
16 21 import springfox.documentation.spring.web.plugins.Docket;
17 22 import springfox.documentation.swagger2.annotations.EnableSwagger2;
18   -import springfox.documentation.service.ApiKey;
19 23  
20   -import java.util.ArrayList;
21   -import java.util.Arrays;
22 24 import java.util.Collections;
23 25 import java.util.List;
24 26  
... ...
src/main/java/cn/iocoder/dashboard/framework/web/config/WebConfiguration.java
... ... @@ -27,9 +27,10 @@ public class WebConfiguration implements WebMvcConfigurer {
27 27  
28 28 @Override
29 29 public void configurePathMatch(PathMatchConfigurer configurer) {
  30 + // 设置 API 前缀,仅仅匹配 controller 包下的
30 31 configurer.addPathPrefix(webProperties.getApiPrefix(), clazz ->
31 32 clazz.isAnnotationPresent(RestController.class)
32   - && clazz.getPackage().getName().startsWith(webProperties.getControllerPackage()));
  33 + && clazz.getPackage().getName().startsWith(webProperties.getControllerPackage())); // 仅仅匹配 controller 包
33 34 }
34 35  
35 36 // ========== Filter 相关 ==========
... ...
src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java
1 1 package cn.iocoder.dashboard.modules.infra.controller.config;
2 2  
3   -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil;
4 3 import cn.iocoder.dashboard.common.pojo.CommonResult;
5 4 import cn.iocoder.dashboard.common.pojo.PageResult;
6 5 import cn.iocoder.dashboard.framework.excel.core.util.ExcelUtils;
7   -import cn.iocoder.dashboard.framework.idempotent.core.annotation.Idempotent;
8   -import cn.iocoder.dashboard.framework.idempotent.core.keyresolver.impl.ExpressionIdempotentKeyResolver;
  6 +import cn.iocoder.dashboard.framework.logger.operatelog.core.annotations.OperateLog;
9 7 import cn.iocoder.dashboard.modules.infra.controller.config.vo.*;
10 8 import cn.iocoder.dashboard.modules.infra.convert.config.InfConfigConvert;
11 9 import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO;
... ... @@ -13,95 +11,95 @@ import cn.iocoder.dashboard.modules.infra.service.config.InfConfigService;
13 11 import io.swagger.annotations.Api;
14 12 import io.swagger.annotations.ApiImplicitParam;
15 13 import io.swagger.annotations.ApiOperation;
  14 +import org.springframework.security.access.prepost.PreAuthorize;
16 15 import org.springframework.validation.annotation.Validated;
17 16 import org.springframework.web.bind.annotation.*;
18 17  
19 18 import javax.annotation.Resource;
20 19 import javax.servlet.http.HttpServletResponse;
  20 +import javax.validation.Valid;
21 21 import java.io.IOException;
22 22 import java.util.List;
23 23  
  24 +import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception;
24 25 import static cn.iocoder.dashboard.common.pojo.CommonResult.success;
  26 +import static cn.iocoder.dashboard.framework.logger.operatelog.core.enums.OperateTypeEnum.EXPORT;
25 27 import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.CONFIG_GET_VALUE_ERROR_IF_SENSITIVE;
26 28  
27 29 @Api(tags = "参数配置")
28 30 @RestController
29 31 @RequestMapping("/infra/config")
  32 +@Validated
30 33 public class InfConfigController {
31 34  
32 35 @Resource
33 36 private InfConfigService configService;
34 37  
35   - @ApiOperation("获取参数配置分页")
36   - @GetMapping("/page")
37   -// @PreAuthorize("@ss.hasPermi('infra:config:list')")
38   - public CommonResult<PageResult<InfConfigRespVO>> getConfigPage(@Validated InfConfigPageReqVO reqVO) {
39   - PageResult<InfConfigDO> page = configService.getConfigPage(reqVO);
40   - return success(InfConfigConvert.INSTANCE.convertPage(page));
  38 + @PostMapping("/create")
  39 + @ApiOperation("创建参数配置")
  40 + @PreAuthorize("@ss.hasPermission('infra:config:create')")
  41 + public CommonResult<Long> createConfig(@Valid @RequestBody InfConfigCreateReqVO reqVO) {
  42 + return success(configService.createConfig(reqVO));
41 43 }
42 44  
43   - @ApiOperation("导出参数配置")
44   - @GetMapping("/export")
45   -// @Log(title = "参数管理", businessType = BusinessType.EXPORT)
46   -// @PreAuthorize("@ss.hasPermi('infra:config:export')")
47   - public void exportSysConfig(HttpServletResponse response, @Validated InfConfigExportReqVO reqVO) throws IOException {
48   - List<InfConfigDO> list = configService.getConfigList(reqVO);
49   - // 拼接数据
50   - List<InfConfigExcelVO> excelDataList = InfConfigConvert.INSTANCE.convertList(list);
51   - // 输出
52   - ExcelUtils.write(response, "参数配置.xls", "配置列表",
53   - InfConfigExcelVO.class, excelDataList);
  45 + @PutMapping("/update")
  46 + @ApiOperation("修改参数配置")
  47 + @PreAuthorize("@ss.hasPermission('infra:config:update')")
  48 + public CommonResult<Boolean> updateConfig(@Valid @RequestBody InfConfigUpdateReqVO reqVO) {
  49 + configService.updateConfig(reqVO);
  50 + return success(true);
54 51 }
55 52  
56   - @ApiOperation("获得参数配置")
  53 + @DeleteMapping("/delete")
  54 + @ApiOperation("删除参数配置")
57 55 @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
  56 + @PreAuthorize("@ss.hasPermission('infra:config:delete')")
  57 + public CommonResult<Boolean> deleteConfig(@RequestParam("id") Long id) {
  58 + configService.deleteConfig(id);
  59 + return success(true);
  60 + }
  61 +
58 62 @GetMapping(value = "/get")
59   -// @PreAuthorize("@ss.hasPermi('infra:config:query')")
  63 + @ApiOperation("获得参数配置")
  64 + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
  65 + @PreAuthorize("@ss.hasPermission('infra:config:query')")
60 66 public CommonResult<InfConfigRespVO> getConfig(@RequestParam("id") Long id) {
61 67 return success(InfConfigConvert.INSTANCE.convert(configService.getConfig(id)));
62 68 }
63 69  
  70 + @GetMapping(value = "/get-value-by-key")
64 71 @ApiOperation(value = "根据参数键名查询参数值", notes = "敏感配置,不允许返回给前端")
65 72 @ApiImplicitParam(name = "key", value = "参数键", required = true, example = "yunai.biz.username", dataTypeClass = String.class)
66   - @GetMapping(value = "/get-value-by-key")
67 73 public CommonResult<String> getConfigKey(@RequestParam("key") String key) {
68 74 InfConfigDO config = configService.getConfigByKey(key);
69 75 if (config == null) {
70 76 return null;
71 77 }
72 78 if (config.getSensitive()) {
73   - throw ServiceExceptionUtil.exception(CONFIG_GET_VALUE_ERROR_IF_SENSITIVE);
  79 + throw exception(CONFIG_GET_VALUE_ERROR_IF_SENSITIVE);
74 80 }
75 81 return success(config.getValue());
76 82 }
77 83  
78   - @ApiOperation("新增参数配置")
79   - @PostMapping("/create")
80   -// @PreAuthorize("@ss.hasPermi('infra:config:add')")
81   -// @Log(title = "参数管理", businessType = BusinessType.INSERT)
82   - @Idempotent(timeout = 60, keyResolver = ExpressionIdempotentKeyResolver.class, keyArg = "#reqVO.key")
83   - public CommonResult<Long> createConfig(@Validated @RequestBody InfConfigCreateReqVO reqVO) {
84   - return success(configService.createConfig(reqVO));
85   - }
86   -
87   - @ApiOperation("修改参数配置")
88   - @PutMapping("/update")
89   -// @PreAuthorize("@ss.hasPermi('infra:config:edit')")
90   -// @Log(title = "参数管理", businessType = BusinessType.UPDATE)
91   - @Idempotent(timeout = 60)
92   - public CommonResult<Boolean> updateConfig(@Validated @RequestBody InfConfigUpdateReqVO reqVO) {
93   - configService.updateConfig(reqVO);
94   - return success(true);
  84 + @GetMapping("/page")
  85 + @ApiOperation("获取参数配置分页")
  86 + @PreAuthorize("@ss.hasPermission('infra:config:query')")
  87 + public CommonResult<PageResult<InfConfigRespVO>> getConfigPage(@Valid InfConfigPageReqVO reqVO) {
  88 + PageResult<InfConfigDO> page = configService.getConfigPage(reqVO);
  89 + return success(InfConfigConvert.INSTANCE.convertPage(page));
95 90 }
96 91  
97   - @ApiOperation("删除参数配置")
98   - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
99   - @DeleteMapping("/delete")
100   -// @PreAuthorize("@ss.hasPermi('infra:config:remove')")
101   -// @Log(title = "参数管理", businessType = BusinessType.DELETE)
102   - public CommonResult<Boolean> deleteConfig(@RequestParam("id") Long id) {
103   - configService.deleteConfig(id);
104   - return success(true);
  92 + @GetMapping("/export")
  93 + @ApiOperation("导出参数配置")
  94 + @PreAuthorize("@ss.hasPermission('infra:config:export')")
  95 + @OperateLog(type = EXPORT)
  96 + public void exportSysConfig(@Valid InfConfigExportReqVO reqVO,
  97 + HttpServletResponse response) throws IOException {
  98 + List<InfConfigDO> list = configService.getConfigList(reqVO);
  99 + // 拼接数据
  100 + List<InfConfigExcelVO> datas = InfConfigConvert.INSTANCE.convertList(list);
  101 + // 输出
  102 + ExcelUtils.write(response, "参数配置.xls", "数据", InfConfigExcelVO.class, datas);
105 103 }
106 104  
107 105 }
... ...
src/main/java/cn/iocoder/dashboard/modules/infra/controller/job/InfJobLogController.java
... ... @@ -75,7 +75,7 @@ public class InfJobLogController {
75 75 List<InfJobLogDO> list = jobLogService.getJobLogList(exportReqVO);
76 76 // 导出 Excel
77 77 List<InfJobLogExcelVO> datas = InfJobLogConvert.INSTANCE.convertList02(list);
78   - ExcelUtils.write(response, "定时任务.xls", "数据", InfJobLogExcelVO.class, datas);
  78 + ExcelUtils.write(response, "任务日志.xls", "数据", InfJobLogExcelVO.class, datas);
79 79 }
80 80  
81 81 }
... ...
src/main/java/cn/iocoder/dashboard/modules/infra/dal/mysql/config/InfConfigMapper.java
... ... @@ -14,20 +14,21 @@ import java.util.List;
14 14 @Mapper
15 15 public interface InfConfigMapper extends BaseMapperX<InfConfigDO> {
16 16  
17   - default PageResult<InfConfigDO> selectPage(InfConfigPageReqVO reqVO) {
18   - return selectPage(reqVO,
19   - new QueryWrapperX<InfConfigDO>().likeIfPresent("name", reqVO.getName())
20   - .likeIfPresent("`key`", reqVO.getKey())
21   - .eqIfPresent("`type`", reqVO.getType())
22   - .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime()));
23   - }
24   -
25 17 default InfConfigDO selectByKey(String key) {
26 18 return selectOne(new QueryWrapper<InfConfigDO>().eq("`key`", key));
27 19 }
28 20  
  21 + default PageResult<InfConfigDO> selectPage(InfConfigPageReqVO reqVO) {
  22 + return selectPage(reqVO, new QueryWrapperX<InfConfigDO>()
  23 + .likeIfPresent("name", reqVO.getName())
  24 + .likeIfPresent("`key`", reqVO.getKey())
  25 + .eqIfPresent("`type`", reqVO.getType())
  26 + .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime()));
  27 + }
  28 +
29 29 default List<InfConfigDO> selectList(InfConfigExportReqVO reqVO) {
30   - return selectList(new QueryWrapperX<InfConfigDO>().likeIfPresent("name", reqVO.getName())
  30 + return selectList(new QueryWrapperX<InfConfigDO>()
  31 + .likeIfPresent("name", reqVO.getName())
31 32 .likeIfPresent("`key`", reqVO.getKey())
32 33 .eqIfPresent("`type`", reqVO.getType())
33 34 .betweenIfPresent("create_time", reqVO.getBeginTime(), reqVO.getEndTime()));
... ...
src/main/java/cn/iocoder/dashboard/modules/infra/service/config/InfConfigService.java
... ... @@ -7,28 +7,37 @@ import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigPageReqV
7 7 import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigUpdateReqVO;
8 8 import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO;
9 9  
  10 +import javax.validation.Valid;
10 11 import java.util.List;
11 12  
12 13 /**
13 14 * 参数配置 Service 接口
  15 + *
  16 + * @author 芋道源码
14 17 */
15 18 public interface InfConfigService {
16 19  
17 20 /**
18   - * 获得参数配置分页列表
  21 + * 创建参数配置
19 22 *
20   - * @param reqVO 分页条件
21   - * @return 分页列表
  23 + * @param reqVO 创建信息
  24 + * @return 配置编号
22 25 */
23   - PageResult<InfConfigDO> getConfigPage(InfConfigPageReqVO reqVO);
  26 + Long createConfig(@Valid InfConfigCreateReqVO reqVO);
24 27  
25 28 /**
26   - * 获得参数配置列表
  29 + * 更新参数配置
27 30 *
28   - * @param reqVO 列表
29   - * @return 列表
  31 + * @param reqVO 更新信息
30 32 */
31   - List<InfConfigDO> getConfigList(InfConfigExportReqVO reqVO);
  33 + void updateConfig(@Valid InfConfigUpdateReqVO reqVO);
  34 +
  35 + /**
  36 + * 删除参数配置
  37 + *
  38 + * @param id 配置编号
  39 + */
  40 + void deleteConfig(Long id);
32 41  
33 42 /**
34 43 * 获得参数配置
... ... @@ -47,25 +56,20 @@ public interface InfConfigService {
47 56 InfConfigDO getConfigByKey(String key);
48 57  
49 58 /**
50   - * 创建参数配置
  59 + * 获得参数配置分页列表
51 60 *
52   - * @param reqVO 创建信息
53   - * @return 配置编号
  61 + * @param reqVO 分页条件
  62 + * @return 分页列表
54 63 */
55   - Long createConfig(InfConfigCreateReqVO reqVO);
  64 + PageResult<InfConfigDO> getConfigPage(@Valid InfConfigPageReqVO reqVO);
56 65  
57 66 /**
58   - * 更新参数配置
  67 + * 获得参数配置列表
59 68 *
60   - * @param reqVO 更新信息
  69 + * @param reqVO 列表
  70 + * @return 列表
61 71 */
62   - void updateConfig(InfConfigUpdateReqVO reqVO);
  72 + List<InfConfigDO> getConfigList(@Valid InfConfigExportReqVO reqVO);
63 73  
64   - /**
65   - * 删除参数配置
66   - *
67   - * @param id 配置编号
68   - */
69   - void deleteConfig(Long id);
70 74  
71 75 }
... ...
src/main/java/cn/iocoder/dashboard/modules/infra/service/config/impl/InfConfigServiceImpl.java
... ... @@ -12,8 +12,10 @@ import cn.iocoder.dashboard.modules.infra.dal.dataobject.config.InfConfigDO;
12 12 import cn.iocoder.dashboard.modules.infra.enums.config.InfConfigTypeEnum;
13 13 import cn.iocoder.dashboard.modules.infra.mq.producer.config.InfConfigProducer;
14 14 import cn.iocoder.dashboard.modules.infra.service.config.InfConfigService;
  15 +import com.google.common.annotations.VisibleForTesting;
15 16 import lombok.extern.slf4j.Slf4j;
16 17 import org.springframework.stereotype.Service;
  18 +import org.springframework.validation.annotation.Validated;
17 19  
18 20 import javax.annotation.Resource;
19 21  
... ... @@ -26,6 +28,7 @@ import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.*;
26 28 */
27 29 @Service
28 30 @Slf4j
  31 +@Validated
29 32 public class InfConfigServiceImpl implements InfConfigService {
30 33  
31 34 @Resource
... ... @@ -35,26 +38,6 @@ public class InfConfigServiceImpl implements InfConfigService {
35 38 private InfConfigProducer configProducer;
36 39  
37 40 @Override
38   - public PageResult<InfConfigDO> getConfigPage(InfConfigPageReqVO reqVO) {
39   - return configMapper.selectPage(reqVO);
40   - }
41   -
42   - @Override
43   - public List<InfConfigDO> getConfigList(InfConfigExportReqVO reqVO) {
44   - return configMapper.selectList(reqVO);
45   - }
46   -
47   - @Override
48   - public InfConfigDO getConfig(Long id) {
49   - return configMapper.selectById(id);
50   - }
51   -
52   - @Override
53   - public InfConfigDO getConfigByKey(String key) {
54   - return configMapper.selectByKey(key);
55   - }
56   -
57   - @Override
58 41 public Long createConfig(InfConfigCreateReqVO reqVO) {
59 42 // 校验正确性
60 43 checkCreateOrUpdate(null, reqVO.getKey());
... ... @@ -92,6 +75,26 @@ public class InfConfigServiceImpl implements InfConfigService {
92 75 configProducer.sendConfigRefreshMessage();
93 76 }
94 77  
  78 + @Override
  79 + public InfConfigDO getConfig(Long id) {
  80 + return configMapper.selectById(id);
  81 + }
  82 +
  83 + @Override
  84 + public InfConfigDO getConfigByKey(String key) {
  85 + return configMapper.selectByKey(key);
  86 + }
  87 +
  88 + @Override
  89 + public PageResult<InfConfigDO> getConfigPage(InfConfigPageReqVO reqVO) {
  90 + return configMapper.selectPage(reqVO);
  91 + }
  92 +
  93 + @Override
  94 + public List<InfConfigDO> getConfigList(InfConfigExportReqVO reqVO) {
  95 + return configMapper.selectList(reqVO);
  96 + }
  97 +
95 98 private void checkCreateOrUpdate(Long id, String key) {
96 99 // 校验自己存在
97 100 checkConfigExists(id);
... ... @@ -99,7 +102,8 @@ public class InfConfigServiceImpl implements InfConfigService {
99 102 checkConfigKeyUnique(id, key);
100 103 }
101 104  
102   - private InfConfigDO checkConfigExists(Long id) {
  105 + @VisibleForTesting
  106 + public InfConfigDO checkConfigExists(Long id) {
103 107 if (id == null) {
104 108 return null;
105 109 }
... ... @@ -110,7 +114,8 @@ public class InfConfigServiceImpl implements InfConfigService {
110 114 return config;
111 115 }
112 116  
113   - private void checkConfigKeyUnique(Long id, String key) {
  117 + @VisibleForTesting
  118 + public void checkConfigKeyUnique(Long id, String key) {
114 119 InfConfigDO config = configMapper.selectByKey(key);
115 120 if (config == null) {
116 121 return;
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/dept/SysDeptBaseVO.java
... ... @@ -25,8 +25,8 @@ public class SysDeptBaseVO {
25 25 private Long parentId;
26 26  
27 27 @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
28   - @NotBlank(message = "显示顺序不能为空")
29   - private String sort;
  28 + @NotNull(message = "显示顺序不能为空")
  29 + private Integer sort;
30 30  
31 31 @ApiModelProperty(value = "负责人", example = "芋道")
32 32 private String leader;
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostBaseVO.java
... ... @@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
4 4 import lombok.Data;
5 5  
6 6 import javax.validation.constraints.NotBlank;
  7 +import javax.validation.constraints.NotNull;
7 8 import javax.validation.constraints.Size;
8 9  
9 10 /**
... ... @@ -24,8 +25,8 @@ public class SysPostBaseVO {
24 25 private String code;
25 26  
26 27 @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
27   - @NotBlank(message = "显示顺序不能为空")
28   - private String sort;
  28 + @NotNull(message = "显示顺序不能为空")
  29 + private Integer sort;
29 30  
30 31 @ApiModelProperty(value = "状态", required = true, example = "1", notes = "参见 SysCommonStatusEnum 枚举类")
31 32 private Integer status;
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/dept/vo/post/SysPostExcelVO.java
... ... @@ -23,7 +23,7 @@ public class SysPostExcelVO {
23 23 private String name;
24 24  
25 25 @ExcelProperty("岗位排序")
26   - private String sort;
  26 + private Integer sort;
27 27  
28 28 @ExcelProperty(value = "状态", converter = DictConvert.class)
29 29 @DictFormat(SYS_COMMON_STATUS)
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/dict/vo/data/SysDictDataBaseVO.java
... ... @@ -15,7 +15,7 @@ import javax.validation.constraints.Size;
15 15 public class SysDictDataBaseVO {
16 16  
17 17 @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
18   - @NotBlank(message = "显示顺序不能为空")
  18 + @NotNull(message = "显示顺序不能为空")
19 19 private Integer sort;
20 20  
21 21 @ApiModelProperty(value = "字典标签", required = true, example = "芋道")
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/menu/SysMenuBaseVO.java
... ... @@ -28,8 +28,8 @@ public class SysMenuBaseVO {
28 28 private Integer type;
29 29  
30 30 @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
31   - @NotBlank(message = "显示顺序不能为空")
32   - private String sort;
  31 + @NotNull(message = "显示顺序不能为空")
  32 + private Integer sort;
33 33  
34 34 @ApiModelProperty(value = "父菜单 ID", required = true, example = "1024")
35 35 @NotNull(message = "父菜单 ID 不能为空")
... ...
src/main/java/cn/iocoder/dashboard/modules/system/controller/permission/vo/role/SysRoleBaseVO.java
... ... @@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
4 4 import lombok.Data;
5 5  
6 6 import javax.validation.constraints.NotBlank;
  7 +import javax.validation.constraints.NotNull;
7 8 import javax.validation.constraints.Size;
8 9  
9 10 /**
... ... @@ -24,8 +25,8 @@ public class SysRoleBaseVO {
24 25 private String code;
25 26  
26 27 @ApiModelProperty(value = "显示顺序不能为空", required = true, example = "1024")
27   - @NotBlank(message = "显示顺序不能为空")
28   - private String sort;
  28 + @NotNull(message = "显示顺序不能为空")
  29 + private Integer sort;
29 30  
30 31 @ApiModelProperty(value = "角色类型", required = true, example = "1", notes = "见 SysRoleTypeEnum 枚举")
31 32 private Integer type;
... ...
src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/auth/SysUserSessionDO.java
... ... @@ -10,6 +10,8 @@ import lombok.Builder;
10 10 import lombok.Data;
11 11 import lombok.EqualsAndHashCode;
12 12  
  13 +import java.util.Date;
  14 +
13 15 /**
14 16 * 在线用户表
15 17 *
... ... @@ -36,6 +38,14 @@ public class SysUserSessionDO extends BaseDO {
36 38 * 关联 {@link SysUserDO#getId()}
37 39 */
38 40 private Long userId;
  41 +
  42 + /**
  43 + * 用户账号
  44 + *
  45 + * 冗余,因为账号可以变更
  46 + */
  47 + private String username;
  48 +
39 49 /**
40 50 * 用户 IP
41 51 */
... ... @@ -44,5 +54,9 @@ public class SysUserSessionDO extends BaseDO {
44 54 * 浏览器 UA
45 55 */
46 56 private String userAgent;
  57 + /**
  58 + * 会话超时时间
  59 + */
  60 + private Date sessionTimeout;
47 61  
48 62 }
... ...
src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysDeptDO.java
... ... @@ -35,7 +35,7 @@ public class SysDeptDO extends BaseDO {
35 35 /**
36 36 * 显示顺序
37 37 */
38   - private String sort;
  38 + private Integer sort;
39 39 /**
40 40 * 负责人
41 41 */
... ...
src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/dept/SysPostDO.java
... ... @@ -34,7 +34,7 @@ public class SysPostDO extends BaseDO {
34 34 /**
35 35 * 岗位排序
36 36 */
37   - private String sort;
  37 + private Integer sort;
38 38 /**
39 39 * 状态
40 40 *
... ...
src/main/java/cn/iocoder/dashboard/modules/system/dal/dataobject/permission/SysMenuDO.java
... ... @@ -49,7 +49,7 @@ public class SysMenuDO extends BaseDO {
49 49 /**
50 50 * 显示顺序
51 51 */
52   - private String sort;
  52 + private Integer sort;
53 53 /**
54 54 * 父菜单ID
55 55 */
... ...
src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/auth/SysUserSessionMapper.java
... ... @@ -8,6 +8,8 @@ import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO;
8 8 import org.apache.ibatis.annotations.Mapper;
9 9  
10 10 import java.util.Collection;
  11 +import java.util.Date;
  12 +import java.util.List;
11 13  
12 14 @Mapper
13 15 public interface SysUserSessionMapper extends BaseMapperX<SysUserSessionDO> {
... ... @@ -18,4 +20,7 @@ public interface SysUserSessionMapper extends BaseMapperX&lt;SysUserSessionDO&gt; {
18 20 .likeIfPresent("user_ip", reqVO.getUserIp()));
19 21 }
20 22  
  23 + default List<SysUserSessionDO> selectListBySessionTimoutLt() {
  24 + return selectList(new QueryWrapperX<SysUserSessionDO>().lt("session_timeout",new Date()));
  25 + }
21 26 }
... ...
src/main/java/cn/iocoder/dashboard/modules/system/dal/mysql/dict/SysDictDataMapper.java
... ... @@ -15,13 +15,13 @@ import java.util.List;
15 15 @Mapper
16 16 public interface SysDictDataMapper extends BaseMapperX<SysDictDataDO> {
17 17  
18   - default SysDictDataDO selectByDictTypeAndLabel(String dictType, String label) {
  18 + default SysDictDataDO selectByDictTypeAndValue(String dictType, String value) {
19 19 return selectOne(new QueryWrapper<SysDictDataDO>().eq("dict_type", dictType)
20   - .eq("label", label));
  20 + .eq("value", value));
21 21 }
22 22  
23 23 default int selectCountByDictType(String dictType) {
24   - return selectCount(new QueryWrapper<SysDictDataDO>().eq("dict_type", dictType));
  24 + return selectCount("dict_type", dictType);
25 25 }
26 26  
27 27 default PageResult<SysDictDataDO> selectPage(SysDictDataPageReqVO reqVO) {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/SysRedisKeyConstants.java
... ... @@ -16,7 +16,7 @@ public interface SysRedisKeyConstants {
16 16  
17 17 RedisKeyDefine LOGIN_USER = new RedisKeyDefine("登陆用户的缓存",
18 18 "login_user:%s", // 参数为 sessionId
19   - STRING, LoginUser.class, Duration.ofMinutes(30));
  19 + STRING, LoginUser.class, RedisKeyDefine.TimeoutTypeEnum.DYNAMIC);
20 20  
21 21 RedisKeyDefine CAPTCHA_CODE = new RedisKeyDefine("验证码的缓存",
22 22 "captcha_code:%s", // 参数为 uuid
... ...
src/main/java/cn/iocoder/dashboard/modules/system/dal/redis/auth/SysLoginUserRedisDAO.java
1 1 package cn.iocoder.dashboard.modules.system.dal.redis.auth;
2 2  
3 3 import cn.iocoder.dashboard.framework.security.core.LoginUser;
  4 +import cn.iocoder.dashboard.modules.system.service.auth.SysUserSessionService;
4 5 import cn.iocoder.dashboard.util.json.JsonUtils;
5 6 import org.springframework.data.redis.core.StringRedisTemplate;
6 7 import org.springframework.stereotype.Repository;
7 8  
8 9 import javax.annotation.Resource;
  10 +import java.time.Duration;
9 11  
10 12 import static cn.iocoder.dashboard.modules.system.dal.redis.SysRedisKeyConstants.LOGIN_USER;
11 13  
... ... @@ -19,6 +21,8 @@ public class SysLoginUserRedisDAO {
19 21  
20 22 @Resource
21 23 private StringRedisTemplate stringRedisTemplate;
  24 + @Resource
  25 + private SysUserSessionService sysUserSessionService;
22 26  
23 27 public LoginUser get(String sessionId) {
24 28 String redisKey = formatKey(sessionId);
... ... @@ -27,7 +31,8 @@ public class SysLoginUserRedisDAO {
27 31  
28 32 public void set(String sessionId, LoginUser loginUser) {
29 33 String redisKey = formatKey(sessionId);
30   - stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(loginUser), LOGIN_USER.getTimeout());
  34 + stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(loginUser),
  35 + Duration.ofMillis(sysUserSessionService.getSessionTimeoutMillis()));
31 36 }
32 37  
33 38 public void delete(String sessionId) {
... ...
src/main/java/cn/iocoder/dashboard/modules/system/job/auth/SysUserSessionTimeoutJob.java
1 1 package cn.iocoder.dashboard.modules.system.job.auth;
2 2  
3 3 import cn.iocoder.dashboard.framework.quartz.core.handler.JobHandler;
  4 +import cn.iocoder.dashboard.modules.system.service.auth.SysUserSessionService;
4 5 import lombok.extern.slf4j.Slf4j;
5 6 import org.springframework.stereotype.Component;
6 7  
  8 +import javax.annotation.Resource;
  9 +
7 10 /**
8 11 * 用户 Session 超时 Job
9 12 *
10   - * @author 芋道源码
  13 + * @author 願
11 14 */
12 15 @Component
13 16 @Slf4j
14 17 public class SysUserSessionTimeoutJob implements JobHandler {
15 18  
  19 + @Resource
  20 + private SysUserSessionService sysUserSessionService;
  21 +
16 22 @Override
17 23 public String execute(String param) throws Exception {
18   -// System.out.println("执行了一次任务");
19   - log.info("[execute][执行任务:{}]", param);
20   - return null;
  24 + // 执行过期
  25 + Long timeoutCount = sysUserSessionService.clearSessionTimeout();
  26 + // 返回结果,记录每次的超时数量
  27 + return String.format("移除在线会话数量为 %s 个", timeoutCount);
21 28 }
22 29  
23 30 }
... ...
src/main/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionService.java
... ... @@ -60,4 +60,10 @@ public interface SysUserSessionService {
60 60 */
61 61 PageResult<SysUserSessionDO> getUserSessionPage(SysUserSessionPageReqVO reqVO);
62 62  
  63 + /**
  64 + * 移除超时的在线用户
  65 + *
  66 + * @return {@link Long } 移出的超时用户数量
  67 + **/
  68 + long clearSessionTimeout();
63 69 }
... ...
src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysAuthServiceImpl.java
... ... @@ -160,7 +160,26 @@ public class SysAuthServiceImpl implements SysAuthService {
160 160  
161 161 @Override
162 162 public void logout(String token) {
163   -// AsyncManager.me().execute(AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, "退出成功")); TODO 需要搞一搞
  163 + // 查询用户信息
  164 + LoginUser loginUser = userSessionService.getLoginUser(token);
  165 + if (loginUser == null) {
  166 + return;
  167 + }
  168 + // 删除 session
  169 + userSessionService.deleteUserSession(token);
  170 + // 记录登出日子和
  171 + this.createLogoutLog(loginUser.getUsername());
  172 + }
  173 +
  174 + private void createLogoutLog(String username) {
  175 + SysLoginLogCreateReqVO reqVO = new SysLoginLogCreateReqVO();
  176 + reqVO.setLogType(SysLoginLogTypeEnum.LOGOUT_SELF.getType());
  177 + reqVO.setTraceId(TracerUtils.getTraceId());
  178 + reqVO.setUsername(username);
  179 + reqVO.setUserAgent(ServletUtils.getUserAgent());
  180 + reqVO.setUserIp(ServletUtils.getClientIP());
  181 + reqVO.setResult(SysLoginResultEnum.SUCCESS.getResult());
  182 + loginLogService.createLoginLog(reqVO);
164 183 }
165 184  
166 185 @Override
... ...
src/main/java/cn/iocoder/dashboard/modules/system/service/auth/impl/SysUserSessionServiceImpl.java
... ... @@ -6,20 +6,28 @@ import cn.hutool.core.util.StrUtil;
6 6 import cn.iocoder.dashboard.common.pojo.PageResult;
7 7 import cn.iocoder.dashboard.framework.security.config.SecurityProperties;
8 8 import cn.iocoder.dashboard.framework.security.core.LoginUser;
  9 +import cn.iocoder.dashboard.framework.tracer.core.util.TracerUtils;
9 10 import cn.iocoder.dashboard.modules.system.controller.auth.vo.session.SysUserSessionPageReqVO;
10   -import cn.iocoder.dashboard.modules.system.dal.mysql.auth.SysUserSessionMapper;
  11 +import cn.iocoder.dashboard.modules.system.controller.logger.vo.loginlog.SysLoginLogCreateReqVO;
11 12 import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO;
12 13 import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO;
  14 +import cn.iocoder.dashboard.modules.system.dal.mysql.auth.SysUserSessionMapper;
13 15 import cn.iocoder.dashboard.modules.system.dal.redis.auth.SysLoginUserRedisDAO;
  16 +import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginLogTypeEnum;
  17 +import cn.iocoder.dashboard.modules.system.enums.logger.SysLoginResultEnum;
14 18 import cn.iocoder.dashboard.modules.system.service.auth.SysUserSessionService;
  19 +import cn.iocoder.dashboard.modules.system.service.logger.SysLoginLogService;
15 20 import cn.iocoder.dashboard.modules.system.service.user.SysUserService;
  21 +import com.google.common.collect.Lists;
16 22 import org.springframework.stereotype.Service;
17 23  
18 24 import javax.annotation.Resource;
19   -import java.util.Collection;
20   -import java.util.Date;
  25 +import java.time.Duration;
  26 +import java.util.*;
  27 +import java.util.stream.Collectors;
21 28  
22 29 import static cn.iocoder.dashboard.util.collection.CollectionUtils.convertSet;
  30 +import static cn.iocoder.dashboard.util.date.DateUtils.addTime;
23 31  
24 32 /**
25 33 * 在线用户 Session Service 实现类
... ... @@ -31,14 +39,14 @@ public class SysUserSessionServiceImpl implements SysUserSessionService {
31 39  
32 40 @Resource
33 41 private SecurityProperties securityProperties;
34   -
35 42 @Resource
36 43 private SysLoginUserRedisDAO loginUserRedisDAO;
37 44 @Resource
38 45 private SysUserSessionMapper userSessionMapper;
39   -
40 46 @Resource
41 47 private SysUserService userService;
  48 + @Resource
  49 + private SysLoginLogService loginLogService;
42 50  
43 51 @Override
44 52 public String createUserSession(LoginUser loginUser, String userIp, String userAgent) {
... ... @@ -49,7 +57,9 @@ public class SysUserSessionServiceImpl implements SysUserSessionService {
49 57 loginUserRedisDAO.set(sessionId, loginUser);
50 58 // 写入 DB 中
51 59 SysUserSessionDO userSession = SysUserSessionDO.builder().id(sessionId)
52   - .userId(loginUser.getId()).userIp(userIp).userAgent(userAgent).build();
  60 + .userId(loginUser.getId()).userIp(userIp).userAgent(userAgent).username(loginUser.getUsername())
  61 + .sessionTimeout(addTime(Duration.ofMillis(getSessionTimeoutMillis())))
  62 + .build();
53 63 userSessionMapper.insert(userSession);
54 64 // 返回 Session 编号
55 65 return sessionId;
... ... @@ -62,7 +72,9 @@ public class SysUserSessionServiceImpl implements SysUserSessionService {
62 72 loginUserRedisDAO.set(sessionId, loginUser);
63 73 // 更新 DB 中
64 74 SysUserSessionDO updateObj = SysUserSessionDO.builder().id(sessionId).build();
  75 + updateObj.setUsername(loginUser.getUsername());
65 76 updateObj.setUpdateTime(new Date());
  77 + updateObj.setSessionTimeout(addTime(Duration.ofMillis(getSessionTimeoutMillis())));
66 78 userSessionMapper.updateById(updateObj);
67 79 }
68 80  
... ... @@ -97,6 +109,36 @@ public class SysUserSessionServiceImpl implements SysUserSessionService {
97 109 return userSessionMapper.selectPage(reqVO, userIds);
98 110 }
99 111  
  112 + @Override
  113 + public long clearSessionTimeout() {
  114 + // 获取db里已经超时的用户列表
  115 + List<SysUserSessionDO> sessionTimeoutDOS = userSessionMapper.selectListBySessionTimoutLt();
  116 + Map<String, SysUserSessionDO> timeoutSessionDOMap = sessionTimeoutDOS
  117 + .stream()
  118 + .filter(sessionDO -> loginUserRedisDAO.get(sessionDO.getId()) == null)
  119 + .collect(Collectors.toMap(SysUserSessionDO::getId, o -> o));
  120 + // 确认已经超时,按批次移出在线用户列表
  121 + if (CollUtil.isNotEmpty(timeoutSessionDOMap)) {
  122 + Lists.partition(new ArrayList<>(timeoutSessionDOMap.keySet()), 100).forEach(userSessionMapper::deleteBatchIds);
  123 + //记录用户超时退出日志
  124 + createTimeoutLogoutLog(timeoutSessionDOMap.values());
  125 + }
  126 + return timeoutSessionDOMap.size();
  127 + }
  128 +
  129 + private void createTimeoutLogoutLog(Collection<SysUserSessionDO> timeoutSessionDOS) {
  130 + for (SysUserSessionDO timeoutSessionDO : timeoutSessionDOS) {
  131 + SysLoginLogCreateReqVO reqVO = new SysLoginLogCreateReqVO();
  132 + reqVO.setLogType(SysLoginLogTypeEnum.LOGOUT_TIMEOUT.getType());
  133 + reqVO.setTraceId(TracerUtils.getTraceId());
  134 + reqVO.setUsername(timeoutSessionDO.getUsername());
  135 + reqVO.setUserAgent(timeoutSessionDO.getUserAgent());
  136 + reqVO.setUserIp(timeoutSessionDO.getUserIp());
  137 + reqVO.setResult(SysLoginResultEnum.SUCCESS.getResult());
  138 + loginLogService.createLoginLog(reqVO);
  139 + }
  140 + }
  141 +
100 142 /**
101 143 * 生成 Session 编号,目前采用 UUID 算法
102 144 *
... ...
src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictDataServiceImpl.java
... ... @@ -2,7 +2,6 @@ package cn.iocoder.dashboard.modules.system.service.dict.impl;
2 2  
3 3 import cn.hutool.core.collection.CollUtil;
4 4 import cn.iocoder.dashboard.common.enums.CommonStatusEnum;
5   -import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil;
6 5 import cn.iocoder.dashboard.common.pojo.PageResult;
7 6 import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO;
8 7 import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO;
... ... @@ -10,12 +9,13 @@ import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataEx
10 9 import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataPageReqVO;
11 10 import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataUpdateReqVO;
12 11 import cn.iocoder.dashboard.modules.system.convert.dict.SysDictDataConvert;
13   -import cn.iocoder.dashboard.modules.system.dal.mysql.dict.SysDictDataMapper;
14 12 import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictDataDO;
15 13 import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO;
  14 +import cn.iocoder.dashboard.modules.system.dal.mysql.dict.SysDictDataMapper;
16 15 import cn.iocoder.dashboard.modules.system.mq.producer.dict.SysDictDataProducer;
17 16 import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService;
18 17 import cn.iocoder.dashboard.modules.system.service.dict.SysDictTypeService;
  18 +import com.google.common.annotations.VisibleForTesting;
19 19 import com.google.common.collect.ImmutableTable;
20 20 import lombok.extern.slf4j.Slf4j;
21 21 import org.springframework.scheduling.annotation.Scheduled;
... ... @@ -28,6 +28,7 @@ import java.util.Comparator;
28 28 import java.util.Date;
29 29 import java.util.List;
30 30  
  31 +import static cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil.exception;
31 32 import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*;
32 33  
33 34 /**
... ... @@ -156,7 +157,7 @@ public class SysDictDataServiceImpl implements SysDictDataService {
156 157 @Override
157 158 public Long createDictData(SysDictDataCreateReqVO reqVO) {
158 159 // 校验正确性
159   - this.checkCreateOrUpdate(null, reqVO.getLabel(), reqVO.getDictType());
  160 + this.checkCreateOrUpdate(null, reqVO.getValue(), reqVO.getDictType());
160 161 // 插入字典类型
161 162 SysDictDataDO dictData = SysDictDataConvert.INSTANCE.convert(reqVO);
162 163 dictDataMapper.insert(dictData);
... ... @@ -168,7 +169,7 @@ public class SysDictDataServiceImpl implements SysDictDataService {
168 169 @Override
169 170 public void updateDictData(SysDictDataUpdateReqVO reqVO) {
170 171 // 校验正确性
171   - this.checkCreateOrUpdate(reqVO.getId(), reqVO.getLabel(), reqVO.getDictType());
  172 + this.checkCreateOrUpdate(reqVO.getId(), reqVO.getValue(), reqVO.getDictType());
172 173 // 更新字典类型
173 174 SysDictDataDO updateObj = SysDictDataConvert.INSTANCE.convert(reqVO);
174 175 dictDataMapper.updateById(updateObj);
... ... @@ -191,46 +192,49 @@ public class SysDictDataServiceImpl implements SysDictDataService {
191 192 return dictDataMapper.selectCountByDictType(dictType);
192 193 }
193 194  
194   - private void checkCreateOrUpdate(Long id, String label, String dictType) {
  195 + private void checkCreateOrUpdate(Long id, String value, String dictType) {
195 196 // 校验自己存在
196 197 checkDictDataExists(id);
197 198 // 校验字典类型有效
198 199 checkDictTypeValid(dictType);
199 200 // 校验字典数据的值的唯一性
200   - checkDictDataValueUnique(id, dictType, label);
  201 + checkDictDataValueUnique(id, dictType, value);
201 202 }
202 203  
203   - private void checkDictDataValueUnique(Long id, String dictType, String label) {
204   - SysDictDataDO dictData = dictDataMapper.selectByDictTypeAndLabel(dictType, label);
  204 + @VisibleForTesting
  205 + public void checkDictDataValueUnique(Long id, String dictType, String value) {
  206 + SysDictDataDO dictData = dictDataMapper.selectByDictTypeAndValue(dictType, value);
205 207 if (dictData == null) {
206 208 return;
207 209 }
208 210 // 如果 id 为空,说明不用比较是否为相同 id 的字典数据
209 211 if (id == null) {
210   - throw ServiceExceptionUtil.exception(DICT_DATA_VALUE_DUPLICATE);
  212 + throw exception(DICT_DATA_VALUE_DUPLICATE);
211 213 }
212 214 if (!dictData.getId().equals(id)) {
213   - throw ServiceExceptionUtil.exception(DICT_DATA_VALUE_DUPLICATE);
  215 + throw exception(DICT_DATA_VALUE_DUPLICATE);
214 216 }
215 217 }
216 218  
217   - private void checkDictDataExists(Long id) {
  219 + @VisibleForTesting
  220 + public void checkDictDataExists(Long id) {
218 221 if (id == null) {
219 222 return;
220 223 }
221 224 SysDictDataDO dictData = dictDataMapper.selectById(id);
222 225 if (dictData == null) {
223   - throw ServiceExceptionUtil.exception(DICT_DATA_NOT_EXISTS);
  226 + throw exception(DICT_DATA_NOT_EXISTS);
224 227 }
225 228 }
226 229  
227   - private void checkDictTypeValid(String type) {
  230 + @VisibleForTesting
  231 + public void checkDictTypeValid(String type) {
228 232 SysDictTypeDO dictType = dictTypeService.getDictType(type);
229 233 if (dictType == null) {
230   - throw ServiceExceptionUtil.exception(DICT_TYPE_NOT_EXISTS);
  234 + throw exception(DICT_TYPE_NOT_EXISTS);
231 235 }
232 236 if (!CommonStatusEnum.ENABLE.getStatus().equals(dictType.getStatus())) {
233   - throw ServiceExceptionUtil.exception(DICT_TYPE_NOT_ENABLE);
  237 + throw exception(DICT_TYPE_NOT_ENABLE);
234 238 }
235 239 }
236 240  
... ...
src/main/java/cn/iocoder/dashboard/modules/system/service/dict/impl/SysDictTypeServiceImpl.java
... ... @@ -10,6 +10,7 @@ import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO;
10 10 import cn.iocoder.dashboard.modules.system.dal.mysql.dict.SysDictTypeMapper;
11 11 import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService;
12 12 import cn.iocoder.dashboard.modules.system.service.dict.SysDictTypeService;
  13 +import com.google.common.annotations.VisibleForTesting;
13 14 import org.springframework.stereotype.Service;
14 15  
15 16 import javax.annotation.Resource;
... ... @@ -97,8 +98,9 @@ public class SysDictTypeServiceImpl implements SysDictTypeService {
97 98 checkDictTypeUnique(id, type);
98 99 }
99 100  
100   - private void checkDictTypeNameUnique(Long id, String type) {
101   - SysDictTypeDO dictType = dictTypeMapper.selectByName(type);
  101 + @VisibleForTesting
  102 + public void checkDictTypeNameUnique(Long id, String name) {
  103 + SysDictTypeDO dictType = dictTypeMapper.selectByName(name);
102 104 if (dictType == null) {
103 105 return;
104 106 }
... ... @@ -111,7 +113,8 @@ public class SysDictTypeServiceImpl implements SysDictTypeService {
111 113 }
112 114 }
113 115  
114   - private void checkDictTypeUnique(Long id, String type) {
  116 + @VisibleForTesting
  117 + public void checkDictTypeUnique(Long id, String type) {
115 118 SysDictTypeDO dictType = dictTypeMapper.selectByType(type);
116 119 if (dictType == null) {
117 120 return;
... ... @@ -125,7 +128,8 @@ public class SysDictTypeServiceImpl implements SysDictTypeService {
125 128 }
126 129 }
127 130  
128   - private SysDictTypeDO checkDictTypeExists(Long id) {
  131 + @VisibleForTesting
  132 + public SysDictTypeDO checkDictTypeExists(Long id) {
129 133 if (id == null) {
130 134 return null;
131 135 }
... ...
src/main/java/cn/iocoder/dashboard/modules/system/service/notice/impl/SysNoticeServiceImpl.java
... ... @@ -9,6 +9,7 @@ import cn.iocoder.dashboard.modules.system.convert.notice.SysNoticeConvert;
9 9 import cn.iocoder.dashboard.modules.system.dal.mysql.notice.SysNoticeMapper;
10 10 import cn.iocoder.dashboard.modules.system.dal.dataobject.notice.SysNoticeDO;
11 11 import cn.iocoder.dashboard.modules.system.service.notice.SysNoticeService;
  12 +import com.google.common.annotations.VisibleForTesting;
12 13 import org.springframework.stereotype.Service;
13 14  
14 15 import javax.annotation.Resource;
... ... @@ -60,7 +61,8 @@ public class SysNoticeServiceImpl implements SysNoticeService {
60 61 noticeMapper.deleteById(id);
61 62 }
62 63  
63   - private void checkNoticeExists(Long id) {
  64 + @VisibleForTesting
  65 + public void checkNoticeExists(Long id) {
64 66 if (id == null) {
65 67 return;
66 68 }
... ...
src/main/java/cn/iocoder/dashboard/util/collection/ArrayUtils.java
... ... @@ -2,6 +2,8 @@ package cn.iocoder.dashboard.util.collection;
2 2  
3 3 import cn.hutool.core.util.ArrayUtil;
4 4  
  5 +import java.util.function.Consumer;
  6 +
5 7 /**
6 8 * Array 工具类
7 9 *
... ... @@ -18,11 +20,11 @@ public class ArrayUtils {
18 20 * @return 结果数组
19 21 */
20 22 @SafeVarargs
21   - public static <T> T[] append(T object, T... newElements) {
  23 + public static <T> Consumer<T>[] append(Consumer<T> object, Consumer<T>... newElements) {
22 24 if (object == null) {
23 25 return newElements;
24 26 }
25   - T[] result = ArrayUtil.newArray(object.getClass(), 1 + newElements.length);
  27 + Consumer<T>[] result = ArrayUtil.newArray(Consumer.class, 1 + newElements.length);
26 28 result[0] = object;
27 29 System.arraycopy(newElements, 0, result, 1, newElements.length);
28 30 return result;
... ...
src/main/java/cn/iocoder/dashboard/util/object/ObjectUtils.java
... ... @@ -19,4 +19,14 @@ public class ObjectUtils {
19 19 return result;
20 20 }
21 21  
  22 + public static <T extends Comparable<T>> T max(T obj1, T obj2) {
  23 + if (obj1 == null) {
  24 + return obj2;
  25 + }
  26 + if (obj2 == null) {
  27 + return obj1;
  28 + }
  29 + return obj1.compareTo(obj2) > 0 ? obj1 : obj2;
  30 + }
  31 +
22 32 }
... ...
src/test/java/cn/iocoder/dashboard/BaseDbAndRedisUnitTest.java 0 → 100644
  1 +package cn.iocoder.dashboard;
  2 +
  3 +import cn.iocoder.dashboard.config.RedisTestConfiguration;
  4 +import cn.iocoder.dashboard.framework.datasource.config.DataSourceConfiguration;
  5 +import cn.iocoder.dashboard.framework.mybatis.config.MybatisConfiguration;
  6 +import cn.iocoder.dashboard.framework.redis.config.RedisConfig;
  7 +import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
  8 +import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
  9 +import org.redisson.spring.starter.RedissonAutoConfiguration;
  10 +import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
  11 +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
  12 +import org.springframework.boot.test.context.SpringBootTest;
  13 +import org.springframework.context.annotation.Import;
  14 +import org.springframework.test.context.ActiveProfiles;
  15 +import org.springframework.test.context.jdbc.Sql;
  16 +
  17 +/**
  18 + * 依赖内存 DB 的单元测试
  19 + *
  20 + * 注意,Service 层同样适用。对于 Service 层的单元测试,我们针对自己模块的 Mapper 走的是 H2 内存数据库,针对别的模块的 Service 走的是 Mock 方法
  21 + *
  22 + * @author 芋道源码
  23 + */
  24 +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbAndRedisUnitTest.Application.class)
  25 +@ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件
  26 +@Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB
  27 +public class BaseDbAndRedisUnitTest {
  28 +
  29 + @Import({
  30 + // DB 配置类
  31 + DataSourceConfiguration.class, // 自己的 DB 配置类
  32 + DataSourceAutoConfiguration.class, // Spring DB 自动配置类
  33 + DruidDataSourceAutoConfigure.class, // Druid 自动配置类
  34 + // MyBatis 配置类
  35 + MybatisConfiguration.class, // 自己的 MyBatis 配置类
  36 + MybatisPlusAutoConfiguration.class, // MyBatis 的自动配置类
  37 + // Redis 配置类
  38 + RedisTestConfiguration.class, // Redis 测试配置类,用于启动 RedisServer
  39 + RedisAutoConfiguration.class, // Spring Redis 自动配置类
  40 + RedisConfig.class, // 自己的 Redis 配置类
  41 + RedissonAutoConfiguration.class, // Redisson 自动高配置类
  42 + })
  43 + public static class Application {
  44 + }
  45 +
  46 +}
... ...
src/test/java/cn/iocoder/dashboard/BaseDbUnitTest.java 0 → 100644
  1 +package cn.iocoder.dashboard;
  2 +
  3 +import cn.iocoder.dashboard.framework.datasource.config.DataSourceConfiguration;
  4 +import cn.iocoder.dashboard.framework.mybatis.config.MybatisConfiguration;
  5 +import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
  6 +import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
  7 +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
  8 +import org.springframework.boot.test.context.SpringBootTest;
  9 +import org.springframework.context.annotation.Import;
  10 +import org.springframework.test.context.ActiveProfiles;
  11 +import org.springframework.test.context.jdbc.Sql;
  12 +
  13 +/**
  14 + * 依赖内存 DB 的单元测试
  15 + *
  16 + * 注意,Service 层同样适用。对于 Service 层的单元测试,我们针对自己模块的 Mapper 走的是 H2 内存数据库,针对别的模块的 Service 走的是 Mock 方法
  17 + *
  18 + * @author 芋道源码
  19 + */
  20 +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE, classes = BaseDbUnitTest.Application.class)
  21 +@ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件
  22 +@Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB
  23 +public class BaseDbUnitTest {
  24 +
  25 + @Import({
  26 + // DB 配置类
  27 + DataSourceConfiguration.class, // 自己的 DB 配置类
  28 + DataSourceAutoConfiguration.class, // Spring DB 自动配置类
  29 + DruidDataSourceAutoConfigure.class, // Druid 自动配置类
  30 + // MyBatis 配置类
  31 + MybatisConfiguration.class, // 自己的 MyBatis 配置类
  32 + MybatisPlusAutoConfiguration.class, // MyBatis 的自动配置类
  33 + })
  34 + public static class Application {
  35 + }
  36 +
  37 +}
... ...
src/test/java/cn/iocoder/dashboard/BaseSpringBootUnitTest.java
... ... @@ -12,6 +12,7 @@ import javax.annotation.Resource;
12 12 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
13 13 @ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件
14 14 @Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB
  15 +@Deprecated
15 16 public class BaseSpringBootUnitTest {
16 17  
17 18 @Resource
... ...
src/test/java/cn/iocoder/dashboard/config/RedisTestConfiguration.java
... ... @@ -8,12 +8,10 @@ import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
8 8 import org.springframework.boot.context.properties.EnableConfigurationProperties;
9 9 import org.springframework.context.annotation.Bean;
10 10 import org.springframework.context.annotation.Configuration;
11   -import org.springframework.context.annotation.Lazy;
12 11  
13 12 import java.io.IOException;
14 13  
15 14 @Configuration(proxyBeanMethods = false)
16   -@Lazy(false) // 禁用懒加载,因为需要保证 Redis Server 必须先启动
17 15 @EnableConfigurationProperties(RedisProperties.class)
18 16 @AutoConfigureBefore({RedisAutoConfiguration.class, RedissonAutoConfiguration.class}) // 在 Redis 自动配置前,进行初始化
19 17 public class RedisTestConfiguration {
... ...
src/test/java/cn/iocoder/dashboard/config/SecurityTestConfiguration.java deleted
1   -package cn.iocoder.dashboard.config;
2   -
3   -import org.mockito.Mockito;
4   -import org.springframework.context.annotation.Bean;
5   -import org.springframework.context.annotation.Configuration;
6   -import org.springframework.security.authentication.AuthenticationManager;
7   -
8   -@Configuration
9   -public class SecurityTestConfiguration {
10   -
11   - @Bean
12   - public AuthenticationManager authenticationManager() {
13   - return Mockito.mock(AuthenticationManager.class);
14   - }
15   -
16   -}
src/test/java/cn/iocoder/dashboard/modules/infra/service/config/InfConfigServiceTest.java
1 1 package cn.iocoder.dashboard.modules.infra.service.config;
2 2  
3   -import cn.iocoder.dashboard.BaseSpringBootUnitTest;
  3 +import cn.iocoder.dashboard.BaseDbUnitTest;
4 4 import cn.iocoder.dashboard.common.pojo.PageResult;
5 5 import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigCreateReqVO;
6 6 import cn.iocoder.dashboard.modules.infra.controller.config.vo.InfConfigExportReqVO;
... ... @@ -15,6 +15,7 @@ import cn.iocoder.dashboard.util.collection.ArrayUtils;
15 15 import cn.iocoder.dashboard.util.object.ObjectUtils;
16 16 import org.junit.jupiter.api.Test;
17 17 import org.springframework.boot.test.mock.mockito.MockBean;
  18 +import org.springframework.context.annotation.Import;
18 19  
19 20 import javax.annotation.Resource;
20 21 import java.util.List;
... ... @@ -24,8 +25,7 @@ import static cn.hutool.core.util.RandomUtil.randomEle;
24 25 import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.*;
25 26 import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals;
26 27 import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException;
27   -import static cn.iocoder.dashboard.util.RandomUtils.randomLongId;
28   -import static cn.iocoder.dashboard.util.RandomUtils.randomPojo;
  28 +import static cn.iocoder.dashboard.util.RandomUtils.*;
29 29 import static cn.iocoder.dashboard.util.date.DateUtils.buildTime;
30 30 import static org.junit.jupiter.api.Assertions.*;
31 31 import static org.mockito.Mockito.times;
... ... @@ -36,7 +36,8 @@ import static org.mockito.Mockito.verify;
36 36 *
37 37 * @author 芋道源码
38 38 */
39   -public class InfConfigServiceTest extends BaseSpringBootUnitTest {
  39 +@Import(InfConfigServiceImpl.class)
  40 +public class InfConfigServiceTest extends BaseDbUnitTest {
40 41  
41 42 @Resource
42 43 private InfConfigServiceImpl configService;
... ... @@ -47,6 +48,120 @@ public class InfConfigServiceTest extends BaseSpringBootUnitTest {
47 48 private InfConfigProducer configProducer;
48 49  
49 50 @Test
  51 + public void testCreateConfig_success() {
  52 + // 准备参数
  53 + InfConfigCreateReqVO reqVO = randomPojo(InfConfigCreateReqVO.class);
  54 +
  55 + // 调用
  56 + Long configId = configService.createConfig(reqVO);
  57 + // 断言
  58 + assertNotNull(configId);
  59 + // 校验记录的属性是否正确
  60 + InfConfigDO config = configMapper.selectById(configId);
  61 + assertPojoEquals(reqVO, config);
  62 + assertEquals(InfConfigTypeEnum.CUSTOM.getType(), config.getType());
  63 + // 校验调用
  64 + verify(configProducer, times(1)).sendConfigRefreshMessage();
  65 + }
  66 +
  67 + @Test
  68 + public void testUpdateConfig_success() {
  69 + // mock 数据
  70 + InfConfigDO dbConfig = randomInfConfigDO();
  71 + configMapper.insert(dbConfig);// @Sql: 先插入出一条存在的数据
  72 + // 准备参数
  73 + InfConfigUpdateReqVO reqVO = randomPojo(InfConfigUpdateReqVO.class, o -> {
  74 + o.setId(dbConfig.getId()); // 设置更新的 ID
  75 + });
  76 +
  77 + // 调用
  78 + configService.updateConfig(reqVO);
  79 + // 校验是否更新正确
  80 + InfConfigDO config = configMapper.selectById(reqVO.getId()); // 获取最新的
  81 + assertPojoEquals(reqVO, config);
  82 + // 校验调用
  83 + verify(configProducer, times(1)).sendConfigRefreshMessage();
  84 + }
  85 +
  86 + @Test
  87 + public void testDeleteConfig_success() {
  88 + // mock 数据
  89 + InfConfigDO dbConfig = randomInfConfigDO(o -> {
  90 + o.setType(InfConfigTypeEnum.CUSTOM.getType()); // 只能删除 CUSTOM 类型
  91 + });
  92 + configMapper.insert(dbConfig);// @Sql: 先插入出一条存在的数据
  93 + // 准备参数
  94 + Long id = dbConfig.getId();
  95 +
  96 + // 调用
  97 + configService.deleteConfig(id);
  98 + // 校验数据不存在了
  99 + assertNull(configMapper.selectById(id));
  100 + // 校验调用
  101 + verify(configProducer, times(1)).sendConfigRefreshMessage();
  102 + }
  103 +
  104 + @Test
  105 + public void testDeleteConfig_canNotDeleteSystemType() {
  106 + // mock 数据
  107 + InfConfigDO dbConfig = randomInfConfigDO(o -> {
  108 + o.setType(InfConfigTypeEnum.SYSTEM.getType()); // SYSTEM 不允许删除
  109 + });
  110 + configMapper.insert(dbConfig);// @Sql: 先插入出一条存在的数据
  111 + // 准备参数
  112 + Long id = dbConfig.getId();
  113 +
  114 + // 调用, 并断言异常
  115 + assertServiceException(() -> configService.deleteConfig(id), CONFIG_CAN_NOT_DELETE_SYSTEM_TYPE);
  116 + }
  117 +
  118 + @Test
  119 + public void testCheckConfigExists_success() {
  120 + // mock 数据
  121 + InfConfigDO dbConfigDO = randomInfConfigDO();
  122 + configMapper.insert(dbConfigDO);// @Sql: 先插入出一条存在的数据
  123 +
  124 + // 调用成功
  125 + configService.checkConfigExists(dbConfigDO.getId());
  126 + }
  127 +
  128 + @Test
  129 + public void testCheckConfigExist_notExists() {
  130 + assertServiceException(() -> configService.checkConfigExists(randomLongId()), CONFIG_NOT_EXISTS);
  131 + }
  132 +
  133 + @Test
  134 + public void testCheckConfigKeyUnique_success() {
  135 + // 调用,成功
  136 + configService.checkConfigKeyUnique(randomLongId(), randomString());
  137 + }
  138 +
  139 + @Test
  140 + public void testCheckConfigKeyUnique_keyDuplicateForCreate() {
  141 + // 准备参数
  142 + String key = randomString();
  143 + // mock 数据
  144 + configMapper.insert(randomInfConfigDO(o -> o.setKey(key)));
  145 +
  146 + // 调用,校验异常
  147 + assertServiceException(() -> configService.checkConfigKeyUnique(null, key),
  148 + CONFIG_KEY_DUPLICATE);
  149 + }
  150 +
  151 + @Test
  152 + public void testCheckConfigKeyUnique_keyDuplicateForUpdate() {
  153 + // 准备参数
  154 + Long id = randomLongId();
  155 + String key = randomString();
  156 + // mock 数据
  157 + configMapper.insert(randomInfConfigDO(o -> o.setKey(key)));
  158 +
  159 + // 调用,校验异常
  160 + assertServiceException(() -> configService.checkConfigKeyUnique(id, key),
  161 + CONFIG_KEY_DUPLICATE);
  162 + }
  163 +
  164 + @Test
50 165 public void testGetConfigPage() {
51 166 // mock 数据
52 167 InfConfigDO dbConfig = randomInfConfigDO(o -> { // 等会查询到
... ... @@ -128,105 +243,6 @@ public class InfConfigServiceTest extends BaseSpringBootUnitTest {
128 243 assertPojoEquals(dbConfig, config);
129 244 }
130 245  
131   - @Test
132   - public void testCreateConfig_success() {
133   - // 准备参数
134   - InfConfigCreateReqVO reqVO = randomPojo(InfConfigCreateReqVO.class);
135   -
136   - // 调用
137   - Long configId = configService.createConfig(reqVO);
138   - // 断言
139   - assertNotNull(configId);
140   - // 校验记录的属性是否正确
141   - InfConfigDO config = configMapper.selectById(configId);
142   - assertPojoEquals(reqVO, config);
143   - assertEquals(InfConfigTypeEnum.CUSTOM.getType(), config.getType());
144   - // 校验调用
145   - verify(configProducer, times(1)).sendConfigRefreshMessage();
146   - }
147   -
148   - @Test
149   - public void testCreateConfig_keyDuplicate() {
150   - // 准备参数
151   - InfConfigCreateReqVO reqVO = randomPojo(InfConfigCreateReqVO.class);
152   - // mock 数据
153   - configMapper.insert(randomInfConfigDO(o -> { // @Sql
154   - o.setKey(reqVO.getKey()); // 模拟 key 重复
155   - }));
156   -
157   - // 调用, 并断言异常
158   - assertServiceException(() -> configService.createConfig(reqVO), CONFIG_KEY_DUPLICATE);
159   - }
160   -
161   - @Test
162   - public void testUpdateConfig_success() {
163   - // mock 数据
164   - InfConfigDO dbConfig = randomInfConfigDO();
165   - configMapper.insert(dbConfig);// @Sql: 先插入出一条存在的数据
166   - // 准备参数
167   - InfConfigUpdateReqVO reqVO = randomPojo(InfConfigUpdateReqVO.class, o -> {
168   - o.setId(dbConfig.getId()); // 设置更新的 ID
169   - });
170   -
171   - // 调用
172   - configService.updateConfig(reqVO);
173   - // 校验是否更新正确
174   - InfConfigDO config = configMapper.selectById(reqVO.getId()); // 获取最新的
175   - assertPojoEquals(reqVO, config);
176   - // 校验调用
177   - verify(configProducer, times(1)).sendConfigRefreshMessage();
178   - }
179   -
180   - @Test
181   - public void testUpdateConfig_notExists() {
182   - // 准备参数
183   - InfConfigUpdateReqVO reqVO = randomPojo(InfConfigUpdateReqVO.class);
184   -
185   - // 调用, 并断言异常
186   - assertServiceException(() -> configService.updateConfig(reqVO), CONFIG_NOT_EXISTS);
187   - }
188   -
189   - @Test
190   - public void testDeleteConfig_success() {
191   - // mock 数据
192   - InfConfigDO dbConfig = randomInfConfigDO(o -> {
193   - o.setType(InfConfigTypeEnum.CUSTOM.getType()); // 只能删除 CUSTOM 类型
194   - });
195   - configMapper.insert(dbConfig);// @Sql: 先插入出一条存在的数据
196   - // 准备参数
197   - Long id = dbConfig.getId();
198   -
199   - // 调用
200   - configService.deleteConfig(id);
201   - // 校验数据不存在了
202   - assertNull(configMapper.selectById(id));
203   - // 校验调用
204   - verify(configProducer, times(1)).sendConfigRefreshMessage();
205   - }
206   -
207   - @Test
208   - public void testDeleteConfig_canNotDeleteSystemType() {
209   - // mock 数据
210   - InfConfigDO dbConfig = randomInfConfigDO(o -> {
211   - o.setType(InfConfigTypeEnum.SYSTEM.getType()); // SYSTEM 不允许删除
212   - });
213   - configMapper.insert(dbConfig);// @Sql: 先插入出一条存在的数据
214   - // 准备参数
215   - Long id = dbConfig.getId();
216   -
217   - // 调用, 并断言异常
218   - assertServiceException(() -> configService.deleteConfig(id), CONFIG_CAN_NOT_DELETE_SYSTEM_TYPE);
219   - }
220   -
221   - @Test
222   - public void testDeleteConfig_notExists() {
223   - // 准备参数
224   - Long id = randomLongId();
225   -
226   - // 调用, 并断言异常
227   - assertServiceException(() -> configService.deleteConfig(id), CONFIG_NOT_EXISTS);
228   - }
229   -
230 246 // ========== 随机对象 ==========
231 247  
232 248 @SafeVarargs
... ...
src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysAuthServiceImplTest.java
1 1 package cn.iocoder.dashboard.modules.system.service.auth;
2 2  
3   -import cn.iocoder.dashboard.BaseSpringBootUnitTest;
  3 +import cn.iocoder.dashboard.BaseDbUnitTest;
4 4 import cn.iocoder.dashboard.common.enums.CommonStatusEnum;
5 5 import cn.iocoder.dashboard.framework.security.core.LoginUser;
6 6 import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO;
7 7 import cn.iocoder.dashboard.modules.system.service.auth.impl.SysAuthServiceImpl;
  8 +import cn.iocoder.dashboard.modules.system.service.common.SysCaptchaService;
  9 +import cn.iocoder.dashboard.modules.system.service.logger.SysLoginLogService;
8 10 import cn.iocoder.dashboard.modules.system.service.permission.SysPermissionService;
9 11 import cn.iocoder.dashboard.modules.system.service.user.SysUserService;
10 12 import cn.iocoder.dashboard.util.AssertUtils;
11 13 import org.junit.jupiter.api.Test;
12 14 import org.springframework.boot.test.mock.mockito.MockBean;
  15 +import org.springframework.context.annotation.Import;
  16 +import org.springframework.security.authentication.AuthenticationManager;
13 17 import org.springframework.security.core.userdetails.UsernameNotFoundException;
14 18  
15 19 import javax.annotation.Resource;
... ... @@ -21,7 +25,13 @@ import static org.junit.jupiter.api.Assertions.*;
21 25 import static org.mockito.ArgumentMatchers.eq;
22 26 import static org.mockito.Mockito.when;
23 27  
24   -public class SysAuthServiceImplTest extends BaseSpringBootUnitTest {
  28 +/**
  29 + * {@link SysAuthServiceImpl} 的单元测试
  30 + *
  31 + * @author 芋道源码
  32 + */
  33 +@Import(SysAuthServiceImpl.class)
  34 +public class SysAuthServiceImplTest extends BaseDbUnitTest {
25 35  
26 36 @Resource
27 37 private SysAuthServiceImpl authService;
... ... @@ -30,6 +40,14 @@ public class SysAuthServiceImplTest extends BaseSpringBootUnitTest {
30 40 private SysUserService userService;
31 41 @MockBean
32 42 private SysPermissionService permissionService;
  43 + @MockBean
  44 + private AuthenticationManager authenticationManager;
  45 + @MockBean
  46 + private SysCaptchaService captchaService;
  47 + @MockBean
  48 + private SysLoginLogService loginLogService;
  49 + @MockBean
  50 + private SysUserSessionService userSessionService;
33 51  
34 52 @Test
35 53 public void testLoadUserByUsername_success() {
... ...
src/test/java/cn/iocoder/dashboard/modules/system/service/auth/SysUserSessionServiceImplTest.java 0 → 100644
  1 +package cn.iocoder.dashboard.modules.system.service.auth;
  2 +
  3 +import cn.hutool.core.date.DateUtil;
  4 +import cn.iocoder.dashboard.BaseDbAndRedisUnitTest;
  5 +import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX;
  6 +import cn.iocoder.dashboard.framework.security.config.SecurityProperties;
  7 +import cn.iocoder.dashboard.modules.system.dal.dataobject.auth.SysUserSessionDO;
  8 +import cn.iocoder.dashboard.modules.system.dal.mysql.auth.SysUserSessionMapper;
  9 +import cn.iocoder.dashboard.modules.system.dal.redis.auth.SysLoginUserRedisDAO;
  10 +import cn.iocoder.dashboard.modules.system.service.auth.impl.SysUserSessionServiceImpl;
  11 +import cn.iocoder.dashboard.modules.system.service.dept.impl.SysDeptServiceImpl;
  12 +import cn.iocoder.dashboard.modules.system.service.logger.impl.SysLoginLogServiceImpl;
  13 +import cn.iocoder.dashboard.modules.system.service.user.SysUserServiceImpl;
  14 +import cn.iocoder.dashboard.util.AssertUtils;
  15 +import cn.iocoder.dashboard.util.RandomUtils;
  16 +import org.junit.jupiter.api.Test;
  17 +import org.springframework.boot.test.mock.mockito.MockBean;
  18 +import org.springframework.context.annotation.Import;
  19 +
  20 +import javax.annotation.Resource;
  21 +import java.util.Date;
  22 +import java.util.List;
  23 +import java.util.stream.Collectors;
  24 +import java.util.stream.Stream;
  25 +
  26 +import static org.junit.jupiter.api.Assertions.assertEquals;
  27 +
  28 +/**
  29 + * SysUserSessionServiceImpl Tester.
  30 + *
  31 + * @author Lyon
  32 + * @version 1.0
  33 + * @since <pre>3月 8, 2021</pre>
  34 + */
  35 +@Import(
  36 + SysUserSessionServiceImpl.class)
  37 +public class SysUserSessionServiceImplTest extends BaseDbAndRedisUnitTest {
  38 +
  39 + @Resource
  40 + SysUserSessionServiceImpl sysUserSessionService;
  41 + @Resource
  42 + SysUserSessionMapper sysUserSessionMapper;
  43 + @MockBean
  44 + SecurityProperties securityProperties;
  45 + @MockBean
  46 + SysDeptServiceImpl sysDeptService;
  47 + @MockBean
  48 + SysUserServiceImpl sysUserService;
  49 + @MockBean
  50 + SysLoginLogServiceImpl sysLoginLogService;
  51 + @MockBean
  52 + SysLoginUserRedisDAO sysLoginUserRedisDAO;
  53 +
  54 + @Test
  55 + public void testClearSessionTimeout_success() throws Exception {
  56 + // 准备超时数据 120 条, 在线用户 1 条
  57 + int expectedTimeoutCount = 120, expectedTotal = 1;
  58 +
  59 + // 准备数据
  60 + List<SysUserSessionDO> prepareData = Stream
  61 + .iterate(0, i -> i)
  62 + .limit(expectedTimeoutCount)
  63 + .map(i -> RandomUtils.randomPojo(SysUserSessionDO.class, o -> o.setSessionTimeout(DateUtil.offsetSecond(new Date(), -1))))
  64 + .collect(Collectors.toList());
  65 + SysUserSessionDO sessionDO = RandomUtils.randomPojo(SysUserSessionDO.class, o -> o.setSessionTimeout(DateUtil.offsetMinute(new Date(), 30)));
  66 + prepareData.add(sessionDO);
  67 + prepareData.forEach(sysUserSessionMapper::insert);
  68 +
  69 + //清空超时数据
  70 + long actualTimeoutCount = sysUserSessionService.clearSessionTimeout();
  71 + //校验
  72 + assertEquals(expectedTimeoutCount, actualTimeoutCount);
  73 + List<SysUserSessionDO> userSessionDOS = sysUserSessionMapper.selectList();
  74 + assertEquals(expectedTotal, userSessionDOS.size());
  75 + AssertUtils.assertPojoEquals(sessionDO, userSessionDOS.get(0), "updateTime");
  76 + }
  77 +
  78 +}
... ...
src/test/java/cn/iocoder/dashboard/modules/system/service/dept/SysDeptServiceTest.java 0 → 100644
  1 +package cn.iocoder.dashboard.modules.system.service.dept;
  2 +
  3 +import cn.iocoder.dashboard.BaseDbUnitTest;
  4 +import cn.iocoder.dashboard.common.enums.CommonStatusEnum;
  5 +import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptCreateReqVO;
  6 +import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptListReqVO;
  7 +import cn.iocoder.dashboard.modules.system.controller.dept.vo.dept.SysDeptUpdateReqVO;
  8 +import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO;
  9 +import cn.iocoder.dashboard.modules.system.dal.mysql.dept.SysDeptMapper;
  10 +import cn.iocoder.dashboard.modules.system.enums.dept.DeptIdEnum;
  11 +import cn.iocoder.dashboard.modules.system.mq.producer.dept.SysDeptProducer;
  12 +import cn.iocoder.dashboard.modules.system.service.dept.impl.SysDeptServiceImpl;
  13 +import cn.iocoder.dashboard.util.collection.ArrayUtils;
  14 +import cn.iocoder.dashboard.util.object.ObjectUtils;
  15 +import com.google.common.collect.Multimap;
  16 +import org.junit.jupiter.api.Test;
  17 +import org.springframework.boot.test.mock.mockito.MockBean;
  18 +import org.springframework.context.annotation.Import;
  19 +
  20 +import javax.annotation.Resource;
  21 +import java.util.Date;
  22 +import java.util.List;
  23 +import java.util.Map;
  24 +import java.util.function.Consumer;
  25 +
  26 +import static cn.hutool.core.bean.BeanUtil.getFieldValue;
  27 +import static cn.hutool.core.util.RandomUtil.randomEle;
  28 +import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*;
  29 +import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals;
  30 +import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException;
  31 +import static cn.iocoder.dashboard.util.RandomUtils.*;
  32 +import static org.junit.jupiter.api.Assertions.*;
  33 +import static org.mockito.Mockito.times;
  34 +import static org.mockito.Mockito.verify;
  35 +
  36 +/**
  37 + * {@link SysDeptServiceImpl} 的单元测试类
  38 + *
  39 + * @author niudehua
  40 + */
  41 +@Import(SysDeptServiceImpl.class)
  42 +class SysDeptServiceTest extends BaseDbUnitTest {
  43 +
  44 + @Resource
  45 + private SysDeptServiceImpl deptService;
  46 + @Resource
  47 + private SysDeptMapper deptMapper;
  48 + @MockBean
  49 + private SysDeptProducer deptProducer;
  50 +
  51 + @Test
  52 + @SuppressWarnings("unchecked")
  53 + void testInitLocalCache() {
  54 + // mock 数据
  55 + SysDeptDO deptDO1 = randomDeptDO();
  56 + deptMapper.insert(deptDO1);
  57 + SysDeptDO deptDO2 = randomDeptDO();
  58 + deptMapper.insert(deptDO2);
  59 +
  60 + // 调用
  61 + deptService.initLocalCache();
  62 + // 断言 deptCache 缓存
  63 + Map<Long, SysDeptDO> deptCache = (Map<Long, SysDeptDO>) getFieldValue(deptService, "deptCache");
  64 + assertEquals(2, deptCache.size());
  65 + assertPojoEquals(deptDO1, deptCache.get(deptDO1.getId()));
  66 + assertPojoEquals(deptDO2, deptCache.get(deptDO2.getId()));
  67 + // 断言 parentDeptCache 缓存
  68 + Multimap<Long, SysDeptDO> parentDeptCache = (Multimap<Long, SysDeptDO>) getFieldValue(deptService, "parentDeptCache");
  69 + assertEquals(2, parentDeptCache.size());
  70 + assertPojoEquals(deptDO1, parentDeptCache.get(deptDO1.getParentId()));
  71 + assertPojoEquals(deptDO2, parentDeptCache.get(deptDO2.getParentId()));
  72 + // 断言 maxUpdateTime 缓存
  73 + Date maxUpdateTime = (Date) getFieldValue(deptService, "maxUpdateTime");
  74 + assertEquals(ObjectUtils.max(deptDO1.getUpdateTime(), deptDO2.getUpdateTime()), maxUpdateTime);
  75 +
  76 + }
  77 +
  78 + @Test
  79 + void testListDepts() {
  80 + // mock 数据
  81 + SysDeptDO dept = randomPojo(SysDeptDO.class, o -> { // 等会查询到
  82 + o.setName("开发部");
  83 + o.setStatus(CommonStatusEnum.ENABLE.getStatus());
  84 + });
  85 + deptMapper.insert(dept);
  86 + // 测试 name 不匹配
  87 + deptMapper.insert(ObjectUtils.clone(dept, o -> o.setName("发")));
  88 + // 测试 status 不匹配
  89 + deptMapper.insert(ObjectUtils.clone(dept, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));
  90 + // 准备参数
  91 + SysDeptListReqVO reqVO = new SysDeptListReqVO();
  92 + reqVO.setName("开");
  93 + reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
  94 + // 调用
  95 + List<SysDeptDO> sysDeptDOS = deptService.listDepts(reqVO);
  96 + // 断言
  97 + assertEquals(1, sysDeptDOS.size());
  98 + assertPojoEquals(dept, sysDeptDOS.get(0));
  99 + }
  100 +
  101 + @Test
  102 + void testCreateDept_success() {
  103 + // 准备参数
  104 + SysDeptCreateReqVO reqVO = randomPojo(SysDeptCreateReqVO.class,
  105 + o -> {
  106 + o.setParentId(DeptIdEnum.ROOT.getId());
  107 + o.setStatus(randomCommonStatus());
  108 + });
  109 + // 调用
  110 + Long deptId = deptService.createDept(reqVO);
  111 + // 断言
  112 + assertNotNull(deptId);
  113 + // 校验记录的属性是否正确
  114 + SysDeptDO deptDO = deptMapper.selectById(deptId);
  115 + assertPojoEquals(reqVO, deptDO);
  116 + // 校验调用
  117 + verify(deptProducer, times(1)).sendDeptRefreshMessage();
  118 + }
  119 +
  120 + @Test
  121 + void testUpdateDept_success() {
  122 + // mock 数据
  123 + SysDeptDO dbDeptDO = randomPojo(SysDeptDO.class, o -> o.setStatus(randomCommonStatus()));
  124 + deptMapper.insert(dbDeptDO);// @Sql: 先插入出一条存在的数据
  125 + // 准备参数
  126 + SysDeptUpdateReqVO reqVO = randomPojo(SysDeptUpdateReqVO.class, o -> {
  127 + // 设置更新的 ID
  128 + o.setParentId(DeptIdEnum.ROOT.getId());
  129 + o.setId(dbDeptDO.getId());
  130 + o.setStatus(randomCommonStatus());
  131 + });
  132 + // 调用
  133 + deptService.updateDept(reqVO);
  134 + // 校验是否更新正确
  135 + SysDeptDO deptDO = deptMapper.selectById(reqVO.getId()); // 获取最新的
  136 + assertPojoEquals(reqVO, deptDO);
  137 + }
  138 +
  139 + @Test
  140 + void testDeleteDept_success() {
  141 + // mock 数据
  142 + SysDeptDO dbDeptDO = randomPojo(SysDeptDO.class, o -> o.setStatus(randomCommonStatus()));
  143 + deptMapper.insert(dbDeptDO);// @Sql: 先插入出一条存在的数据
  144 + // 准备参数
  145 + Long id = dbDeptDO.getId();
  146 + // 调用
  147 + deptService.deleteDept(id);
  148 + // 校验数据不存在了
  149 + assertNull(deptMapper.selectById(id));
  150 + }
  151 +
  152 + @Test
  153 + void testCheckDept_nameDuplicateForUpdate() {
  154 + // mock 数据
  155 + SysDeptDO deptDO = randomDeptDO();
  156 + // 设置根节点部门
  157 + deptDO.setParentId(DeptIdEnum.ROOT.getId());
  158 + deptMapper.insert(deptDO);
  159 + // mock 数据 稍后模拟重复它的 name
  160 + SysDeptDO nameDeptDO = randomDeptDO();
  161 + // 设置根节点部门
  162 + nameDeptDO.setParentId(DeptIdEnum.ROOT.getId());
  163 + deptMapper.insert(nameDeptDO);
  164 + // 准备参数
  165 + SysDeptUpdateReqVO reqVO = randomPojo(SysDeptUpdateReqVO.class,
  166 + o -> {
  167 + // 设置根节点部门
  168 + o.setParentId(DeptIdEnum.ROOT.getId());
  169 + // 设置更新的 ID
  170 + o.setId(deptDO.getId());
  171 + // 模拟 name 重复
  172 + o.setName(nameDeptDO.getName());
  173 + });
  174 + // 调用, 并断言异常
  175 + assertServiceException(() -> deptService.updateDept(reqVO), DEPT_NAME_DUPLICATE);
  176 +
  177 + }
  178 +
  179 + @Test
  180 + void testCheckDept_parentNotExitsForCreate() {
  181 + SysDeptCreateReqVO reqVO = randomPojo(SysDeptCreateReqVO.class,
  182 + o -> o.setStatus(randomCommonStatus()));
  183 + // 调用,并断言异常
  184 + assertServiceException(() -> deptService.createDept(reqVO), DEPT_PARENT_NOT_EXITS);
  185 + }
  186 +
  187 + @Test
  188 + void testCheckDept_notFoundForDelete() {
  189 + // 准备参数
  190 + Long id = randomLongId();
  191 + // 调用, 并断言异常
  192 + assertServiceException(() -> deptService.deleteDept(id), DEPT_NOT_FOUND);
  193 + }
  194 +
  195 + @Test
  196 + void testCheckDept_exitsChildrenForDelete() {
  197 + // mock 数据
  198 + SysDeptDO parentDept = randomPojo(SysDeptDO.class, o -> o.setStatus(randomCommonStatus()));
  199 + deptMapper.insert(parentDept);// @Sql: 先插入出一条存在的数据
  200 + // 准备参数
  201 + SysDeptDO childrenDeptDO = randomPojo(SysDeptDO.class, o -> {
  202 + o.setParentId(parentDept.getId());
  203 + o.setStatus(randomCommonStatus());
  204 + });
  205 + // 插入子部门
  206 + deptMapper.insert(childrenDeptDO);
  207 + // 调用, 并断言异常
  208 + assertServiceException(() -> deptService.deleteDept(parentDept.getId()), DEPT_EXITS_CHILDREN);
  209 + }
  210 +
  211 + @Test
  212 + void testCheckDept_parentErrorForUpdate() {
  213 + // mock 数据
  214 + SysDeptDO dbDeptDO = randomPojo(SysDeptDO.class, o -> o.setStatus(randomCommonStatus()));
  215 + deptMapper.insert(dbDeptDO);
  216 + // 准备参数
  217 + SysDeptUpdateReqVO reqVO = randomPojo(SysDeptUpdateReqVO.class,
  218 + o -> {
  219 + // 设置自己为父部门
  220 + o.setParentId(dbDeptDO.getId());
  221 + // 设置更新的 ID
  222 + o.setId(dbDeptDO.getId());
  223 + });
  224 + // 调用, 并断言异常
  225 + assertServiceException(() -> deptService.updateDept(reqVO), DEPT_PARENT_ERROR);
  226 + }
  227 +
  228 + @Test
  229 + void testCheckDept_notEnableForCreate() {
  230 + // mock 数据
  231 + SysDeptDO deptDO = randomPojo(SysDeptDO.class, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()));
  232 + deptMapper.insert(deptDO);
  233 + // 准备参数
  234 + SysDeptCreateReqVO reqVO = randomPojo(SysDeptCreateReqVO.class,
  235 + o -> {
  236 + // 设置未启用的部门为副部门
  237 + o.setParentId(deptDO.getId());
  238 + });
  239 + // 调用, 并断言异常
  240 + assertServiceException(() -> deptService.createDept(reqVO), DEPT_NOT_ENABLE);
  241 + }
  242 +
  243 + @Test
  244 + void testCheckDept_parentIsChildForUpdate() {
  245 + // mock 数据
  246 + SysDeptDO parentDept = randomPojo(SysDeptDO.class, o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus()));
  247 + deptMapper.insert(parentDept);
  248 + SysDeptDO childDept = randomPojo(SysDeptDO.class, o -> {
  249 + o.setStatus(CommonStatusEnum.ENABLE.getStatus());
  250 + o.setParentId(parentDept.getId());
  251 + });
  252 + deptMapper.insert(childDept);
  253 + // 初始化本地缓存
  254 + deptService.initLocalCache();
  255 + // 准备参数
  256 + SysDeptUpdateReqVO reqVO = randomPojo(SysDeptUpdateReqVO.class,
  257 + o -> {
  258 + // 设置自己的子部门为父部门
  259 + o.setParentId(childDept.getId());
  260 + // 设置更新的 ID
  261 + o.setId(parentDept.getId());
  262 + });
  263 + // 调用, 并断言异常
  264 + assertServiceException(() -> deptService.updateDept(reqVO), DEPT_PARENT_IS_CHILD);
  265 + }
  266 +
  267 + @SafeVarargs
  268 + private static SysDeptDO randomDeptDO(Consumer<SysDeptDO>... consumers) {
  269 + Consumer<SysDeptDO> consumer = (o) -> {
  270 + o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()); // 保证 status 的范围
  271 + };
  272 + return randomPojo(SysDeptDO.class, ArrayUtils.append(consumer, consumers));
  273 + }
  274 +}
... ...
src/test/java/cn/iocoder/dashboard/modules/system/service/dept/SysPostServiceTest.java 0 → 100644
  1 +package cn.iocoder.dashboard.modules.system.service.dept;
  2 +
  3 +import cn.iocoder.dashboard.BaseDbUnitTest;
  4 +import cn.iocoder.dashboard.common.enums.CommonStatusEnum;
  5 +import cn.iocoder.dashboard.common.pojo.PageResult;
  6 +import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.SysPostCreateReqVO;
  7 +import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.SysPostExportReqVO;
  8 +import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.SysPostPageReqVO;
  9 +import cn.iocoder.dashboard.modules.system.controller.dept.vo.post.SysPostUpdateReqVO;
  10 +import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO;
  11 +import cn.iocoder.dashboard.modules.system.dal.mysql.dept.SysPostMapper;
  12 +import cn.iocoder.dashboard.modules.system.service.dept.impl.SysPostServiceImpl;
  13 +import cn.iocoder.dashboard.util.collection.ArrayUtils;
  14 +import cn.iocoder.dashboard.util.object.ObjectUtils;
  15 +import org.junit.jupiter.api.Test;
  16 +import org.springframework.context.annotation.Import;
  17 +
  18 +import javax.annotation.Resource;
  19 +import java.util.List;
  20 +import java.util.function.Consumer;
  21 +
  22 +import static cn.hutool.core.util.RandomUtil.randomEle;
  23 +import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*;
  24 +import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals;
  25 +import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException;
  26 +import static cn.iocoder.dashboard.util.RandomUtils.randomLongId;
  27 +import static cn.iocoder.dashboard.util.RandomUtils.randomPojo;
  28 +import static org.junit.jupiter.api.Assertions.*;
  29 +
  30 +/**
  31 + * {@link SysPostServiceImpl} 的单元测试类
  32 + *
  33 + * @author niudehua
  34 + */
  35 +@Import(SysPostServiceImpl.class)
  36 +class SysPostServiceTest extends BaseDbUnitTest {
  37 +
  38 + @Resource
  39 + private SysPostServiceImpl postService;
  40 + @Resource
  41 + private SysPostMapper postMapper;
  42 +
  43 + @Test
  44 + void testPagePosts() {
  45 + // mock 数据
  46 + SysPostDO postDO = randomPojo(SysPostDO.class, o -> {
  47 + o.setName("码仔");
  48 + o.setStatus(CommonStatusEnum.ENABLE.getStatus());
  49 + });
  50 + postMapper.insert(postDO);
  51 + // 测试 name 不匹配
  52 + postMapper.insert(ObjectUtils.clone(postDO, o -> o.setName("程序员")));
  53 + // 测试 status 不匹配
  54 + postMapper.insert(ObjectUtils.clone(postDO, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));
  55 +
  56 + // 准备参数
  57 + SysPostPageReqVO reqVO = new SysPostPageReqVO();
  58 + reqVO.setName("码");
  59 + reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
  60 +
  61 + // 调用
  62 + PageResult<SysPostDO> pageResult = postService.pagePosts(reqVO);
  63 +
  64 + // 断言
  65 + assertEquals(1, pageResult.getTotal());
  66 + assertEquals(1, pageResult.getList().size());
  67 + assertPojoEquals(postDO, pageResult.getList().get(0));
  68 + }
  69 +
  70 + @Test
  71 + void testListPosts() {
  72 + // mock 数据
  73 + SysPostDO postDO = randomPojo(SysPostDO.class, o -> {
  74 + o.setName("码仔");
  75 + o.setStatus(CommonStatusEnum.ENABLE.getStatus());
  76 + });
  77 + postMapper.insert(postDO);
  78 + // 测试 name 不匹配
  79 + postMapper.insert(ObjectUtils.clone(postDO, o -> o.setName("程序员")));
  80 + // 测试 status 不匹配
  81 + postMapper.insert(ObjectUtils.clone(postDO, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));
  82 + // 准备参数
  83 + SysPostExportReqVO reqVO = new SysPostExportReqVO();
  84 + reqVO.setName("码");
  85 + reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
  86 +
  87 + // 调用
  88 + List<SysPostDO> list = postService.listPosts(reqVO);
  89 + // 断言
  90 + assertEquals(1, list.size());
  91 + assertPojoEquals(postDO, list.get(0));
  92 + }
  93 +
  94 + @Test
  95 + void testGetPost() {
  96 + // mock 数据
  97 + SysPostDO dbPostDO = randomPostDO();
  98 + postMapper.insert(dbPostDO);
  99 + // 准备参数
  100 + Long id = dbPostDO.getId();
  101 + // 调用
  102 + SysPostDO post = postService.getPost(id);
  103 + // 断言
  104 + assertNotNull(post);
  105 + assertPojoEquals(dbPostDO, post);
  106 + }
  107 +
  108 + @Test
  109 + void testCreatePost_success() {
  110 + // 准备参数
  111 + SysPostCreateReqVO reqVO = randomPojo(SysPostCreateReqVO.class,
  112 + o -> o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()));
  113 + // 调用
  114 + Long postId = postService.createPost(reqVO);
  115 + // 断言
  116 + assertNotNull(postId);
  117 + // 校验记录的属性是否正确
  118 + SysPostDO post = postMapper.selectById(postId);
  119 + assertPojoEquals(reqVO, post);
  120 + }
  121 +
  122 + @Test
  123 + void testUpdatePost_success() {
  124 + // mock 数据
  125 + SysPostDO postDO = randomPostDO();
  126 + postMapper.insert(postDO);// @Sql: 先插入出一条存在的数据
  127 + // 准备参数
  128 + SysPostUpdateReqVO reqVO = randomPojo(SysPostUpdateReqVO.class,
  129 + o -> {
  130 + // 设置更新的 ID
  131 + o.setId(postDO.getId());
  132 + o.setStatus(randomEle(CommonStatusEnum.values()).getStatus());
  133 + });
  134 + // 调用
  135 + postService.updatePost(reqVO);
  136 + // 校验是否更新正确
  137 + SysPostDO post = postMapper.selectById(reqVO.getId());// 获取最新的
  138 + assertPojoEquals(reqVO, post);
  139 + }
  140 +
  141 + @Test
  142 + void testDeletePost_success() {
  143 + // mock 数据
  144 + SysPostDO postDO = randomPostDO();
  145 + postMapper.insert(postDO);
  146 + // 准备参数
  147 + Long id = postDO.getId();
  148 + // 调用
  149 + postService.deletePost(id);
  150 + assertNull(postMapper.selectById(id));
  151 + }
  152 +
  153 + @Test
  154 + void testCheckPost_notFoundForDelete() {
  155 + // 准备参数
  156 + Long id = randomLongId();
  157 + // 调用, 并断言异常
  158 + assertServiceException(() -> postService.deletePost(id), POST_NOT_FOUND);
  159 + }
  160 +
  161 + @Test
  162 + void testCheckPost_nameDuplicateForCreate() {
  163 + // mock 数据
  164 + SysPostDO postDO = randomPostDO();
  165 + postMapper.insert(postDO);// @Sql: 先插入出一条存在的数据
  166 + // 准备参数
  167 + SysPostCreateReqVO reqVO = randomPojo(SysPostCreateReqVO.class,
  168 + // 模拟 name 重复
  169 + o -> o.setName(postDO.getName()));
  170 + assertServiceException(() -> postService.createPost(reqVO), POST_NAME_DUPLICATE);
  171 + }
  172 +
  173 + @Test
  174 + void testCheckPost_codeDuplicateForUpdate() {
  175 + // mock 数据
  176 + SysPostDO postDO = randomPostDO();
  177 + postMapper.insert(postDO);
  178 + // mock 数据 稍后模拟重复它的 code
  179 + SysPostDO codePostDO = randomPostDO();
  180 + postMapper.insert(codePostDO);
  181 + // 准备参数
  182 + SysPostUpdateReqVO reqVO = randomPojo(SysPostUpdateReqVO.class,
  183 + o -> {
  184 + // 设置更新的 ID
  185 + o.setId(postDO.getId());
  186 + // 模拟 code 重复
  187 + o.setCode(codePostDO.getCode());
  188 + });
  189 + // 调用, 并断言异常
  190 + assertServiceException(() -> postService.updatePost(reqVO), POST_CODE_DUPLICATE);
  191 + }
  192 +
  193 + @SafeVarargs
  194 + private static SysPostDO randomPostDO(Consumer<SysPostDO>... consumers) {
  195 + Consumer<SysPostDO> consumer = (o) -> {
  196 + o.setStatus(randomEle(CommonStatusEnum.values()).getStatus()); // 保证 status 的范围
  197 + };
  198 + return randomPojo(SysPostDO.class, ArrayUtils.append(consumer, consumers));
  199 + }
  200 +}
... ...
src/test/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictDataServiceTest.java
1 1 package cn.iocoder.dashboard.modules.system.service.dict;
2 2  
3   -import cn.iocoder.dashboard.BaseSpringBootUnitTest;
  3 +import cn.iocoder.dashboard.BaseDbUnitTest;
4 4 import cn.iocoder.dashboard.common.enums.CommonStatusEnum;
5 5 import cn.iocoder.dashboard.common.pojo.PageResult;
6 6 import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO;
... ... @@ -12,14 +12,20 @@ import cn.iocoder.dashboard.modules.system.dal.dataobject.dict.SysDictTypeDO;
12 12 import cn.iocoder.dashboard.modules.system.dal.mysql.dict.SysDictDataMapper;
13 13 import cn.iocoder.dashboard.modules.system.mq.producer.dict.SysDictDataProducer;
14 14 import cn.iocoder.dashboard.modules.system.service.dict.impl.SysDictDataServiceImpl;
  15 +import cn.iocoder.dashboard.util.collection.ArrayUtils;
15 16 import cn.iocoder.dashboard.util.object.ObjectUtils;
  17 +import com.google.common.collect.ImmutableTable;
16 18 import org.junit.jupiter.api.Test;
17 19 import org.springframework.boot.test.mock.mockito.MockBean;
  20 +import org.springframework.context.annotation.Import;
18 21  
19 22 import javax.annotation.Resource;
  23 +import java.util.Date;
20 24 import java.util.List;
  25 +import java.util.function.Consumer;
21 26  
22   -import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.DICT_DATA_NOT_EXISTS;
  27 +import static cn.hutool.core.bean.BeanUtil.getFieldValue;
  28 +import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*;
23 29 import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals;
24 30 import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException;
25 31 import static cn.iocoder.dashboard.util.RandomUtils.*;
... ... @@ -32,7 +38,8 @@ import static org.mockito.Mockito.*;
32 38 *
33 39 * @author 芋道源码
34 40 */
35   -public class SysDictDataServiceTest extends BaseSpringBootUnitTest {
  41 +@Import(SysDictDataServiceImpl.class)
  42 +public class SysDictDataServiceTest extends BaseDbUnitTest {
36 43  
37 44 @Resource
38 45 private SysDictDataServiceImpl dictDataService;
... ... @@ -44,6 +51,37 @@ public class SysDictDataServiceTest extends BaseSpringBootUnitTest {
44 51 @MockBean
45 52 private SysDictDataProducer dictDataProducer;
46 53  
  54 + /**
  55 + * 测试加载到新的字典数据的情况
  56 + */
  57 + @Test
  58 + @SuppressWarnings("unchecked")
  59 + public void testInitLocalCache() {
  60 + // mock 数据
  61 + SysDictDataDO dictData01 = randomDictDataDO();
  62 + dictDataMapper.insert(dictData01);
  63 + SysDictDataDO dictData02 = randomDictDataDO();
  64 + dictDataMapper.insert(dictData02);
  65 +
  66 + // 调用
  67 + dictDataService.initLocalCache();
  68 + // 断言 labelDictDataCache 缓存
  69 + ImmutableTable<String, String, SysDictDataDO> labelDictDataCache =
  70 + (ImmutableTable<String, String, SysDictDataDO>) getFieldValue(dictDataService, "labelDictDataCache");
  71 + assertEquals(2, labelDictDataCache.size());
  72 + assertPojoEquals(dictData01, labelDictDataCache.get(dictData01.getDictType(), dictData01.getLabel()));
  73 + assertPojoEquals(dictData02, labelDictDataCache.get(dictData02.getDictType(), dictData02.getLabel()));
  74 + // 断言 valueDictDataCache 缓存
  75 + ImmutableTable<String, String, SysDictDataDO> valueDictDataCache =
  76 + (ImmutableTable<String, String, SysDictDataDO>) getFieldValue(dictDataService, "valueDictDataCache");
  77 + assertEquals(2, valueDictDataCache.size());
  78 + assertPojoEquals(dictData01, valueDictDataCache.get(dictData01.getDictType(), dictData01.getValue()));
  79 + assertPojoEquals(dictData02, valueDictDataCache.get(dictData02.getDictType(), dictData02.getValue()));
  80 + // 断言 maxUpdateTime 缓存
  81 + Date maxUpdateTime = (Date) getFieldValue(dictDataService, "maxUpdateTime");
  82 + assertEquals(ObjectUtils.max(dictData01.getUpdateTime(), dictData02.getUpdateTime()), maxUpdateTime);
  83 + }
  84 +
47 85 @Test
48 86 public void testGetDictDataPage() {
49 87 // mock 数据
... ... @@ -107,8 +145,7 @@ public class SysDictDataServiceTest extends BaseSpringBootUnitTest {
107 145 SysDictDataCreateReqVO reqVO = randomPojo(SysDictDataCreateReqVO.class,
108 146 o -> o.setStatus(randomCommonStatus()));
109 147 // mock 方法
110   - when(dictTypeService.getDictType(eq(reqVO.getDictType())))
111   - .thenReturn(randomPojo(SysDictTypeDO.class, o -> o.setStatus(CommonStatusEnum.ENABLE.getStatus())));
  148 + when(dictTypeService.getDictType(eq(reqVO.getDictType()))).thenReturn(randomDictTypeDO(reqVO.getDictType()));
112 149  
113 150 // 调用
114 151 Long dictDataId = dictDataService.createDictData(reqVO);
... ... @@ -124,50 +161,142 @@ public class SysDictDataServiceTest extends BaseSpringBootUnitTest {
124 161 @Test
125 162 public void testUpdateDictData_success() {
126 163 // mock 数据
127   - SysDictDataDO dbDictData = randomPojo(SysDictDataDO.class);
  164 + SysDictDataDO dbDictData = randomDictDataDO();
128 165 dictDataMapper.insert(dbDictData);// @Sql: 先插入出一条存在的数据
129 166 // 准备参数
130 167 SysDictDataUpdateReqVO reqVO = randomPojo(SysDictDataUpdateReqVO.class, o -> {
131 168 o.setId(dbDictData.getId()); // 设置更新的 ID
  169 + o.setStatus(randomCommonStatus());
132 170 });
  171 + // mock 方法,字典类型
  172 + when(dictTypeService.getDictType(eq(reqVO.getDictType()))).thenReturn(randomDictTypeDO(reqVO.getDictType()));
133 173  
134 174 // 调用
135 175 dictDataService.updateDictData(reqVO);
136 176 // 校验是否更新正确
137 177 SysDictDataDO dictData = dictDataMapper.selectById(reqVO.getId()); // 获取最新的
138 178 assertPojoEquals(reqVO, dictData);
  179 + // 校验调用
  180 + verify(dictDataProducer, times(1)).sendDictDataRefreshMessage();
139 181 }
140 182  
141 183 @Test
142   - public void testUpdateDictData_notExists() {
  184 + public void testDeleteDictData_success() {
  185 + // mock 数据
  186 + SysDictDataDO dbDictData = randomDictDataDO();
  187 + dictDataMapper.insert(dbDictData);// @Sql: 先插入出一条存在的数据
143 188 // 准备参数
144   - SysDictDataUpdateReqVO reqVO = randomPojo(SysDictDataUpdateReqVO.class);
  189 + Long id = dbDictData.getId();
145 190  
146   - // 调用, 并断言异常
147   - assertServiceException(() -> dictDataService.updateDictData(reqVO), DICT_DATA_NOT_EXISTS);
  191 + // 调用
  192 + dictDataService.deleteDictData(id);
  193 + // 校验数据不存在了
  194 + assertNull(dictDataMapper.selectById(id));
  195 + // 校验调用
  196 + verify(dictDataProducer, times(1)).sendDictDataRefreshMessage();
148 197 }
149 198  
150 199 @Test
151   - public void testDeleteDictData_success() {
  200 + public void testCheckDictDataExists_success() {
152 201 // mock 数据
153   - SysDictDataDO dbDictData = randomPojo(SysDictDataDO.class);
  202 + SysDictDataDO dbDictData = randomDictDataDO();
154 203 dictDataMapper.insert(dbDictData);// @Sql: 先插入出一条存在的数据
  204 +
  205 + // 调用成功
  206 + dictDataService.checkDictDataExists(dbDictData.getId());
  207 + }
  208 +
  209 + @Test
  210 + public void testCheckDictDataExists_notExists() {
  211 + assertServiceException(() -> dictDataService.checkDictDataExists(randomLongId()), DICT_DATA_NOT_EXISTS);
  212 + }
  213 +
  214 + @Test
  215 + public void testCheckDictTypeValid_success() {
  216 + // mock 方法,数据类型被禁用
  217 + String type = randomString();
  218 + when(dictTypeService.getDictType(eq(type))).thenReturn(randomDictTypeDO(type));
  219 +
  220 + // 调用, 成功
  221 + dictDataService.checkDictTypeValid(type);
  222 + }
  223 +
  224 + @Test
  225 + public void testCheckDictTypeValid_notExists() {
  226 + assertServiceException(() -> dictDataService.checkDictTypeValid(randomString()), DICT_TYPE_NOT_EXISTS);
  227 + }
  228 +
  229 + @Test
  230 + public void testCheckDictTypeValid_notEnable() {
  231 + // mock 方法,数据类型被禁用
  232 + String dictType = randomString();
  233 + when(dictTypeService.getDictType(eq(dictType))).thenReturn(
  234 + randomPojo(SysDictTypeDO.class, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));
  235 +
  236 + // 调用, 并断言异常
  237 + assertServiceException(() -> dictDataService.checkDictTypeValid(dictType), DICT_TYPE_NOT_ENABLE);
  238 + }
  239 +
  240 + @Test
  241 + public void testCheckDictDataValueUnique_success() {
  242 + // 调用,成功
  243 + dictDataService.checkDictDataValueUnique(randomLongId(), randomString(), randomString());
  244 + }
  245 +
  246 + @Test
  247 + public void testCheckDictDataValueUnique_valueDuplicateForCreate() {
155 248 // 准备参数
156   - Long id = dbDictData.getId();
  249 + String dictType = randomString();
  250 + String value = randomString();
  251 + // mock 数据
  252 + dictDataMapper.insert(randomDictDataDO(o -> {
  253 + o.setDictType(dictType);
  254 + o.setValue(value);
  255 + }));
157 256  
158   - // 调用
159   - dictDataService.deleteDictData(id);
160   - // 校验数据不存在了
161   - assertNull(dictDataMapper.selectById(id));
  257 + // 调用,校验异常
  258 + assertServiceException(() -> dictDataService.checkDictDataValueUnique(null, dictType, value),
  259 + DICT_DATA_VALUE_DUPLICATE);
162 260 }
163 261  
164 262 @Test
165   - public void testDeleteDictData_notExists() {
  263 + public void testCheckDictDataValueUnique_valueDuplicateForUpdate() {
166 264 // 准备参数
167 265 Long id = randomLongId();
  266 + String dictType = randomString();
  267 + String value = randomString();
  268 + // mock 数据
  269 + dictDataMapper.insert(randomDictDataDO(o -> {
  270 + o.setDictType(dictType);
  271 + o.setValue(value);
  272 + }));
168 273  
169   - // 调用, 并断言异常
170   - assertServiceException(() -> dictDataService.deleteDictData(id), DICT_DATA_NOT_EXISTS);
  274 + // 调用,校验异常
  275 + assertServiceException(() -> dictDataService.checkDictDataValueUnique(id, dictType, value),
  276 + DICT_DATA_VALUE_DUPLICATE);
  277 + }
  278 +
  279 + // ========== 随机对象 ==========
  280 +
  281 + @SafeVarargs
  282 + private static SysDictDataDO randomDictDataDO(Consumer<SysDictDataDO>... consumers) {
  283 + Consumer<SysDictDataDO> consumer = (o) -> {
  284 + o.setStatus(randomCommonStatus()); // 保证 status 的范围
  285 + };
  286 + return randomPojo(SysDictDataDO.class, ArrayUtils.append(consumer, consumers));
  287 + }
  288 +
  289 + /**
  290 + * 生成一个有效的字典类型
  291 + *
  292 + * @param type 字典类型
  293 + * @return SysDictTypeDO 对象
  294 + */
  295 + private static SysDictTypeDO randomDictTypeDO(String type) {
  296 + return randomPojo(SysDictTypeDO.class, o -> {
  297 + o.setType(type);
  298 + o.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 保证 status 是开启
  299 + });
171 300 }
172 301  
173 302 }
... ...
src/test/java/cn/iocoder/dashboard/modules/system/service/dict/SysDictTypeServiceTest.java
1 1 package cn.iocoder.dashboard.modules.system.service.dict;
2 2  
3   -import cn.iocoder.dashboard.BaseSpringBootUnitTest;
  3 +import cn.iocoder.dashboard.BaseDbUnitTest;
4 4 import cn.iocoder.dashboard.common.enums.CommonStatusEnum;
5 5 import cn.iocoder.dashboard.common.pojo.PageResult;
6 6 import cn.iocoder.dashboard.modules.system.controller.dict.vo.type.SysDictTypeCreateReqVO;
... ... @@ -14,6 +14,7 @@ import cn.iocoder.dashboard.util.collection.ArrayUtils;
14 14 import cn.iocoder.dashboard.util.object.ObjectUtils;
15 15 import org.junit.jupiter.api.Test;
16 16 import org.springframework.boot.test.mock.mockito.MockBean;
  17 +import org.springframework.context.annotation.Import;
17 18  
18 19 import javax.annotation.Resource;
19 20 import java.util.List;
... ... @@ -23,8 +24,7 @@ import static cn.hutool.core.util.RandomUtil.randomEle;
23 24 import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*;
24 25 import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals;
25 26 import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException;
26   -import static cn.iocoder.dashboard.util.RandomUtils.randomLongId;
27   -import static cn.iocoder.dashboard.util.RandomUtils.randomPojo;
  27 +import static cn.iocoder.dashboard.util.RandomUtils.*;
28 28 import static cn.iocoder.dashboard.util.date.DateUtils.buildTime;
29 29 import static org.junit.jupiter.api.Assertions.*;
30 30 import static org.mockito.ArgumentMatchers.eq;
... ... @@ -35,7 +35,8 @@ import static org.mockito.Mockito.when;
35 35 *
36 36 * @author 芋道源码
37 37 */
38   -public class SysDictTypeServiceTest extends BaseSpringBootUnitTest {
  38 +@Import(SysDictTypeServiceImpl.class)
  39 +public class SysDictTypeServiceTest extends BaseDbUnitTest {
39 40  
40 41 @Resource
41 42 private SysDictTypeServiceImpl dictTypeService;
... ... @@ -143,32 +144,6 @@ public class SysDictTypeServiceTest extends BaseSpringBootUnitTest {
143 144 }
144 145  
145 146 @Test
146   - public void testCreateDictType_nameDuplicate() {
147   - // mock 数据
148   - SysDictTypeDO dbDictType = randomDictTypeDO();
149   - dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据
150   - // 准备参数
151   - SysDictTypeCreateReqVO reqVO = randomPojo(SysDictTypeCreateReqVO.class,
152   - o -> o.setName(dbDictType.getName())); // 模拟 name 重复
153   -
154   - // 调用, 并断言异常
155   - assertServiceException(() -> dictTypeService.createDictType(reqVO), DICT_TYPE_NAME_DUPLICATE);
156   - }
157   -
158   - @Test
159   - public void testCreateDictType_typeDuplicate() {
160   - // mock 数据
161   - SysDictTypeDO dbDictType = randomDictTypeDO();
162   - dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据
163   - // 准备参数
164   - SysDictTypeCreateReqVO reqVO = randomPojo(SysDictTypeCreateReqVO.class,
165   - o -> o.setType(dbDictType.getType())); // 模拟 type 重复
166   -
167   - // 调用, 并断言异常
168   - assertServiceException(() -> dictTypeService.createDictType(reqVO), DICT_TYPE_TYPE_DUPLICATE);
169   - }
170   -
171   - @Test
172 147 public void testUpdateDictType_success() {
173 148 // mock 数据
174 149 SysDictTypeDO dbDictType = randomDictTypeDO();
... ... @@ -187,67 +162,108 @@ public class SysDictTypeServiceTest extends BaseSpringBootUnitTest {
187 162 }
188 163  
189 164 @Test
190   - public void testUpdateDictType_notExists() {
  165 + public void testDeleteDictType_success() {
  166 + // mock 数据
  167 + SysDictTypeDO dbDictType = randomDictTypeDO();
  168 + dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据
191 169 // 准备参数
192   - SysDictTypeUpdateReqVO reqVO = randomPojo(SysDictTypeUpdateReqVO.class);
  170 + Long id = dbDictType.getId();
193 171  
194   - // 调用, 并断言异常
195   - assertServiceException(() -> dictTypeService.updateDictType(reqVO), DICT_TYPE_NOT_EXISTS);
  172 + // 调用
  173 + dictTypeService.deleteDictType(id);
  174 + // 校验数据不存在了
  175 + assertNull(dictTypeMapper.selectById(id));
196 176 }
197 177  
198 178 @Test
199   - public void testUpdateDictType_nameDuplicate() {
200   - // mock 数据,稍后更新它
  179 + public void testDeleteDictType_hasChildren() {
  180 + // mock 数据
201 181 SysDictTypeDO dbDictType = randomDictTypeDO();
202   - dictTypeMapper.insert(dbDictType);
203   - // mock 数据,ks稍后模拟重复它的名字
204   - SysDictTypeDO nameDictType = randomDictTypeDO();
205   - dictTypeMapper.insert(nameDictType);
  182 + dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据
206 183 // 准备参数
207   - SysDictTypeUpdateReqVO reqVO = randomPojo(SysDictTypeUpdateReqVO.class, o -> {
208   - o.setId(dbDictType.getId()); // 设置更新的 ID
209   - o.setName(nameDictType.getName()); // 模拟 name 重复
210   - });
  184 + Long id = dbDictType.getId();
  185 + // mock 方法
  186 + when(dictDataService.countByDictType(eq(dbDictType.getType()))).thenReturn(1);
211 187  
212 188 // 调用, 并断言异常
213   - assertServiceException(() -> dictTypeService.updateDictType(reqVO), DICT_TYPE_NAME_DUPLICATE);
  189 + assertServiceException(() -> dictTypeService.deleteDictType(id), DICT_TYPE_HAS_CHILDREN);
214 190 }
215 191  
216 192 @Test
217   - public void testDeleteDictType_success() {
  193 + public void testCheckDictDataExists_success() {
218 194 // mock 数据
219 195 SysDictTypeDO dbDictType = randomDictTypeDO();
220 196 dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据
  197 +
  198 + // 调用成功
  199 + dictTypeService.checkDictTypeExists(dbDictType.getId());
  200 + }
  201 +
  202 + @Test
  203 + public void testCheckDictDataExists_notExists() {
  204 + assertServiceException(() -> dictTypeService.checkDictTypeExists(randomLongId()), DICT_TYPE_NOT_EXISTS);
  205 + }
  206 +
  207 + @Test
  208 + public void testCheckDictTypeUnique_success() {
  209 + // 调用,成功
  210 + dictTypeService.checkDictTypeUnique(randomLongId(), randomString());
  211 + }
  212 +
  213 + @Test
  214 + public void testCheckDictTypeUnique_valueDuplicateForCreate() {
221 215 // 准备参数
222   - Long id = dbDictType.getId();
  216 + String type = randomString();
  217 + // mock 数据
  218 + dictTypeMapper.insert(randomDictTypeDO(o -> o.setType(type)));
223 219  
224   - // 调用
225   - dictTypeService.deleteDictType(id);
226   - // 校验数据不存在了
227   - assertNull(dictTypeMapper.selectById(id));
  220 + // 调用,校验异常
  221 + assertServiceException(() -> dictTypeService.checkDictTypeUnique(null, type),
  222 + DICT_TYPE_TYPE_DUPLICATE);
228 223 }
229 224  
230 225 @Test
231   - public void testDeleteDictType_notExists() {
  226 + public void testCheckDictTypeUnique_valueDuplicateForUpdate() {
232 227 // 准备参数
233 228 Long id = randomLongId();
  229 + String type = randomString();
  230 + // mock 数据
  231 + dictTypeMapper.insert(randomDictTypeDO(o -> o.setType(type)));
234 232  
235   - // 调用, 并断言异常
236   - assertServiceException(() -> dictTypeService.deleteDictType(id), DICT_TYPE_NOT_EXISTS);
  233 + // 调用,校验异常
  234 + assertServiceException(() -> dictTypeService.checkDictTypeUnique(id, type),
  235 + DICT_TYPE_TYPE_DUPLICATE);
237 236 }
238 237  
239 238 @Test
240   - public void testDeleteDictType_hasChildren() {
  239 + public void testCheckDictTypNameUnique_success() {
  240 + // 调用,成功
  241 + dictTypeService.checkDictTypeNameUnique(randomLongId(), randomString());
  242 + }
  243 +
  244 + @Test
  245 + public void testCheckDictTypeNameUnique_nameDuplicateForCreate() {
  246 + // 准备参数
  247 + String name = randomString();
241 248 // mock 数据
242   - SysDictTypeDO dbDictType = randomDictTypeDO();
243   - dictTypeMapper.insert(dbDictType);// @Sql: 先插入出一条存在的数据
  249 + dictTypeMapper.insert(randomDictTypeDO(o -> o.setName(name)));
  250 +
  251 + // 调用,校验异常
  252 + assertServiceException(() -> dictTypeService.checkDictTypeNameUnique(null, name),
  253 + DICT_TYPE_NAME_DUPLICATE);
  254 + }
  255 +
  256 + @Test
  257 + public void testCheckDictTypeNameUnique_nameDuplicateForUpdate() {
244 258 // 准备参数
245   - Long id = dbDictType.getId();
246   - // mock 方法
247   - when(dictDataService.countByDictType(eq(dbDictType.getType()))).thenReturn(1);
  259 + Long id = randomLongId();
  260 + String name = randomString();
  261 + // mock 数据
  262 + dictTypeMapper.insert(randomDictTypeDO(o -> o.setName(name)));
248 263  
249   - // 调用, 并断言异常
250   - assertServiceException(() -> dictTypeService.deleteDictType(id), DICT_TYPE_HAS_CHILDREN);
  264 + // 调用,校验异常
  265 + assertServiceException(() -> dictTypeService.checkDictTypeNameUnique(id, name),
  266 + DICT_TYPE_NAME_DUPLICATE);
251 267 }
252 268  
253 269 // ========== 随机对象 ==========
... ...
src/test/java/cn/iocoder/dashboard/modules/system/service/notice/SysNoticeServiceImplTest.java 0 → 100644
  1 +package cn.iocoder.dashboard.modules.system.service.notice;
  2 +
  3 +import cn.iocoder.dashboard.BaseDbUnitTest;
  4 +import cn.iocoder.dashboard.common.enums.CommonStatusEnum;
  5 +import cn.iocoder.dashboard.common.pojo.PageResult;
  6 +import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeCreateReqVO;
  7 +import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticePageReqVO;
  8 +import cn.iocoder.dashboard.modules.system.controller.notice.vo.SysNoticeUpdateReqVO;
  9 +import cn.iocoder.dashboard.modules.system.dal.dataobject.notice.SysNoticeDO;
  10 +import cn.iocoder.dashboard.modules.system.dal.mysql.notice.SysNoticeMapper;
  11 +import cn.iocoder.dashboard.modules.system.enums.notice.SysNoticeTypeEnum;
  12 +import cn.iocoder.dashboard.modules.system.service.notice.impl.SysNoticeServiceImpl;
  13 +import cn.iocoder.dashboard.util.object.ObjectUtils;
  14 +import org.junit.jupiter.api.Test;
  15 +import org.springframework.context.annotation.Import;
  16 +
  17 +import javax.annotation.Resource;
  18 +
  19 +import java.util.function.Consumer;
  20 +
  21 +import static cn.hutool.core.util.RandomUtil.randomEle;
  22 +import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.NOTICE_NOT_FOUND;
  23 +import static cn.iocoder.dashboard.util.AssertUtils.assertPojoEquals;
  24 +import static cn.iocoder.dashboard.util.AssertUtils.assertServiceException;
  25 +import static cn.iocoder.dashboard.util.RandomUtils.randomLongId;
  26 +import static cn.iocoder.dashboard.util.RandomUtils.randomPojo;
  27 +import static org.junit.jupiter.api.Assertions.*;
  28 +
  29 +@Import(SysNoticeServiceImpl.class)
  30 +class SysNoticeServiceImplTest extends BaseDbUnitTest {
  31 +
  32 + @Resource
  33 + private SysNoticeServiceImpl sysNoticeService;
  34 +
  35 + @Resource
  36 + private SysNoticeMapper sysNoticeMapper;
  37 +
  38 + @Test
  39 + public void testPageNotices_success() {
  40 + // 插入前置数据
  41 + SysNoticeDO dbNotice = randomPojo(SysNoticeDO.class, o -> {
  42 + o.setTitle("尼古拉斯赵四来啦!");
  43 + o.setStatus(CommonStatusEnum.ENABLE.getStatus());
  44 + o.setType(randomEle(SysNoticeTypeEnum.values()).getType());
  45 + });
  46 + sysNoticeMapper.insert(dbNotice);
  47 +
  48 + // 测试 title 不匹配
  49 + sysNoticeMapper.insert(ObjectUtils.clone(dbNotice, o -> o.setTitle("尼古拉斯凯奇也来啦!")));
  50 + // 测试 status 不匹配
  51 + sysNoticeMapper.insert(ObjectUtils.clone(dbNotice, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));
  52 +
  53 +
  54 + // 查询
  55 + SysNoticePageReqVO reqVO = new SysNoticePageReqVO();
  56 + reqVO.setTitle("尼古拉斯赵四来啦!");
  57 + reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
  58 + PageResult<SysNoticeDO> pageResult = sysNoticeService.pageNotices(reqVO);
  59 +
  60 + // 验证查询结果经过筛选
  61 + assertEquals(1, pageResult.getTotal());
  62 + assertEquals(1, pageResult.getList().size());
  63 + assertPojoEquals(dbNotice, pageResult.getList().get(0));
  64 +
  65 + }
  66 +
  67 + @Test
  68 + public void testGetNotice_success() {
  69 + // 插入前置数据
  70 + SysNoticeDO dbNotice = randomSysNoticeDO();
  71 + sysNoticeMapper.insert(dbNotice);
  72 +
  73 + // 查询
  74 + SysNoticeDO notice = sysNoticeService.getNotice(dbNotice.getId());
  75 +
  76 + // 验证插入与读取对象是否一致
  77 + assertNotNull(notice);
  78 + assertPojoEquals(dbNotice, notice);
  79 + }
  80 +
  81 + @Test
  82 + public void testCreateNotice_success() {
  83 + // 准备参数
  84 + SysNoticeCreateReqVO reqVO = randomSysNoticeCreateReqVO();
  85 +
  86 + // 校验插入是否成功
  87 + Long noticeId = sysNoticeService.createNotice(reqVO);
  88 + assertNotNull(noticeId);
  89 +
  90 + // 校验插入属性是否正确
  91 + SysNoticeDO notice = sysNoticeMapper.selectById(noticeId);
  92 + assertPojoEquals(reqVO, notice);
  93 + }
  94 +
  95 + @Test
  96 + public void testUpdateNotice_success() {
  97 + // 插入前置数据
  98 + SysNoticeDO dbNoticeDO = randomSysNoticeDO();
  99 + sysNoticeMapper.insert(dbNoticeDO);
  100 +
  101 + // 准备更新参数
  102 + SysNoticeUpdateReqVO reqVO = randomSysNoticeUpdateReqVO(o -> o.setId(dbNoticeDO.getId()));
  103 +
  104 + // 更新
  105 + sysNoticeService.updateNotice(reqVO);
  106 +
  107 + // 检验是否更新成功
  108 + SysNoticeDO notice = sysNoticeMapper.selectById(reqVO.getId());
  109 + assertPojoEquals(reqVO, notice);
  110 + }
  111 +
  112 + @Test
  113 + public void testDeleteNotice_success() {
  114 + // 插入前置数据
  115 + SysNoticeDO dbNotice = randomSysNoticeDO();
  116 + sysNoticeMapper.insert(dbNotice);
  117 +
  118 + // 删除
  119 + sysNoticeService.deleteNotice(dbNotice.getId());
  120 +
  121 + // 检查是否删除成功
  122 + assertNull(sysNoticeMapper.selectById(dbNotice.getId()));
  123 + }
  124 +
  125 + @Test
  126 + public void checkNoticeExists_success() {
  127 + // 插入前置数据
  128 + SysNoticeDO dbNotice = randomSysNoticeDO();
  129 + sysNoticeMapper.insert(dbNotice);
  130 +
  131 + // 成功调用
  132 + sysNoticeService.checkNoticeExists(dbNotice.getId());
  133 + }
  134 +
  135 + @Test
  136 + public void checkNoticeExists_noExists() {
  137 + assertServiceException(() -> sysNoticeService.checkNoticeExists(randomLongId()), NOTICE_NOT_FOUND);
  138 + }
  139 +
  140 + @SafeVarargs
  141 + private static SysNoticeDO randomSysNoticeDO(Consumer<SysNoticeDO>... consumers) {
  142 + SysNoticeDO notice = randomPojo(SysNoticeDO.class, consumers);
  143 + notice.setType(randomEle(SysNoticeTypeEnum.values()).getType());
  144 + notice.setStatus(CommonStatusEnum.ENABLE.getStatus());
  145 + return notice;
  146 + }
  147 +
  148 + @SafeVarargs
  149 + private static SysNoticeUpdateReqVO randomSysNoticeUpdateReqVO(Consumer<SysNoticeUpdateReqVO>... consumers) {
  150 + SysNoticeUpdateReqVO reqVO = randomPojo(SysNoticeUpdateReqVO.class, consumers);
  151 + reqVO.setType(randomEle(SysNoticeTypeEnum.values()).getType());
  152 + reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
  153 + return reqVO;
  154 + }
  155 +
  156 + private static SysNoticeCreateReqVO randomSysNoticeCreateReqVO() {
  157 + SysNoticeCreateReqVO reqVO = randomPojo(SysNoticeCreateReqVO.class);
  158 + reqVO.setType(randomEle(SysNoticeTypeEnum.values()).getType());
  159 + reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
  160 + return reqVO;
  161 + }
  162 +
  163 +
  164 +}
0 165 \ No newline at end of file
... ...
src/test/resources/application-unit-test.yaml
... ... @@ -3,21 +3,6 @@ spring:
3 3 lazy-initialization: true # 开启懒加载,加快速度
4 4 banner-mode: off # 单元测试,禁用 Banner
5 5  
6   - # 去除的自动配置项
7   - autoconfigure:
8   - exclude:
9   - - org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration # 单元测试,禁用 SpringSecurity
10   - - org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration # 单元测试,禁用 SpringSecurity
11   - - org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration # 单元测试,禁用 Quartz
12   - - com.baomidou.lock.spring.boot.autoconfigure.LockAutoConfiguration # 单元测试,禁用 Lock4j 分布式锁
13   - - org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration # 单元测试,禁用 Scheduler 定时任务
14   - - org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration # 项目没有使用 Spring Data,所以禁用配置类,加速启动
15   -
16   -# Swagger 接口文档的自动配置(单元测试,禁用 Swagger)
17   -springfox:
18   - documentation:
19   - auto-startup: false
20   -
21 6 --- #################### 数据库相关配置 ####################
22 7  
23 8 spring:
... ... @@ -29,6 +14,9 @@ spring:
29 14 username: sa
30 15 password:
31 16 schema: classpath:sql/create_tables.sql # MySQL 转 H2 的语句,使用 https://www.jooq.org/translate/ 工具
  17 + druid:
  18 + async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度
  19 + initial-size: 1 # 单元测试,配置为 1,提升启动速度
32 20  
33 21 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
34 22 redis:
... ... @@ -36,17 +24,13 @@ spring:
36 24 port: 16379 # 端口(单元测试,使用 16379 端口)
37 25 database: 0 # 数据库索引
38 26  
39   ---- #################### 定时任务相关配置 ####################
  27 +mybatis:
  28 + lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试
40 29  
41   -# Quartz 配置项,对应 QuartzProperties 配置类(单元测试,禁用 Quartz)
  30 +--- #################### 定时任务相关配置 ####################
42 31  
43 32 --- #################### 配置中心相关配置 ####################
44 33  
45   -# Apollo 配置中心
46   -apollo:
47   - bootstrap:
48   - enabled: false # 单元测试,禁用配置中心
49   -
50 34 --- #################### 服务保障相关配置 ####################
51 35  
52 36 # Lock4j 配置项(单元测试,禁用 Lock4j)
... ... @@ -63,23 +47,6 @@ resilience4j:
63 47  
64 48 --- #################### 监控相关配置 ####################
65 49  
66   -# Actuator 监控端点的配置项
67   -management:
68   - endpoints:
69   - enabled-by-default: false
70   -
71   -# Spring Boot Admin 配置项
72   -spring:
73   - boot:
74   - admin:
75   - # Spring Boot Admin Client 客户端的相关配置
76   - client:
77   - enabled: false
78   - # Spring Boot Admin Server 服务端的相关配置
79   - context-path: /admin # 配置 Spring
80   -
81   -# 日志文件配置(不需要配置)
82   -
83 50 --- #################### 芋道相关配置 ####################
84 51  
85 52 # 芋道配置项,设置当前项目所有自定义的配置
... ...
src/test/resources/sql/clean.sql
... ... @@ -8,6 +8,8 @@ DELETE FROM &quot;sys_role&quot;;
8 8 DELETE FROM "sys_role_menu";
9 9 DELETE FROM "sys_menu";
10 10 DELETE FROM "sys_dict_type";
  11 +DELETE FROM "sys_user_session";
  12 +DELETE FROM "sys_post";
11 13 DELETE FROM "sys_login_log";
12 14 DELETE FROM "sys_operate_log";
13 15 DELETE FROM "sys_user";
... ...
src/test/resources/sql/create_tables.sql
... ... @@ -9,9 +9,9 @@ CREATE TABLE IF NOT EXISTS &quot;inf_config&quot; (
9 9 "value" varchar(500) NOT NULL DEFAULT '',
10 10 "sensitive" bit NOT NULL,
11 11 "remark" varchar(500) DEFAULT NULL,
12   - "create_by" varchar(64) DEFAULT '',
  12 + "creator" varchar(64) DEFAULT '',
13 13 "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
14   - "update_by" varchar(64) DEFAULT '',
  14 + "updater" varchar(64) DEFAULT '',
15 15 "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
16 16 "deleted" bit NOT NULL DEFAULT FALSE,
17 17 PRIMARY KEY ("id")
... ... @@ -28,9 +28,9 @@ CREATE TABLE IF NOT EXISTS &quot;sys_dept&quot; (
28 28 "phone" varchar(11) DEFAULT NULL,
29 29 "email" varchar(50) DEFAULT NULL,
30 30 "status" tinyint NOT NULL,
31   - "create_by" varchar(64) DEFAULT '',
  31 + "creator" varchar(64) DEFAULT '',
32 32 "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
33   - "update_by" varchar(64) DEFAULT '',
  33 + "updater" varchar(64) DEFAULT '',
34 34 "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
35 35 "deleted" bit NOT NULL DEFAULT FALSE,
36 36 PRIMARY KEY ("id")
... ... @@ -44,9 +44,9 @@ CREATE TABLE IF NOT EXISTS &quot;sys_dict_data&quot; (
44 44 "dict_type" varchar(100) NOT NULL DEFAULT '',
45 45 "status" tinyint NOT NULL DEFAULT '0',
46 46 "remark" varchar(500) DEFAULT NULL,
47   - "create_by" varchar(64) DEFAULT '',
  47 + "creator" varchar(64) DEFAULT '',
48 48 "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
49   - "update_by" varchar(64) DEFAULT '',
  49 + "updater" varchar(64) DEFAULT '',
50 50 "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
51 51 "deleted" bit NOT NULL DEFAULT FALSE,
52 52 PRIMARY KEY ("id")
... ... @@ -62,9 +62,9 @@ CREATE TABLE IF NOT EXISTS &quot;sys_role&quot; (
62 62 "status" tinyint NOT NULL,
63 63 "type" tinyint NOT NULL,
64 64 "remark" varchar(500) DEFAULT NULL,
65   - "create_by" varchar(64) DEFAULT '',
  65 + "creator" varchar(64) DEFAULT '',
66 66 "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
67   - "update_by" varchar(64) DEFAULT '',
  67 + "updater" varchar(64) DEFAULT '',
68 68 "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
69 69 "deleted" bit NOT NULL DEFAULT FALSE,
70 70 PRIMARY KEY ("id")
... ... @@ -74,9 +74,9 @@ CREATE TABLE IF NOT EXISTS &quot;sys_role_menu&quot; (
74 74 "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
75 75 "role_id" bigint NOT NULL,
76 76 "menu_id" bigint NOT NULL,
77   - "create_by" varchar(64) DEFAULT '',
  77 + "creator" varchar(64) DEFAULT '',
78 78 "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
79   - "update_by" varchar(64) DEFAULT '',
  79 + "updater" varchar(64) DEFAULT '',
80 80 "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
81 81 "deleted" bit NOT NULL DEFAULT FALSE,
82 82 PRIMARY KEY ("id")
... ... @@ -93,9 +93,9 @@ CREATE TABLE IF NOT EXISTS &quot;sys_menu&quot; (
93 93 "icon" varchar(100) DEFAULT '#',
94 94 "component" varchar(255) DEFAULT NULL,
95 95 "status" tinyint NOT NULL DEFAULT '0',
96   - "create_by" varchar(64) DEFAULT '',
  96 + "creator" varchar(64) DEFAULT '',
97 97 "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
98   - "update_by" varchar(64) DEFAULT '',
  98 + "updater" varchar(64) DEFAULT '',
99 99 "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
100 100 "deleted" bit NOT NULL DEFAULT FALSE,
101 101 PRIMARY KEY ("id")
... ... @@ -107,14 +107,61 @@ CREATE TABLE &quot;sys_dict_type&quot; (
107 107 "type" varchar(100) NOT NULL DEFAULT '',
108 108 "status" tinyint NOT NULL DEFAULT '0',
109 109 "remark" varchar(500) DEFAULT NULL,
110   - "create_by" varchar(64) DEFAULT '',
  110 + "creator" varchar(64) DEFAULT '',
111 111 "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
112   - "update_by" varchar(64) DEFAULT '',
  112 + "updater" varchar(64) DEFAULT '',
113 113 "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
114 114 "deleted" bit NOT NULL DEFAULT FALSE,
115 115 PRIMARY KEY ("id")
116 116 ) COMMENT '字典类型表';
117 117  
  118 +CREATE TABLE `sys_user_session` (
  119 + `id` varchar(32) NOT NULL,
  120 + `user_id` bigint DEFAULT NULL,
  121 + `username` varchar(50) NOT NULL DEFAULT '',
  122 + `user_ip` varchar(50) DEFAULT NULL,
  123 + `user_agent` varchar(512) DEFAULT NULL,
  124 + `session_timeout` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  125 + "creator" varchar(64) DEFAULT '',
  126 + "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  127 + `updater` varchar(64) DEFAULT '' ,
  128 + "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  129 + "deleted" bit NOT NULL DEFAULT FALSE,
  130 + PRIMARY KEY (`id`)
  131 +) COMMENT '用户在线 Session';
  132 +
  133 +CREATE TABLE IF NOT EXISTS "sys_post"
  134 +(
  135 + "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
  136 + "code" varchar(64) NOT NULL,
  137 + "name" varchar(50) NOT NULL,
  138 + "sort" integer NOT NULL,
  139 + "status" tinyint NOT NULL,
  140 + "remark" varchar(500) DEFAULT NULL,
  141 + "creator" varchar(64) DEFAULT '',
  142 + "create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  143 + "updater" varchar(64) DEFAULT '',
  144 + "update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  145 + "deleted" bit NOT NULL DEFAULT FALSE,
  146 + PRIMARY KEY ("id")
  147 +) COMMENT '岗位信息表';
  148 +
  149 +
  150 +CREATE TABLE IF NOT EXISTS "sys_notice" (
  151 + "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
  152 + "title" varchar(50) NOT NULL COMMENT '公告标题',
  153 + "content" text NOT NULL COMMENT '公告内容',
  154 + "notice_type" tinyint NOT NULL COMMENT '公告类型(1通知 2公告)',
  155 + "status" tinyint NOT NULL DEFAULT '0' COMMENT '公告状态(0正常 1关闭)',
  156 + "creator" varchar(64) DEFAULT '' COMMENT '创建者',
  157 + "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  158 + "updater" varchar(64) DEFAULT '' COMMENT '更新者',
  159 + "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  160 + "deleted" bit NOT NULL DEFAULT 0 COMMENT '是否删除',
  161 + PRIMARY KEY("id")
  162 +) COMMENT '通知公告表';
  163 +
  164 +
118 165 CREATE TABLE IF NOT EXISTS `sys_login_log` (
119 166 `id` bigint(20) NOT NULL GENERATED BY DEFAULT AS IDENTITY,
120 167 `log_type` bigint(4) NOT NULL,
... ...