diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysDept.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysDept.java new file mode 100644 index 0000000000..70d3f546a3 --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysDept.java @@ -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; + +/** + *

+ * 部门 + *

+ * + * @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; + + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysDict.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysDict.java new file mode 100644 index 0000000000..40a4da4071 --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysDict.java @@ -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; + +/** + *

+ * 数据字典 + *

+ * + * @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; + + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysDictDetail.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysDictDetail.java new file mode 100644 index 0000000000..cd37343fc7 --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysDictDetail.java @@ -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; + +/** + *

+ * 数据字典详情 + *

+ * + * @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; + + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysMenu.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysMenu.java new file mode 100644 index 0000000000..31bb34dece --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysMenu.java @@ -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; + +/** + *

+ * 系统菜单 + *

+ * + * @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; + + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysRole.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysRole.java new file mode 100644 index 0000000000..72fbaf5011 --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysRole.java @@ -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; + +/** + *

+ * 角色表 + *

+ * + * @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; + + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysUser.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysUser.java new file mode 100644 index 0000000000..1c52f712a5 --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysUser.java @@ -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; + +/** + *

+ * 系统用户 + *

+ * + * @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; + + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysUsersRoles.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysUsersRoles.java new file mode 100644 index 0000000000..eea20d796e --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/entity/SysUsersRoles.java @@ -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; + +/** + *

+ * 用户角色关联 + *

+ * + * @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; + + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysDeptMapper.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysDeptMapper.java new file mode 100644 index 0000000000..49e26cd054 --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysDeptMapper.java @@ -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; + + +/** + *

+ * 部门 Mapper 接口 + *

+ * + * @author cyw + * @since 2021-02-19 +*/ +@Mapper +public interface SysDeptMapper extends BaseMapper { + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysDictDetailMapper.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysDictDetailMapper.java new file mode 100644 index 0000000000..f61d3c8baf --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysDictDetailMapper.java @@ -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; + + +/** + *

+ * 数据字典详情 Mapper 接口 + *

+ * + * @author cyw + * @since 2021-02-19 +*/ +@Mapper +public interface SysDictDetailMapper extends BaseMapper { + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysDictMapper.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysDictMapper.java new file mode 100644 index 0000000000..cc76b90154 --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysDictMapper.java @@ -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; + + +/** + *

+ * 数据字典 Mapper 接口 + *

+ * + * @author cyw + * @since 2021-02-19 +*/ +@Mapper +public interface SysDictMapper extends BaseMapper { + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysMenuMapper.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysMenuMapper.java new file mode 100644 index 0000000000..9511c565b4 --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysMenuMapper.java @@ -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; + + +/** + *

+ * 系统菜单 Mapper 接口 + *

+ * + * @author cyw + * @since 2021-02-19 +*/ +@Mapper +public interface SysMenuMapper extends BaseMapper { + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysRoleMapper.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysRoleMapper.java new file mode 100644 index 0000000000..1485e2e59a --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysRoleMapper.java @@ -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; + + +/** + *

+ * 角色表 Mapper 接口 + *

+ * + * @author cyw + * @since 2021-02-19 +*/ +@Mapper +public interface SysRoleMapper extends BaseMapper { + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysUserMapper.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysUserMapper.java new file mode 100644 index 0000000000..a077e0301b --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysUserMapper.java @@ -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; + + +/** + *

+ * 系统用户 Mapper 接口 + *

+ * + * @author cyw + * @since 2021-02-19 +*/ +@Mapper +public interface SysUserMapper extends BaseMapper { + +} diff --git a/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysUsersRolesMapper.java b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysUsersRolesMapper.java new file mode 100644 index 0000000000..9d41d4da10 --- /dev/null +++ b/fit2cloud-commons/fit2cloud-common-auth/src/main/java/com/fit2cloud/commons/auth/mapper/SysUsersRolesMapper.java @@ -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; + + +/** + *

+ * 用户角色关联 Mapper 接口 + *

+ * + * @author cyw + * @since 2021-02-19 +*/ +@Mapper +public interface SysUsersRolesMapper extends BaseMapper { + +} diff --git a/fit2cloud-view/src/utils/token.js b/fit2cloud-view/src/utils/token.js index 21195b9df3..2738348823 100644 --- a/fit2cloud-view/src/utils/token.js +++ b/fit2cloud-view/src/utils/token.js @@ -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)