+ * 菜单权限表 前端控制器 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@RestController +@RequestMapping("/sys-permission") +public class SysPermissionController { + +} diff --git a/src/main/java/com/msdw/tms/controller/SysRoleController.java b/src/main/java/com/msdw/tms/controller/SysRoleController.java new file mode 100644 index 0000000..76cef81 --- /dev/null +++ b/src/main/java/com/msdw/tms/controller/SysRoleController.java @@ -0,0 +1,20 @@ +package com.msdw.tms.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 用户角色表 前端控制器 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@RestController +@RequestMapping("/sys-role") +public class SysRoleController { + +} diff --git a/src/main/java/com/msdw/tms/controller/SysRolePermissionController.java b/src/main/java/com/msdw/tms/controller/SysRolePermissionController.java new file mode 100644 index 0000000..c678b79 --- /dev/null +++ b/src/main/java/com/msdw/tms/controller/SysRolePermissionController.java @@ -0,0 +1,20 @@ +package com.msdw.tms.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 角色权限中间表 前端控制器 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@RestController +@RequestMapping("/sys-role-permission") +public class SysRolePermissionController { + +} diff --git a/src/main/java/com/msdw/tms/controller/SysUserRoleController.java b/src/main/java/com/msdw/tms/controller/SysUserRoleController.java new file mode 100644 index 0000000..fb47650 --- /dev/null +++ b/src/main/java/com/msdw/tms/controller/SysUserRoleController.java @@ -0,0 +1,20 @@ +package com.msdw.tms.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 用户角色中间表 前端控制器 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@RestController +@RequestMapping("/sys-user-role") +public class SysUserRoleController { + +} diff --git a/src/main/java/com/msdw/tms/dao/SysPermissionMapper.java b/src/main/java/com/msdw/tms/dao/SysPermissionMapper.java new file mode 100644 index 0000000..a3f94f8 --- /dev/null +++ b/src/main/java/com/msdw/tms/dao/SysPermissionMapper.java @@ -0,0 +1,18 @@ +package com.msdw.tms.dao; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.msdw.tms.entity.SysPermission; +import org.apache.ibatis.annotations.Mapper; + +/** + *+ * 菜单权限表 Mapper 接口 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Mapper +public interface SysPermissionMapper extends BaseMapper+ * 用户角色表 Mapper 接口 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Mapper +public interface SysRoleMapper extends BaseMapper+ * 角色权限中间表 Mapper 接口 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Mapper +public interface SysRolePermissionMapper extends BaseMapper+ * 用户角色中间表 Mapper 接口 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Mapper +public interface SysUserRoleMapper extends BaseMapper+ * 菜单权限表 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Data +@TableName("sys_permission") +public class SysPermission implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 权限标识符 + */ + private String code; + + /** + * 名称 + */ + private String name; + + /** + * 父权限id + */ + private Long parentId; + + /** + * 层级 + */ + private Integer level; + + /** + * 是否是菜单:1、是,0、不是(0目前为按钮) + */ + private Integer menuOrNot; + + /** + * 状态:0、启用,1、禁用 + */ + private Integer status; + + /** + * 路径 + */ + private String url; + + /** + * 页面路径 + */ + private String menuUrl; + + /** + * 排序 + */ + private Integer sort; + + /** + * 图标 + */ + private String icon; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date motifyTime; +} diff --git a/src/main/java/com/msdw/tms/entity/SysRole.java b/src/main/java/com/msdw/tms/entity/SysRole.java new file mode 100644 index 0000000..6a6ffac --- /dev/null +++ b/src/main/java/com/msdw/tms/entity/SysRole.java @@ -0,0 +1,60 @@ +package com.msdw.tms.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.io.Serializable; + +/** + *+ * 用户角色表 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Data +@TableName("sys_role") +public class SysRole implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 角色名称 + */ + private String name; + + /** + * 角色描述 + */ + private String description; + + /** + * 是否删除:0、未删除,1、删除 + */ + private Integer delOrNot; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date motifyTime; + + /** + * 编码 + */ + private String code; +} diff --git a/src/main/java/com/msdw/tms/entity/SysRolePermission.java b/src/main/java/com/msdw/tms/entity/SysRolePermission.java new file mode 100644 index 0000000..b4add0e --- /dev/null +++ b/src/main/java/com/msdw/tms/entity/SysRolePermission.java @@ -0,0 +1,39 @@ +package com.msdw.tms.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.io.Serializable; + +/** + *+ * 角色权限中间表 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Data +@TableName("sys_role_permission") +public class SysRolePermission implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 角色id + */ + private Long roleId; + + /** + * 权限id + */ + private Long permissionId; +} diff --git a/src/main/java/com/msdw/tms/entity/SysUserRole.java b/src/main/java/com/msdw/tms/entity/SysUserRole.java new file mode 100644 index 0000000..aa886f5 --- /dev/null +++ b/src/main/java/com/msdw/tms/entity/SysUserRole.java @@ -0,0 +1,39 @@ +package com.msdw.tms.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.io.Serializable; + +/** + *+ * 用户角色中间表 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Data +@TableName("sys_user_role") +public class SysUserRole implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 用户id + */ + private Long userId; + + /** + * 角色id + */ + private Long roleId; +} diff --git a/src/main/java/com/msdw/tms/service/ISysPermissionService.java b/src/main/java/com/msdw/tms/service/ISysPermissionService.java new file mode 100644 index 0000000..0786537 --- /dev/null +++ b/src/main/java/com/msdw/tms/service/ISysPermissionService.java @@ -0,0 +1,16 @@ +package com.msdw.tms.service; + +import com.msdw.tms.entity.SysPermission; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *+ * 菜单权限表 服务类 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +public interface ISysPermissionService extends IService+ * 角色权限中间表 服务类 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +public interface ISysRolePermissionService extends IService+ * 用户角色表 服务类 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +public interface ISysRoleService extends IService+ * 用户角色中间表 服务类 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +public interface ISysUserRoleService extends IService+ * 菜单权限表 服务实现类 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Service +public class SysPermissionServiceImpl extends ServiceImpl+ * 角色权限中间表 服务实现类 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Service +public class SysRolePermissionServiceImpl extends ServiceImpl+ * 用户角色表 服务实现类 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Service +public class SysRoleServiceImpl extends ServiceImpl+ * 用户角色中间表 服务实现类 + *
+ * + * @author Qyq + * @since 2021-02-24 + */ +@Service +public class SysUserRoleServiceImpl extends ServiceImpl