feat: 添加系统类

This commit is contained in:
fit2cloud-chenyw 2021-02-19 14:48:00 +08:00
parent 60c525d2f4
commit 2bddae2e33
15 changed files with 748 additions and 1 deletions

View File

@ -0,0 +1,88 @@
package com.fit2cloud.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 部门
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_dept")
public class SysDept implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(value = "dept_id", type = IdType.AUTO)
private Long deptId;
/**
* 上级部门
*/
@TableField("pid")
private Long pid;
/**
* 子部门数目
*/
@TableField("sub_count")
private Integer subCount;
/**
* 名称
*/
@TableField("name")
private String name;
/**
* 排序
*/
@TableField("dept_sort")
private Integer deptSort;
/**
* 状态
*/
@TableField("enabled")
private Boolean enabled;
/**
* 创建者
*/
@TableField("create_by")
private String createBy;
/**
* 更新者
*/
@TableField("update_by")
private String updateBy;
/**
* 创建日期
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,70 @@
package com.fit2cloud.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 数据字典
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_dict")
public class SysDict implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(value = "dict_id", type = IdType.AUTO)
private Long dictId;
/**
* 字典名称
*/
@TableField("name")
private String name;
/**
* 描述
*/
@TableField("description")
private String description;
/**
* 创建者
*/
@TableField("create_by")
private String createBy;
/**
* 更新者
*/
@TableField("update_by")
private String updateBy;
/**
* 创建日期
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,82 @@
package com.fit2cloud.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 数据字典详情
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_dict_detail")
public class SysDictDetail implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(value = "detail_id", type = IdType.AUTO)
private Long detailId;
/**
* 字典id
*/
@TableField("dict_id")
private Long dictId;
/**
* 字典标签
*/
@TableField("label")
private String label;
/**
* 字典值
*/
@TableField("value")
private String value;
/**
* 排序
*/
@TableField("dict_sort")
private Integer dictSort;
/**
* 创建者
*/
@TableField("create_by")
private String createBy;
/**
* 更新者
*/
@TableField("update_by")
private String updateBy;
/**
* 创建日期
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,136 @@
package com.fit2cloud.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 系统菜单
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_menu")
public class SysMenu implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(value = "menu_id", type = IdType.AUTO)
private Long menuId;
/**
* 上级菜单ID
*/
@TableField("pid")
private Long pid;
/**
* 子菜单数目
*/
@TableField("sub_count")
private Integer subCount;
/**
* 菜单类型
*/
@TableField("type")
private Integer type;
/**
* 菜单标题
*/
@TableField("title")
private String title;
/**
* 组件名称
*/
@TableField("name")
private String name;
/**
* 组件
*/
@TableField("component")
private String component;
/**
* 排序
*/
@TableField("menu_sort")
private Integer menuSort;
/**
* 图标
*/
@TableField("icon")
private String icon;
/**
* 链接地址
*/
@TableField("path")
private String path;
/**
* 是否外链
*/
@TableField("i_frame")
private Boolean iFrame;
/**
* 缓存
*/
@TableField("cache")
private Boolean cache;
/**
* 隐藏
*/
@TableField("hidden")
private Boolean hidden;
/**
* 权限
*/
@TableField("permission")
private String permission;
/**
* 创建者
*/
@TableField("create_by")
private String createBy;
/**
* 更新者
*/
@TableField("update_by")
private String updateBy;
/**
* 创建日期
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,70 @@
package com.fit2cloud.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 角色表
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_role")
public class SysRole implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(value = "role_id", type = IdType.AUTO)
private Long roleId;
/**
* 名称
*/
@TableField("name")
private String name;
/**
* 描述
*/
@TableField("description")
private String description;
/**
* 创建者
*/
@TableField("create_by")
private String createBy;
/**
* 更新者
*/
@TableField("update_by")
private String updateBy;
/**
* 创建日期
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,130 @@
package com.fit2cloud.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 系统用户
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_user")
public class SysUser implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(value = "user_id", type = IdType.AUTO)
private Long userId;
/**
* 部门名称
*/
@TableField("dept_id")
private Long deptId;
/**
* 用户名
*/
@TableField("username")
private String username;
/**
* 昵称
*/
@TableField("nick_name")
private String nickName;
/**
* 性别
*/
@TableField("gender")
private String gender;
/**
* 手机号码
*/
@TableField("phone")
private String phone;
/**
* 邮箱
*/
@TableField("email")
private String email;
/**
* 头像地址
*/
@TableField("avatar_name")
private String avatarName;
/**
* 头像真实路径
*/
@TableField("avatar_path")
private String avatarPath;
/**
* 密码
*/
@TableField("password")
private String password;
/**
* 是否为admin账号
*/
@TableField("is_admin")
private Boolean isAdmin;
/**
* 状态1启用0禁用
*/
@TableField("enabled")
private Long enabled;
/**
* 创建者
*/
@TableField("create_by")
private String createBy;
/**
* 更新着
*/
@TableField("update_by")
private String updateBy;
/**
* 修改密码的时间
*/
@TableField("pwd_reset_time")
private LocalDateTime pwdResetTime;
/**
* 创建日期
*/
@TableField("create_time")
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField("update_time")
private LocalDateTime updateTime;
}

View File

@ -0,0 +1,38 @@
package com.fit2cloud.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 用户角色关联
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_users_roles")
public class SysUsersRoles implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户ID
*/
@TableId("user_id")
private Long userId;
/**
* 角色ID
*/
@TableField("role_id")
private Long roleId;
}

View File

@ -0,0 +1,19 @@
package com.fit2cloud.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysDept;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 部门 Mapper 接口
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Mapper
public interface SysDeptMapper extends BaseMapper<SysDept> {
}

View File

@ -0,0 +1,19 @@
package com.fit2cloud.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysDictDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 数据字典详情 Mapper 接口
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Mapper
public interface SysDictDetailMapper extends BaseMapper<SysDictDetail> {
}

View File

@ -0,0 +1,19 @@
package com.fit2cloud.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysDict;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 数据字典 Mapper 接口
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Mapper
public interface SysDictMapper extends BaseMapper<SysDict> {
}

View File

@ -0,0 +1,19 @@
package com.fit2cloud.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 系统菜单 Mapper 接口
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Mapper
public interface SysMenuMapper extends BaseMapper<SysMenu> {
}

View File

@ -0,0 +1,19 @@
package com.fit2cloud.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 角色表 Mapper 接口
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {
}

View File

@ -0,0 +1,19 @@
package com.fit2cloud.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 系统用户 Mapper 接口
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
}

View File

@ -0,0 +1,19 @@
package com.fit2cloud.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysUsersRoles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* 用户角色关联 Mapper 接口
* </p>
*
* @author cyw
* @since 2021-02-19
*/
@Mapper
public interface SysUsersRolesMapper extends BaseMapper<SysUsersRoles> {
}

View File

@ -1,6 +1,6 @@
import Cookies from 'js-cookie'
export const TokenKey = 'App-Token' // 自行修改
export const TokenKey = 'Authorization' // 自行修改
export function getToken() {
return Cookies.get(TokenKey)