Add group role tables

This commit is contained in:
2023-10-25 11:02:40 +08:00
parent 087e6ae8c3
commit 979d1d8fb8
75 changed files with 1172 additions and 30 deletions

View File

@@ -7,7 +7,7 @@ import org.slf4j.LoggerFactory
import org.springframework.security.crypto.password.PasswordEncoder
import org.springframework.stereotype.Component
import top.fatweb.api.entity.permission.User
import top.fatweb.api.service.IUserService
import top.fatweb.api.service.permission.IUserService
import kotlin.random.Random
@Component

View File

@@ -0,0 +1,43 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import java.io.Serializable
/**
* <p>
* 页面元素
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_element")
class Element : Serializable {
@TableId("id")
var id: Long? = null
/**
* 元素名
*/
@TableField("name")
var name: String? = null
/**
* 权限ID
*/
@TableField("power_id")
var powerId: Long? = null
/**
* 菜单ID
*/
@TableField("menu_id")
var menuId: Long? = null
override fun toString(): String {
return "Element(id=$id, name=$name, powerId=$powerId, menuId=$menuId)"
}
}

View File

@@ -0,0 +1,46 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.*
import java.io.Serializable
/**
* <p>
* 用户组
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_group")
class Group : Serializable {
@TableId("id")
var id: Long? = null
/**
* 用户组名
*/
@TableField("name")
var name: String? = null
/**
* 启用
*/
@TableField("enable")
var enable: Int? = null
@TableField("deleted")
@TableLogic
var deleted: Long? = null
@TableField("version")
@Version
var version: Int? = null
@TableField(exist = false)
var roles: List<Role>? = null
override fun toString(): String {
return "Group(id=$id, name=$name, enable=$enable, deleted=$deleted, version=$version, roles=$roles)"
}
}

View File

@@ -0,0 +1,49 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import java.io.Serializable
/**
* <p>
* 菜单
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_menu")
class Menu : Serializable {
@TableId("id")
var id: Long? = null
/**
* 菜单名
*/
@TableField("name")
var name: String? = null
/**
* URL
*/
@TableField("url")
var url: String? = null
/**
* 权限ID
*/
@TableField("power_id")
var powerId: Long? = null
/**
* 父ID
*/
@TableField("parent_id")
var parentId: Long? = null
override fun toString(): String {
return "Menu(id=$id, name=$name, url=$url, powerId=$powerId, parentId=$parentId)"
}
}

View File

@@ -0,0 +1,55 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import java.io.Serializable
/**
* <p>
* 功能
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_operation")
class Operation : Serializable {
@TableId("id")
var id: Long? = null
/**
* 功能名
*/
@TableField("name")
var name: String? = null
/**
* 功能编码
*/
@TableField("code")
var code: String? = null
/**
* 权限ID
*/
@TableField("power_id")
var powerId: Long? = null
/**
* 父ID
*/
@TableField("parent_id")
var parentId: Long? = null
/**
* 页面元素ID
*/
@TableField("element_id")
var elementId: Long? = null
override fun toString(): String {
return "Operation(id=$id, name=$name, code=$code, powerId=$powerId, parentId=$parentId, elementId=$elementId)"
}
}

View File

@@ -0,0 +1,31 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import java.io.Serializable
/**
* <p>
* 权限
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_power")
class Power : Serializable {
@TableId("id")
var id: Long? = null
/**
* 权限类型
*/
@TableField("type_id")
var typeId: Long? = null
override fun toString(): String {
return "Power(id=$id, typeId=$typeId)"
}
}

View File

@@ -0,0 +1,43 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.*
import java.io.Serializable
/**
* <p>
* 中间表-权限-角色
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_power_role")
class PowerRole : Serializable {
@TableId("id")
var id: Long? = null
/**
* 权限
*/
@TableField("power_id")
var powerId: Long? = null
/**
* 角色
*/
@TableField("role_id")
var roleId: Long? = null
@TableField("deleted")
@TableLogic
var deleted: Long? = null
@TableField("version")
@Version
var version: Int? = null
override fun toString(): String {
return "PowerRole(id=$id, powerId=$powerId, roleId=$roleId, deleted=$deleted, version=$version)"
}
}

View File

@@ -0,0 +1,31 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import java.io.Serializable
/**
* <p>
* 权限类型
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_power_type")
class PowerType : Serializable {
@TableId("id")
var id: Long? = null
/**
* 权限类型名
*/
@TableField("name")
var name: String? = null
override fun toString(): String {
return "PowerType(id=$id, name=$name)"
}
}

View File

@@ -0,0 +1,55 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.*
import java.io.Serializable
/**
* <p>
* 角色
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_role")
class Role : Serializable {
@TableId("id")
var id: Long? = null
/**
* 角色名
*/
@TableField("name")
var name: String? = null
/**
* 启用
*/
@TableField("enable")
var enable: Int? = null
@TableField("deleted")
@TableLogic
var deleted: Long? = null
@TableField("version")
@Version
var version: Int? = null
@TableField(exist = false)
var menus: List<Menu>? = null
@TableField(exist = false)
var elements: List<Element>? = null
@TableField(exist = false)
var operations: List<Operation>? = null
@TableField(exist = false)
var powers: List<Power>? = null
override fun toString(): String {
return "Role(id=$id, name=$name, enable=$enable, deleted=$deleted, version=$version, menus=$menus, elements=$elements, operations=$operations, powers=$powers)"
}
}

View File

@@ -0,0 +1,43 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.*
import java.io.Serializable
/**
* <p>
* 中间表-角色-用户组
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_role_group")
class RoleGroup : Serializable {
@TableId("id")
var id: Long? = null
/**
* 角色
*/
@TableField("role_id")
var roleId: Long? = null
/**
* 群组
*/
@TableField("group_id")
var groupId: Long? = null
@TableField("deleted")
@TableLogic
var deleted: Long? = null
@TableField("version")
@Version
var version: Int? = null
override fun toString(): String {
return "RoleGroup(id=$id, roleId=$roleId, groupId=$groupId, deleted=$deleted, version=$version)"
}
}

View File

@@ -92,7 +92,22 @@ class User() : Serializable {
@Version
var version: Int? = null
@TableField(exist = false)
var roles: List<Role>? = null
@TableField(exist = false)
var groups: List<Group>? = null
@TableField(exist = false)
var menus: List<Menu>? = null
@TableField(exist = false)
var elements: List<Element>? = null
@TableField(exist = false)
var operations: List<Operation>? = null
override fun toString(): String {
return "User(id=$id, username=$username, password=$password, locking=$locking, expiration=$expiration, credentialsExpiration=$credentialsExpiration, enable=$enable, lastLoginTime=$lastLoginTime, lastLoginIp=$lastLoginIp, createTime=$createTime, updateTime=$updateTime, deleted=$deleted, version=$version)"
return "User(id=$id, username=$username, password=$password, locking=$locking, expiration=$expiration, credentialsExpiration=$credentialsExpiration, enable=$enable, lastLoginTime=$lastLoginTime, lastLoginIp=$lastLoginIp, createTime=$createTime, updateTime=$updateTime, deleted=$deleted, version=$version, roles=$roles, groups=$groups, menus=$menus, elements=$elements, operations=$operations)"
}
}

View File

@@ -0,0 +1,43 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.*
import java.io.Serializable
/**
* <p>
* 中间表-用户-用户组
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_user_group")
class UserGroup : Serializable {
@TableId("id")
var id: Long? = null
/**
* 用户
*/
@TableField("user_id")
var userId: Long? = null
/**
* 用户组
*/
@TableField("group_id")
var groupId: Long? = null
@TableField("deleted")
@TableLogic
var deleted: Long? = null
@TableField("version")
@Version
var version: Int? = null
override fun toString(): String {
return "UserGroup(id=$id, userId=$userId, groupId=$groupId, deleted=$deleted, version=$version)"
}
}

View File

@@ -0,0 +1,43 @@
package top.fatweb.api.entity.permission
import com.baomidou.mybatisplus.annotation.*
import java.io.Serializable
/**
* <p>
* 中间表-用户-角色
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@TableName("t_user_role")
class UserRole : Serializable {
@TableId("id")
var id: Long? = null
/**
* 用户
*/
@TableField("user_id")
var userId: Long? = null
/**
* 角色
*/
@TableField("role_id")
var roleId: Long? = null
@TableField("deleted")
@TableLogic
var deleted: Long? = null
@TableField("version")
@Version
var version: Int? = null
override fun toString(): String {
return "UserRole(id=$id, userId=$userId, roleId=$roleId, deleted=$deleted, version=$version)"
}
}

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.Element
/**
* <p>
* 页面元素 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface ElementMapper : BaseMapper<Element>

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.Group
/**
* <p>
* 用户组 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface GroupMapper : BaseMapper<Group>

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.Menu
/**
* <p>
* 菜单 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface MenuMapper : BaseMapper<Menu>

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.Operation
/**
* <p>
* 功能 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface OperationMapper : BaseMapper<Operation>

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.Power
/**
* <p>
* 权限 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface PowerMapper : BaseMapper<Power>

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.PowerRole
/**
* <p>
* 中间表-权限-角色 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface PowerRoleMapper : BaseMapper<PowerRole>

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.PowerType
/**
* <p>
* 权限类型 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface PowerTypeMapper : BaseMapper<PowerType>

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.RoleGroup
/**
* <p>
* 中间表-角色-用户组 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface RoleGroupMapper : BaseMapper<RoleGroup>

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.Role
/**
* <p>
* 角色 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface RoleMapper : BaseMapper<Role>

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.UserGroup
/**
* <p>
* 中间表-用户-用户组 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface UserGroupMapper : BaseMapper<UserGroup>

View File

@@ -1,4 +1,4 @@
package top.fatweb.api.mapper
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.mapper.permission
import com.baomidou.mybatisplus.core.mapper.BaseMapper
import org.apache.ibatis.annotations.Mapper
import top.fatweb.api.entity.permission.UserRole
/**
* <p>
* 中间表-用户-角色 Mapper 接口
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Mapper
interface UserRoleMapper : BaseMapper<UserRole>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.Element
/**
* <p>
* 页面元素 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IElementService : IService<Element>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.Group
/**
* <p>
* 用户组 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IGroupService : IService<Group>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.Menu
/**
* <p>
* 菜单 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IMenuService : IService<Menu>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.Operation
/**
* <p>
* 功能 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IOperationService : IService<Operation>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.PowerRole
/**
* <p>
* 中间表-权限-角色 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IPowerRoleService : IService<PowerRole>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.Power
/**
* <p>
* 权限 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IPowerService : IService<Power>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.PowerType
/**
* <p>
* 权限类型 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IPowerTypeService : IService<PowerType>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.RoleGroup
/**
* <p>
* 中间表-角色-用户组 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IRoleGroupService : IService<RoleGroup>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.Role
/**
* <p>
* 角色 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IRoleService : IService<Role>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.UserGroup
/**
* <p>
* 中间表-用户-用户组 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IUserGroupService : IService<UserGroup>

View File

@@ -0,0 +1,14 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.UserRole
/**
* <p>
* 中间表-用户-角色 服务类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
interface IUserRoleService : IService<UserRole>

View File

@@ -1,4 +1,4 @@
package top.fatweb.api.service
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.User

View File

@@ -11,8 +11,8 @@ import top.fatweb.api.constant.SecurityConstants
import top.fatweb.api.entity.permission.LoginUser
import top.fatweb.api.entity.permission.User
import top.fatweb.api.exception.TokenHasExpiredException
import top.fatweb.api.service.IUserService
import top.fatweb.api.service.permission.IAuthenticationService
import top.fatweb.api.service.permission.IUserService
import top.fatweb.api.util.JwtUtil
import top.fatweb.api.util.RedisUtil
import top.fatweb.api.util.WebUtil

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.Element
import top.fatweb.api.mapper.permission.ElementMapper
import top.fatweb.api.service.permission.IElementService
/**
* <p>
* 页面元素 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class ElementServiceImpl : ServiceImpl<ElementMapper, Element>(), IElementService

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.Group
import top.fatweb.api.mapper.permission.GroupMapper
import top.fatweb.api.service.permission.IGroupService
/**
* <p>
* 用户组 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class GroupServiceImpl : ServiceImpl<GroupMapper, Group>(), IGroupService

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.Menu
import top.fatweb.api.mapper.permission.MenuMapper
import top.fatweb.api.service.permission.IMenuService
/**
* <p>
* 菜单 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class MenuServiceImpl : ServiceImpl<MenuMapper, Menu>(), IMenuService

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.Operation
import top.fatweb.api.mapper.permission.OperationMapper
import top.fatweb.api.service.permission.IOperationService
/**
* <p>
* 功能 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class OperationServiceImpl : ServiceImpl<OperationMapper, Operation>(), IOperationService

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.PowerRole
import top.fatweb.api.mapper.permission.PowerRoleMapper
import top.fatweb.api.service.permission.IPowerRoleService
/**
* <p>
* 中间表-权限-角色 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class PowerRoleServiceImpl : ServiceImpl<PowerRoleMapper, PowerRole>(), IPowerRoleService

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.Power
import top.fatweb.api.mapper.permission.PowerMapper
import top.fatweb.api.service.permission.IPowerService
/**
* <p>
* 权限 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class PowerServiceImpl : ServiceImpl<PowerMapper, Power>(), IPowerService

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.PowerType
import top.fatweb.api.mapper.permission.PowerTypeMapper
import top.fatweb.api.service.permission.IPowerTypeService
/**
* <p>
* 权限类型 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class PowerTypeServiceImpl : ServiceImpl<PowerTypeMapper, PowerType>(), IPowerTypeService

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.RoleGroup
import top.fatweb.api.mapper.permission.RoleGroupMapper
import top.fatweb.api.service.permission.IRoleGroupService
/**
* <p>
* 中间表-角色-用户组 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class RoleGroupServiceImpl : ServiceImpl<RoleGroupMapper, RoleGroup>(), IRoleGroupService

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.Role
import top.fatweb.api.mapper.permission.RoleMapper
import top.fatweb.api.service.permission.IRoleService
/**
* <p>
* 角色 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class RoleServiceImpl : ServiceImpl<RoleMapper, Role>(), IRoleService

View File

@@ -6,7 +6,7 @@ import org.springframework.security.core.userdetails.UserDetailsService
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.LoginUser
import top.fatweb.api.entity.permission.User
import top.fatweb.api.service.IUserService
import top.fatweb.api.service.permission.IUserService
@Service
class UserDetailsServiceImpl(val userService: IUserService) : UserDetailsService {

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.UserGroup
import top.fatweb.api.mapper.permission.UserGroupMapper
import top.fatweb.api.service.permission.IUserGroupService
/**
* <p>
* 中间表-用户-用户组 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class UserGroupServiceImpl : ServiceImpl<UserGroupMapper, UserGroup>(), IUserGroupService

View File

@@ -0,0 +1,18 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.UserRole
import top.fatweb.api.mapper.permission.UserRoleMapper
import top.fatweb.api.service.permission.IUserRoleService
/**
* <p>
* 中间表-用户-角色 服务实现类
* </p>
*
* @author FatttSnake
* @since 2023-10-25
*/
@Service
class UserRoleServiceImpl : ServiceImpl<UserRoleMapper, UserRole>(), IUserRoleService

View File

@@ -1,10 +1,10 @@
package top.fatweb.api.service.impl
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.User
import top.fatweb.api.mapper.UserMapper
import top.fatweb.api.service.IUserService
import top.fatweb.api.mapper.permission.UserMapper
import top.fatweb.api.service.permission.IUserService
/**
* <p>