refactor: 系统功能重构
This commit is contained in:
@@ -4,12 +4,17 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import com.youlai.system.common.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 部门表
|
||||
* 部门 实体
|
||||
*
|
||||
* @author Ray
|
||||
* @since 2024/06/23
|
||||
*/
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class SysDept extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
@@ -22,6 +27,11 @@ public class SysDept extends BaseEntity {
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 部门编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 父节点id
|
||||
*/
|
||||
@@ -38,17 +48,18 @@ public class SysDept extends BaseEntity {
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 状态(1:正常;0:禁用)
|
||||
* 状态(1-正常 0-禁用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 逻辑删除标识(1:已删除;0:未删除)
|
||||
* 创建人 ID
|
||||
*/
|
||||
private Integer deleted;
|
||||
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新人 ID
|
||||
*/
|
||||
private Long updateBy;
|
||||
|
||||
}
|
||||
@@ -1,63 +1,42 @@
|
||||
package com.youlai.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.youlai.system.common.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 字典数据表
|
||||
* 字典实体
|
||||
*
|
||||
* @author haoxr
|
||||
* @since 2022/12/17
|
||||
*/
|
||||
@Data
|
||||
public class SysDict implements Serializable {
|
||||
public class SysDict extends BaseEntity {
|
||||
/**
|
||||
* 主键
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字典类型编码
|
||||
*/
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 字典项名称
|
||||
* 类型名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 字典项值
|
||||
* 类型编码
|
||||
*/
|
||||
private String value;
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 状态(1:正常;0:禁用)
|
||||
* 状态(0:正常;1:禁用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否默认(1:是;0:否)
|
||||
*/
|
||||
private Integer defaulted;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -2,35 +2,47 @@ package com.youlai.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.youlai.system.common.base.BaseEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 字典类型实体
|
||||
* 字典项实体
|
||||
*
|
||||
* @author haoxr
|
||||
* @since 2022/12/17
|
||||
*/
|
||||
@Data
|
||||
public class SysDictType extends BaseEntity {
|
||||
public class SysDictItem implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
* 字典类ID
|
||||
*/
|
||||
private Long dictId;
|
||||
|
||||
/**
|
||||
* 字典项名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 类型编码
|
||||
* 字典项值
|
||||
*/
|
||||
private String code;
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 状态(0:正常;1:禁用)
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 状态(1-正常,0-禁用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
@@ -2,19 +2,21 @@ package com.youlai.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import com.youlai.system.common.base.BaseEntity;
|
||||
import com.youlai.system.common.enums.MenuTypeEnum;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 菜单实体对象
|
||||
* 菜单 实体
|
||||
*
|
||||
* @author haoxr
|
||||
* @author Ray
|
||||
* @since 2023/3/6
|
||||
*/
|
||||
@TableName(value ="sys_menu")
|
||||
@Data
|
||||
public class SysMenu extends BaseEntity {
|
||||
@Getter
|
||||
@Setter
|
||||
public class SysMenu {
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@@ -37,9 +39,14 @@ public class SysMenu extends BaseEntity {
|
||||
private MenuTypeEnum type;
|
||||
|
||||
/**
|
||||
* 路由路径(浏览器地址栏路径)
|
||||
* 路由名称(Vue Router 中定义的路由名称)
|
||||
*/
|
||||
private String path;
|
||||
private String routeName;
|
||||
|
||||
/**
|
||||
* 路由路径(Vue Router 中定义的 URL 路径)
|
||||
*/
|
||||
private String routePath;
|
||||
|
||||
/**
|
||||
* 组件路径(vue页面完整路径,省略.vue后缀)
|
||||
@@ -92,4 +99,14 @@ public class SysMenu extends BaseEntity {
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS)
|
||||
private String params;
|
||||
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -2,18 +2,21 @@ package com.youlai.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.youlai.system.common.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 角色表
|
||||
* 角色 实体
|
||||
*
|
||||
* @author Ray
|
||||
* @since 2024/6/23
|
||||
*/
|
||||
@TableName(value ="sys_role")
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class SysRole extends BaseEntity {
|
||||
/**
|
||||
*
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
@@ -34,17 +37,22 @@ public class SysRole extends BaseEntity {
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 角色状态(1-正常;0-停用)
|
||||
* 角色状态(1-正常 0-停用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 逻辑删除标识(0-未删除;1-已删除)
|
||||
*/
|
||||
private Integer deleted;
|
||||
|
||||
/**
|
||||
* 数据权限
|
||||
*/
|
||||
private Integer dataScope;
|
||||
|
||||
/**
|
||||
* 创建人 ID
|
||||
*/
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新人 ID
|
||||
*/
|
||||
private Long updateBy;
|
||||
}
|
||||
@@ -3,15 +3,17 @@ package com.youlai.system.model.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.youlai.system.common.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 用户表
|
||||
* 用户 实体
|
||||
*/
|
||||
@Data
|
||||
@Getter
|
||||
@Setter
|
||||
public class SysUser extends BaseEntity {
|
||||
/**
|
||||
*
|
||||
* 用户 ID
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
@@ -27,7 +29,7 @@ public class SysUser extends BaseEntity {
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 性别((1:男;2:女))
|
||||
* 性别((1-男 2-女 0-保密)
|
||||
*/
|
||||
private Integer gender;
|
||||
|
||||
@@ -52,7 +54,7 @@ public class SysUser extends BaseEntity {
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 用户状态((1:正常;0:禁用))
|
||||
* 状态((1-正常 0-禁用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
@@ -62,8 +64,12 @@ public class SysUser extends BaseEntity {
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 逻辑删除标识(0:未删除;1:已删除)
|
||||
* 创建人 ID
|
||||
*/
|
||||
private Integer deleted;
|
||||
private Long createBy;
|
||||
|
||||
/**
|
||||
* 更新人 ID
|
||||
*/
|
||||
private Long updateBy;
|
||||
}
|
||||
Reference in New Issue
Block a user