Merge branch 'dev' into 2.0.x
# Conflicts: # continew-admin-common/src/main/java/top/charles7c/cnadmin/common/model/query/SortQuery.java # continew-admin-monitor/src/main/java/top/charles7c/cnadmin/monitor/model/query/LoginLogQuery.java # continew-admin-monitor/src/main/java/top/charles7c/cnadmin/monitor/model/query/OperationLogQuery.java # continew-admin-monitor/src/main/java/top/charles7c/cnadmin/monitor/model/query/SystemLogQuery.java # continew-admin-system/src/main/java/top/charles7c/cnadmin/auth/model/query/OnlineUserQuery.java # continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/query/DeptQuery.java # continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/query/MenuQuery.java # continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/query/RoleQuery.java # continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/query/UserQuery.java
This commit is contained in:
commit
3738fa4872
@ -75,7 +75,7 @@ public abstract class BaseController<S extends BaseService<V, D, Q, C>, V, D, Q,
|
||||
@Operation(summary = "分页查询列表")
|
||||
@ResponseBody
|
||||
@GetMapping
|
||||
public R<PageDataVO<V>> page(@Validated Q query, @Validated PageQuery pageQuery) {
|
||||
public R<PageDataVO<V>> page(Q query, @Validated PageQuery pageQuery) {
|
||||
this.checkPermission("list");
|
||||
PageDataVO<V> pageDataVO = baseService.page(query, pageQuery);
|
||||
return R.ok(pageDataVO);
|
||||
@ -93,7 +93,7 @@ public abstract class BaseController<S extends BaseService<V, D, Q, C>, V, D, Q,
|
||||
@Operation(summary = "查询树列表")
|
||||
@ResponseBody
|
||||
@GetMapping("/tree")
|
||||
public R<List<Tree<Long>>> tree(@Validated Q query, @Validated SortQuery sortQuery) {
|
||||
public R<List<Tree<Long>>> tree(Q query, SortQuery sortQuery) {
|
||||
this.checkPermission("list");
|
||||
List<Tree<Long>> list = baseService.tree(query, sortQuery, false);
|
||||
return R.ok(list);
|
||||
@ -111,7 +111,7 @@ public abstract class BaseController<S extends BaseService<V, D, Q, C>, V, D, Q,
|
||||
@Operation(summary = "查询列表")
|
||||
@ResponseBody
|
||||
@GetMapping("/list")
|
||||
public R<List<V>> list(@Validated Q query, @Validated SortQuery sortQuery) {
|
||||
public R<List<V>> list(Q query, SortQuery sortQuery) {
|
||||
this.checkPermission("list");
|
||||
List<V> list = baseService.list(query, sortQuery);
|
||||
return R.ok(list);
|
||||
@ -197,7 +197,7 @@ public abstract class BaseController<S extends BaseService<V, D, Q, C>, V, D, Q,
|
||||
*/
|
||||
@Operation(summary = "导出数据")
|
||||
@GetMapping("/export")
|
||||
public void export(@Validated Q query, @Validated SortQuery sortQuery, HttpServletResponse response) {
|
||||
public void export(Q query, SortQuery sortQuery, HttpServletResponse response) {
|
||||
this.checkPermission("export");
|
||||
baseService.export(query, sortQuery, response);
|
||||
}
|
||||
|
@ -32,7 +32,10 @@ import top.charles7c.cnadmin.common.model.dto.LoginUser;
|
||||
import top.charles7c.cnadmin.common.model.dto.RoleDTO;
|
||||
import top.charles7c.cnadmin.common.util.helper.LoginHelper;
|
||||
|
||||
import net.sf.jsqlparser.expression.*;
|
||||
import net.sf.jsqlparser.expression.Expression;
|
||||
import net.sf.jsqlparser.expression.Function;
|
||||
import net.sf.jsqlparser.expression.LongValue;
|
||||
import net.sf.jsqlparser.expression.Parenthesis;
|
||||
import net.sf.jsqlparser.expression.operators.conditional.AndExpression;
|
||||
import net.sf.jsqlparser.expression.operators.conditional.OrExpression;
|
||||
import net.sf.jsqlparser.expression.operators.relational.EqualsTo;
|
||||
@ -45,7 +48,7 @@ import net.sf.jsqlparser.statement.select.SelectExpressionItem;
|
||||
import net.sf.jsqlparser.statement.select.SubSelect;
|
||||
|
||||
/**
|
||||
* 数据权限处理器实现类
|
||||
* 数据权限处理器实现
|
||||
* <p>
|
||||
* 来源:<a href="https://gitee.com/baomidou/mybatis-plus/issues/I37I90">DataPermissionInterceptor 如何使用?</a>
|
||||
* </p>
|
||||
|
@ -50,30 +50,24 @@ public class PageQuery extends SortQuery {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
/** 默认页码:1 */
|
||||
private static final int DEFAULT_PAGE = 1;
|
||||
/** 默认每页条数:10 */
|
||||
private static final int DEFAULT_SIZE = 10;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
@Schema(description = "页码")
|
||||
@Min(value = 1, message = "页码最小值为 {value}")
|
||||
private Integer page;
|
||||
private Integer page = DEFAULT_PAGE;
|
||||
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
@Schema(description = "每页条数")
|
||||
@Range(min = 1, max = 1000, message = "每页条数(取值范围 {min}-{max})")
|
||||
private Integer size;
|
||||
|
||||
/** 默认页码:1 */
|
||||
private static final int DEFAULT_PAGE = 1;
|
||||
/** 默认每页条数:10 */
|
||||
private static final int DEFAULT_SIZE = 10;
|
||||
|
||||
public PageQuery(Integer page, Integer size) {
|
||||
this.setPage(page);
|
||||
this.setSize(size);
|
||||
}
|
||||
private Integer size = DEFAULT_SIZE;
|
||||
|
||||
/**
|
||||
* 基于分页查询条件转换为 MyBatis Plus 分页条件
|
||||
@ -95,12 +89,4 @@ public class PageQuery extends SortQuery {
|
||||
}
|
||||
return mybatisPage;
|
||||
}
|
||||
|
||||
public void setPage(Integer page) {
|
||||
this.page = page == null ? DEFAULT_PAGE : page;
|
||||
}
|
||||
|
||||
public void setSize(Integer size) {
|
||||
this.size = size == null ? DEFAULT_SIZE : size;
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
package top.charles7c.cnadmin.common.model.query;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -25,7 +24,6 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.data.domain.Sort;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
@ -40,11 +38,9 @@ import top.charles7c.cnadmin.common.constant.StringConsts;
|
||||
* @since 2023/2/12 21:30
|
||||
*/
|
||||
@Data
|
||||
@ParameterObject
|
||||
@Schema(description = "排序查询条件")
|
||||
public class SortQuery implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
|
@ -25,7 +25,6 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.Query;
|
||||
@ -38,7 +37,6 @@ import top.charles7c.cnadmin.common.constant.StringConsts;
|
||||
* @since 2023/1/16 23:25
|
||||
*/
|
||||
@Data
|
||||
@ParameterObject
|
||||
@Schema(description = "登录日志查询条件")
|
||||
public class LoginLogQuery implements Serializable {
|
||||
|
||||
|
@ -25,7 +25,6 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.Query;
|
||||
@ -38,7 +37,6 @@ import top.charles7c.cnadmin.common.constant.StringConsts;
|
||||
* @since 2023/1/15 11:43
|
||||
*/
|
||||
@Data
|
||||
@ParameterObject
|
||||
@Schema(description = "操作日志查询条件")
|
||||
public class OperationLogQuery implements Serializable {
|
||||
|
||||
|
@ -25,7 +25,6 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.Query;
|
||||
@ -38,7 +37,6 @@ import top.charles7c.cnadmin.common.constant.StringConsts;
|
||||
* @since 2023/1/17 23:31
|
||||
*/
|
||||
@Data
|
||||
@ParameterObject
|
||||
@Schema(description = "系统日志查询条件")
|
||||
public class SystemLogQuery implements Serializable {
|
||||
|
||||
|
@ -49,7 +49,7 @@ import top.charles7c.cnadmin.monitor.model.vo.*;
|
||||
import top.charles7c.cnadmin.monitor.service.LogService;
|
||||
|
||||
/**
|
||||
* 系统日志业务实现类
|
||||
* 系统日志业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2022/12/23 20:12
|
||||
|
@ -25,7 +25,6 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import top.charles7c.cnadmin.common.constant.StringConsts;
|
||||
@ -37,7 +36,6 @@ import top.charles7c.cnadmin.common.constant.StringConsts;
|
||||
* @since 2023/1/20 23:07
|
||||
*/
|
||||
@Data
|
||||
@ParameterObject
|
||||
@Schema(description = "在线用户查询条件")
|
||||
public class OnlineUserQuery implements Serializable {
|
||||
|
||||
|
@ -53,7 +53,7 @@ import top.charles7c.cnadmin.system.service.RoleService;
|
||||
import top.charles7c.cnadmin.system.service.UserService;
|
||||
|
||||
/**
|
||||
* 登录业务实现类
|
||||
* 登录业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2022/12/21 21:49
|
||||
|
@ -41,7 +41,7 @@ import top.charles7c.cnadmin.common.model.vo.PageDataVO;
|
||||
import top.charles7c.cnadmin.common.util.helper.LoginHelper;
|
||||
|
||||
/**
|
||||
* 在线用户业务实现类
|
||||
* 在线用户业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @author Lion Li(RuoYi-Vue-Plus)
|
||||
|
@ -30,7 +30,7 @@ import top.charles7c.cnadmin.system.service.MenuService;
|
||||
import top.charles7c.cnadmin.system.service.RoleService;
|
||||
|
||||
/**
|
||||
* 权限业务实现类
|
||||
* 权限业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/3/2 20:40
|
||||
|
@ -23,8 +23,6 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.Query;
|
||||
|
||||
/**
|
||||
@ -34,7 +32,6 @@ import top.charles7c.cnadmin.common.annotation.Query;
|
||||
* @since 2023/1/22 17:52
|
||||
*/
|
||||
@Data
|
||||
@ParameterObject
|
||||
@Schema(description = "部门查询条件")
|
||||
public class DeptQuery implements Serializable {
|
||||
|
||||
|
@ -23,8 +23,6 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.Query;
|
||||
|
||||
/**
|
||||
@ -34,7 +32,6 @@ import top.charles7c.cnadmin.common.annotation.Query;
|
||||
* @since 2023/2/15 20:21
|
||||
*/
|
||||
@Data
|
||||
@ParameterObject
|
||||
@Schema(description = "菜单查询条件")
|
||||
public class MenuQuery implements Serializable {
|
||||
|
||||
|
@ -23,8 +23,6 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.Query;
|
||||
|
||||
/**
|
||||
@ -34,7 +32,6 @@ import top.charles7c.cnadmin.common.annotation.Query;
|
||||
* @since 2023/2/8 23:04
|
||||
*/
|
||||
@Data
|
||||
@ParameterObject
|
||||
@Schema(description = "角色查询条件")
|
||||
public class RoleQuery implements Serializable {
|
||||
|
||||
|
@ -25,7 +25,6 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.Query;
|
||||
@ -38,7 +37,6 @@ import top.charles7c.cnadmin.common.constant.StringConsts;
|
||||
* @since 2023/2/20 21:01
|
||||
*/
|
||||
@Data
|
||||
@ParameterObject
|
||||
@Schema(description = "用户查询条件")
|
||||
public class UserQuery implements Serializable {
|
||||
|
||||
|
@ -48,7 +48,7 @@ import top.charles7c.cnadmin.system.service.RoleDeptService;
|
||||
import top.charles7c.cnadmin.system.service.UserService;
|
||||
|
||||
/**
|
||||
* 部门业务实现类
|
||||
* 部门业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/1/22 17:55
|
||||
|
@ -36,7 +36,7 @@ import top.charles7c.cnadmin.system.model.vo.MenuVO;
|
||||
import top.charles7c.cnadmin.system.service.MenuService;
|
||||
|
||||
/**
|
||||
* 菜单业务实现类
|
||||
* 菜单业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/2/15 20:30
|
||||
|
@ -31,7 +31,7 @@ import top.charles7c.cnadmin.system.model.entity.RoleDeptDO;
|
||||
import top.charles7c.cnadmin.system.service.RoleDeptService;
|
||||
|
||||
/**
|
||||
* 角色和部门业务实现类
|
||||
* 角色和部门业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/2/19 10:47
|
||||
|
@ -32,7 +32,7 @@ import top.charles7c.cnadmin.system.model.entity.RoleMenuDO;
|
||||
import top.charles7c.cnadmin.system.service.RoleMenuService;
|
||||
|
||||
/**
|
||||
* 角色和菜单业务实现类
|
||||
* 角色和菜单业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/2/19 10:43
|
||||
|
@ -47,7 +47,7 @@ import top.charles7c.cnadmin.system.model.vo.RoleVO;
|
||||
import top.charles7c.cnadmin.system.service.*;
|
||||
|
||||
/**
|
||||
* 角色业务实现类
|
||||
* 角色业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/2/8 23:17
|
||||
|
@ -31,7 +31,7 @@ import top.charles7c.cnadmin.system.model.entity.UserRoleDO;
|
||||
import top.charles7c.cnadmin.system.service.UserRoleService;
|
||||
|
||||
/**
|
||||
* 用户和角色业务实现类
|
||||
* 用户和角色业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2023/2/20 21:30
|
||||
|
@ -63,7 +63,7 @@ import top.charles7c.cnadmin.system.service.UserRoleService;
|
||||
import top.charles7c.cnadmin.system.service.UserService;
|
||||
|
||||
/**
|
||||
* 用户业务实现类
|
||||
* 用户业务实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2022/12/21 21:49
|
||||
|
@ -71,21 +71,21 @@ public class CommonController {
|
||||
|
||||
@Operation(summary = "查询部门树", description = "查询树结构的部门列表")
|
||||
@GetMapping("/tree/dept")
|
||||
public R<List<Tree<Long>>> listDeptTree(@Validated DeptQuery query, @Validated SortQuery sortQuery) {
|
||||
public R<List<Tree<Long>>> listDeptTree(DeptQuery query, SortQuery sortQuery) {
|
||||
List<Tree<Long>> treeList = deptService.tree(query, sortQuery, true);
|
||||
return R.ok(treeList);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询菜单树", description = "查询树结构的菜单列表")
|
||||
@GetMapping("/tree/menu")
|
||||
public R<List<Tree<Long>>> listMenuTree(@Validated MenuQuery query, @Validated SortQuery sortQuery) {
|
||||
public R<List<Tree<Long>>> listMenuTree(MenuQuery query, SortQuery sortQuery) {
|
||||
List<Tree<Long>> treeList = menuService.tree(query, sortQuery, true);
|
||||
return R.ok(treeList);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询角色字典", description = "查询角色字典列表")
|
||||
@GetMapping("/dict/role")
|
||||
public R<List<LabelValueVO<Long>>> listRoleDict(@Validated RoleQuery query, @Validated SortQuery sortQuery) {
|
||||
public R<List<LabelValueVO<Long>>> listRoleDict(RoleQuery query, SortQuery sortQuery) {
|
||||
List<RoleVO> list = roleService.list(query, sortQuery);
|
||||
List<LabelValueVO<Long>> labelValueVOList = roleService.buildDict(list);
|
||||
return R.ok(labelValueVOList);
|
||||
|
@ -57,7 +57,7 @@ public class LogController {
|
||||
@Log(module = "登录日志")
|
||||
@Operation(summary = "分页查询登录日志列表")
|
||||
@GetMapping("/login")
|
||||
public R<PageDataVO<LoginLogVO>> page(@Validated LoginLogQuery query, @Validated PageQuery pageQuery) {
|
||||
public R<PageDataVO<LoginLogVO>> page(LoginLogQuery query, @Validated PageQuery pageQuery) {
|
||||
PageDataVO<LoginLogVO> pageDataVO = logService.page(query, pageQuery);
|
||||
return R.ok(pageDataVO);
|
||||
}
|
||||
@ -65,7 +65,7 @@ public class LogController {
|
||||
@Log(module = "操作日志")
|
||||
@Operation(summary = "分页查询操作日志列表")
|
||||
@GetMapping("/operation")
|
||||
public R<PageDataVO<OperationLogVO>> page(@Validated OperationLogQuery query, @Validated PageQuery pageQuery) {
|
||||
public R<PageDataVO<OperationLogVO>> page(OperationLogQuery query, @Validated PageQuery pageQuery) {
|
||||
PageDataVO<OperationLogVO> pageDataVO = logService.page(query, pageQuery);
|
||||
return R.ok(pageDataVO);
|
||||
}
|
||||
@ -73,7 +73,7 @@ public class LogController {
|
||||
@Log(module = "系统日志")
|
||||
@Operation(summary = "分页查询系统日志列表")
|
||||
@GetMapping("/system")
|
||||
public R<PageDataVO<SystemLogVO>> page(@Validated SystemLogQuery query, @Validated PageQuery pageQuery) {
|
||||
public R<PageDataVO<SystemLogVO>> page(SystemLogQuery query, @Validated PageQuery pageQuery) {
|
||||
PageDataVO<SystemLogVO> pageDataVO = logService.page(query, pageQuery);
|
||||
return R.ok(pageDataVO);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class OnlineUserController {
|
||||
@Operation(summary = "分页查询列表")
|
||||
@SaCheckPermission("monitor:online:user:list")
|
||||
@GetMapping
|
||||
public R<PageDataVO<OnlineUserVO>> page(@Validated OnlineUserQuery query, @Validated PageQuery pageQuery) {
|
||||
public R<PageDataVO<OnlineUserVO>> page(OnlineUserQuery query, @Validated PageQuery pageQuery) {
|
||||
return R.ok(onlineUserService.page(query, pageQuery));
|
||||
}
|
||||
|
||||
|
@ -128,6 +128,10 @@ rsa:
|
||||
springdoc:
|
||||
swagger-ui:
|
||||
enabled: false
|
||||
## 接口文档增强配置
|
||||
knife4j:
|
||||
# 开启生产环境屏蔽
|
||||
production: true
|
||||
|
||||
--- ### 文件上传配置
|
||||
spring.servlet:
|
||||
|
@ -47,6 +47,9 @@ logging:
|
||||
|
||||
--- ### 接口文档配置
|
||||
springdoc:
|
||||
# 设置对象型参数的展示形式(设为 true 表示将对象型参数平展开,即对象内的属性直接作为参数展示而不是嵌套在对象内,默认为 false)
|
||||
# 如果不添加该全局配置,可以在需要如此处理的对象参数类上使用 @ParameterObject
|
||||
default-flat-param-object: true
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
tags-sorter: alpha
|
||||
|
@ -3,11 +3,11 @@
|
||||
-- changeset Charles7c:1
|
||||
CREATE TABLE IF NOT EXISTS `sys_menu` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`title` varchar(255) NOT NULL COMMENT '菜单标题',
|
||||
`title` varchar(50) NOT NULL COMMENT '菜单标题',
|
||||
`parent_id` bigint(20) UNSIGNED DEFAULT 0 COMMENT '上级菜单ID',
|
||||
`type` tinyint(1) UNSIGNED DEFAULT 1 COMMENT '菜单类型(1:目录,2:菜单,3:按钮)',
|
||||
`path` varchar(512) DEFAULT NULL COMMENT '路由地址',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '组件名称',
|
||||
`name` varchar(50) DEFAULT NULL COMMENT '组件名称',
|
||||
`component` varchar(255) DEFAULT NULL COMMENT '组件路径',
|
||||
`icon` varchar(255) DEFAULT NULL COMMENT '菜单图标',
|
||||
`is_external` bit(1) DEFAULT b'0' COMMENT '是否外链',
|
||||
@ -28,7 +28,7 @@ CREATE TABLE IF NOT EXISTS `sys_menu` (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sys_dept` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(255) NOT NULL COMMENT '部门名称',
|
||||
`name` varchar(50) NOT NULL COMMENT '部门名称',
|
||||
`parent_id` bigint(20) UNSIGNED DEFAULT 0 COMMENT '上级部门ID',
|
||||
`ancestors` varchar(512) DEFAULT '' COMMENT '祖级列表',
|
||||
`description` varchar(512) DEFAULT NULL COMMENT '描述',
|
||||
@ -47,8 +47,8 @@ CREATE TABLE IF NOT EXISTS `sys_dept` (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sys_role` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(255) NOT NULL COMMENT '角色名称',
|
||||
`code` varchar(255) NOT NULL COMMENT '角色编码',
|
||||
`name` varchar(50) NOT NULL COMMENT '角色名称',
|
||||
`code` varchar(50) NOT NULL COMMENT '角色编码',
|
||||
`data_scope` tinyint(1) DEFAULT 4 COMMENT '数据权限(1:全部数据权限,2:本部门及以下数据权限,3:本部门数据权限,4:仅本人数据权限,5:自定义数据权限)',
|
||||
`description` varchar(512) DEFAULT NULL COMMENT '描述',
|
||||
`sort` int(11) UNSIGNED DEFAULT 999 COMMENT '角色排序',
|
||||
@ -77,12 +77,12 @@ CREATE TABLE IF NOT EXISTS `sys_role_dept` (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `sys_user` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`username` varchar(255) NOT NULL COMMENT '用户名',
|
||||
`nickname` varchar(255) DEFAULT NULL COMMENT '昵称',
|
||||
`username` varchar(50) NOT NULL COMMENT '用户名',
|
||||
`nickname` varchar(50) DEFAULT NULL COMMENT '昵称',
|
||||
`password` varchar(255) DEFAULT NULL COMMENT '密码',
|
||||
`gender` tinyint(1) UNSIGNED DEFAULT 0 COMMENT '性别(0:未知,1:男,2:女)',
|
||||
`email` varchar(255) DEFAULT NULL COMMENT '邮箱',
|
||||
`phone` varchar(255) DEFAULT NULL COMMENT '手机号码',
|
||||
`email` varchar(100) DEFAULT NULL COMMENT '邮箱',
|
||||
`phone` varchar(50) DEFAULT NULL COMMENT '手机号码',
|
||||
`avatar` varchar(255) DEFAULT NULL COMMENT '头像地址',
|
||||
`description` varchar(512) DEFAULT NULL COMMENT '描述',
|
||||
`status` tinyint(1) UNSIGNED DEFAULT 1 COMMENT '状态(1:启用,2:禁用)',
|
||||
@ -110,7 +110,7 @@ CREATE TABLE IF NOT EXISTS `sys_user_role` (
|
||||
CREATE TABLE IF NOT EXISTS `sys_log` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`description` varchar(255) NOT NULL COMMENT '日志描述',
|
||||
`module` varchar(255) NOT NULL COMMENT '所属模块',
|
||||
`module` varchar(50) NOT NULL COMMENT '所属模块',
|
||||
`request_url` varchar(512) NOT NULL COMMENT '请求URL',
|
||||
`request_method` varchar(10) NOT NULL COMMENT '请求方式',
|
||||
`request_headers` text DEFAULT NULL COMMENT '请求头',
|
||||
@ -120,9 +120,9 @@ CREATE TABLE IF NOT EXISTS `sys_log` (
|
||||
`response_body` mediumtext DEFAULT NULL COMMENT '响应体',
|
||||
`elapsed_time` bigint(20) UNSIGNED NOT NULL COMMENT '请求耗时(ms)',
|
||||
`status` tinyint(1) UNSIGNED DEFAULT 1 COMMENT '操作状态(1:成功,2:失败)',
|
||||
`client_ip` varchar(255) DEFAULT NULL COMMENT '客户端IP',
|
||||
`location` varchar(512) DEFAULT NULL COMMENT 'IP归属地',
|
||||
`browser` varchar(255) DEFAULT NULL COMMENT '浏览器',
|
||||
`client_ip` varchar(100) DEFAULT NULL COMMENT '客户端IP',
|
||||
`location` varchar(255) DEFAULT NULL COMMENT 'IP归属地',
|
||||
`browser` varchar(100) DEFAULT NULL COMMENT '浏览器',
|
||||
`error_msg` text DEFAULT NULL COMMENT '错误信息',
|
||||
`exception_detail` mediumtext DEFAULT NULL COMMENT '异常详情',
|
||||
`create_user` bigint(20) UNSIGNED DEFAULT NULL COMMENT '创建人',
|
||||
|
Loading…
Reference in New Issue
Block a user