Complete core functions #9
@@ -7,6 +7,12 @@ import org.springframework.transaction.annotation.EnableTransactionManagement
|
||||
import java.io.File
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Application main class
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableTransactionManagement
|
||||
class FatWebApiApplication
|
||||
|
||||
@@ -2,6 +2,12 @@ package top.fatweb.api.annotation
|
||||
|
||||
import org.springframework.core.annotation.AliasFor
|
||||
|
||||
/**
|
||||
* Api controller version annotation
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Target(AnnotationTarget.CLASS)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class ApiVersion(
|
||||
|
||||
@@ -13,7 +13,12 @@ import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.*
|
||||
|
||||
|
||||
/**
|
||||
* Data format config
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@JsonComponent
|
||||
class DataFormatConfig {
|
||||
@set:Value("\${spring.jackson.date-format}")
|
||||
|
||||
@@ -5,6 +5,12 @@ import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import top.fatweb.api.filter.ExceptionFilter
|
||||
|
||||
/**
|
||||
* Filter config
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
class FilterConfig {
|
||||
@Bean
|
||||
|
||||
@@ -14,6 +14,12 @@ import top.fatweb.api.service.permission.IUserInfoService
|
||||
import top.fatweb.api.service.permission.IUserService
|
||||
import kotlin.random.Random
|
||||
|
||||
/**
|
||||
* Application initialization config
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@DependsOn("adminProperties")
|
||||
@Component
|
||||
class InitConfig(
|
||||
|
||||
@@ -6,6 +6,12 @@ import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerIntercept
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
/**
|
||||
* Mybatis-plus config
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
class MybatisPlusConfig {
|
||||
@Bean
|
||||
|
||||
@@ -12,6 +12,12 @@ import org.springframework.data.redis.core.RedisTemplate
|
||||
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer
|
||||
|
||||
/**
|
||||
* Redis config
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
class RedisConfig {
|
||||
@Bean
|
||||
|
||||
@@ -17,6 +17,12 @@ import top.fatweb.api.filter.JwtAuthenticationTokenFilter
|
||||
import top.fatweb.api.handler.JwtAccessDeniedHandler
|
||||
import top.fatweb.api.handler.JwtAuthenticationEntryPointHandler
|
||||
|
||||
/**
|
||||
* Spring Security config
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@EnableMethodSecurity
|
||||
class SecurityConfig(
|
||||
|
||||
@@ -7,6 +7,12 @@ import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import top.fatweb.api.properties.ServerProperties
|
||||
|
||||
/**
|
||||
* Swagger API doc config
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
class SwaggerConfig {
|
||||
|
||||
|
||||
@@ -5,6 +5,12 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
|
||||
import top.fatweb.api.interceptor.SysLogInterceptor
|
||||
|
||||
/**
|
||||
* System log config
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
class SysLogConfig(
|
||||
private val sysLogInterceptor: SysLogInterceptor
|
||||
|
||||
@@ -5,6 +5,12 @@ import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
|
||||
import top.fatweb.api.util.ApiResponseMappingHandlerMapping
|
||||
|
||||
/**
|
||||
* Web MVC config
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
class WebMvcRegistrationsConfig : WebMvcRegistrations {
|
||||
override fun getRequestMappingHandlerMapping(): RequestMappingHandlerMapping = ApiResponseMappingHandlerMapping()
|
||||
|
||||
@@ -5,6 +5,12 @@ import jakarta.servlet.http.HttpServletRequest
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
/**
|
||||
* Exception controller
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Hidden
|
||||
@RestController
|
||||
@RequestMapping("/error")
|
||||
|
||||
@@ -15,6 +15,12 @@ import top.fatweb.api.param.authentication.LoginParam
|
||||
import top.fatweb.api.service.permission.IAuthenticationService
|
||||
import top.fatweb.api.util.WebUtil
|
||||
|
||||
/**
|
||||
* Authentication controller
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Tag(name = "身份认证", description = "身份认证相关接口")
|
||||
@RestController
|
||||
class AuthenticationController(
|
||||
|
||||
@@ -13,12 +13,10 @@ import top.fatweb.api.vo.permission.GroupVo
|
||||
import top.fatweb.api.vo.permission.GroupWithRoleVo
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户组表 前端控制器
|
||||
* </p>
|
||||
* Group controller
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-11-09
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Tag(name = "用户组管理", description = "用户组管理相关接口")
|
||||
@RestController
|
||||
|
||||
@@ -9,7 +9,10 @@ import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.service.permission.IPowerService
|
||||
|
||||
/**
|
||||
* 权限 前端控制器
|
||||
* Power controller
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Tag(name = "权限管理", description = "权限管理相关接口")
|
||||
@RestController
|
||||
|
||||
@@ -13,10 +13,10 @@ import top.fatweb.api.vo.permission.RoleVo
|
||||
import top.fatweb.api.vo.permission.RoleWithPowerVo
|
||||
|
||||
/**
|
||||
* 角色表 前端控制器
|
||||
* Role controller
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-11-09
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Tag(name = "角色管理", description = "角色管理相关接口")
|
||||
@RestController
|
||||
|
||||
@@ -12,12 +12,10 @@ import top.fatweb.api.vo.permission.UserWithPowerInfoVo
|
||||
import top.fatweb.api.vo.permission.UserWithRoleInfoVo
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户表 前端控制器
|
||||
* </p>
|
||||
* User controller
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-04
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Tag(name = "用户管理", description = "用户管理相关接口")
|
||||
@RestController
|
||||
|
||||
@@ -12,15 +12,13 @@ import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.param.system.SysLogGetParam
|
||||
import top.fatweb.api.service.system.ISysLogService
|
||||
import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.system.SysLogGetVo
|
||||
import top.fatweb.api.vo.system.SysLogVo
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统日志表 前端控制器
|
||||
* </p>
|
||||
* System log controller
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-18
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/log")
|
||||
@@ -30,7 +28,7 @@ class SysLogController(
|
||||
) {
|
||||
@Operation(summary = "获取")
|
||||
@GetMapping
|
||||
fun get(@Valid sysLogGetParam: SysLogGetParam?): ResponseResult<PageVo<SysLogGetVo>> {
|
||||
fun get(@Valid sysLogGetParam: SysLogGetParam?): ResponseResult<PageVo<SysLogVo>> {
|
||||
return ResponseResult.success(
|
||||
ResponseCode.DATABASE_SELECT_SUCCESS, data = SysLogConverter.sysLogPageToSysLogPageVo(
|
||||
sysLogService.getPage(sysLogGetParam)
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.converter.permission
|
||||
import top.fatweb.api.entity.permission.Element
|
||||
import top.fatweb.api.vo.permission.ElementVo
|
||||
|
||||
/**
|
||||
* Element converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object ElementConverter {
|
||||
fun elementToElementVo(element: Element) = ElementVo(
|
||||
id = element.id,
|
||||
|
||||
@@ -10,6 +10,12 @@ import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.permission.GroupVo
|
||||
import top.fatweb.api.vo.permission.GroupWithRoleVo
|
||||
|
||||
/**
|
||||
* Group converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object GroupConverter {
|
||||
fun groupToGroupVo(group: Group) = GroupVo(
|
||||
id = group.id,
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.converter.permission
|
||||
import top.fatweb.api.entity.permission.Menu
|
||||
import top.fatweb.api.vo.permission.MenuVo
|
||||
|
||||
/**
|
||||
* Menu converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object MenuConverter {
|
||||
fun menuToMenuVo(menu: Menu) = MenuVo(
|
||||
id = menu.id,
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.converter.permission
|
||||
import top.fatweb.api.entity.permission.Module
|
||||
import top.fatweb.api.vo.permission.ModuleVo
|
||||
|
||||
/**
|
||||
* Module converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object ModuleConverter {
|
||||
fun moduleToModuleVo(module: Module) = ModuleVo(
|
||||
id = module.id,
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.converter.permission
|
||||
import top.fatweb.api.entity.permission.Operation
|
||||
import top.fatweb.api.vo.permission.OperationVo
|
||||
|
||||
/**
|
||||
* Operation converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object OperationConverter {
|
||||
fun operationToOperationVo(operation: Operation) = OperationVo(
|
||||
id = operation.id,
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.converter.permission
|
||||
import top.fatweb.api.entity.permission.PowerSet
|
||||
import top.fatweb.api.vo.permission.PowerSetVo
|
||||
|
||||
/**
|
||||
* Power converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object PowerConverter {
|
||||
fun powerSetToPowerSetVo(powerSet: PowerSet) = PowerSetVo(
|
||||
moduleList = powerSet.moduleList?.map { ModuleConverter.moduleToModuleVo(it) },
|
||||
|
||||
@@ -10,6 +10,12 @@ import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.permission.RoleVo
|
||||
import top.fatweb.api.vo.permission.RoleWithPowerVo
|
||||
|
||||
/**
|
||||
* Role converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object RoleConverter {
|
||||
fun roleToRoleVo(role: Role) = RoleVo(
|
||||
id = role.id,
|
||||
|
||||
@@ -4,6 +4,12 @@ import top.fatweb.api.entity.permission.User
|
||||
import top.fatweb.api.param.authentication.LoginParam
|
||||
import top.fatweb.api.vo.permission.*
|
||||
|
||||
/**
|
||||
* User converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object UserConverter {
|
||||
fun loginParamToUser(loginParam: LoginParam) = User().apply {
|
||||
username = loginParam.username
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.converter.permission
|
||||
import top.fatweb.api.entity.permission.UserInfo
|
||||
import top.fatweb.api.vo.permission.UserInfoVo
|
||||
|
||||
/**
|
||||
* User information converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object UserInfoConverter {
|
||||
fun userInfoToUserInfoVo(userInfo: UserInfo) = UserInfoVo(
|
||||
id = userInfo.id,
|
||||
|
||||
@@ -3,16 +3,22 @@ package top.fatweb.api.converter.system
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage
|
||||
import top.fatweb.api.entity.system.SysLog
|
||||
import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.system.SysLogGetVo
|
||||
import top.fatweb.api.vo.system.SysLogVo
|
||||
|
||||
/**
|
||||
* System log converter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
object SysLogConverter {
|
||||
fun sysLogPageToSysLogPageVo(syslogPage: IPage<SysLog>): PageVo<SysLogGetVo> = PageVo(
|
||||
fun sysLogPageToSysLogPageVo(syslogPage: IPage<SysLog>): PageVo<SysLogVo> = PageVo(
|
||||
syslogPage.total,
|
||||
syslogPage.pages,
|
||||
syslogPage.size,
|
||||
syslogPage.current,
|
||||
syslogPage.records.map {
|
||||
SysLogGetVo(
|
||||
SysLogVo(
|
||||
id = it.id,
|
||||
logType = it.logType,
|
||||
operateUserId = it.operateUserId,
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
package top.fatweb.api.entity.common
|
||||
|
||||
/**
|
||||
* Business code entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
enum class BusinessCode(val code: Int) {
|
||||
SYSTEM(100),
|
||||
DATABASE(200)
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
package top.fatweb.api.entity.common
|
||||
|
||||
/**
|
||||
* Response code entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
enum class ResponseCode(val code: Int) {
|
||||
SYSTEM_OK(BusinessCode.SYSTEM, 0),
|
||||
SYSTEM_LOGIN_SUCCESS(BusinessCode.SYSTEM, 20),
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.entity.common
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* Response result entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class ResponseResult<T> private constructor(
|
||||
@Schema(description = "响应码", defaultValue = "200") val code: Int,
|
||||
|
||||
|
||||
@@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 页面元素表
|
||||
* </p>
|
||||
* Element entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_element")
|
||||
class Element : Serializable {
|
||||
|
||||
@@ -5,12 +5,10 @@ import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户组表
|
||||
* </p>
|
||||
* Group entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_group")
|
||||
class Group : Serializable {
|
||||
|
||||
@@ -7,6 +7,12 @@ import org.springframework.security.core.userdetails.UserDetails
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneOffset
|
||||
|
||||
/**
|
||||
* Login user entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
|
||||
class LoginUser() : UserDetails {
|
||||
lateinit var user: User
|
||||
|
||||
@@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表
|
||||
* </p>
|
||||
* Menu entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_menu")
|
||||
class Menu : Serializable {
|
||||
|
||||
@@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 模块表
|
||||
* </p>
|
||||
* Module Entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_module")
|
||||
class Module : Serializable {
|
||||
|
||||
@@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 功能表
|
||||
* </p>
|
||||
* Operation entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_operation")
|
||||
class Operation : Serializable {
|
||||
|
||||
@@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 权限表
|
||||
* </p>
|
||||
* Power entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_power")
|
||||
class Power : Serializable {
|
||||
|
||||
@@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-权限-角色
|
||||
* </p>
|
||||
* Power role intermediate entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_power_role")
|
||||
class PowerRole : Serializable {
|
||||
|
||||
@@ -3,7 +3,10 @@ package top.fatweb.api.entity.permission
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* 权限集合
|
||||
* Set of power entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class PowerSet : Serializable {
|
||||
var moduleList: List<Module>? = null
|
||||
|
||||
@@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 权限类型表
|
||||
* </p>
|
||||
* Power type entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_power_type")
|
||||
class PowerType : Serializable {
|
||||
|
||||
@@ -5,12 +5,10 @@ import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色表
|
||||
* </p>
|
||||
* Role entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_role")
|
||||
class Role : Serializable {
|
||||
|
||||
@@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-角色-用户组
|
||||
* </p>
|
||||
* Role group intermediate entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_role_group")
|
||||
class RoleGroup : Serializable {
|
||||
|
||||
@@ -5,12 +5,10 @@ import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户表
|
||||
* </p>
|
||||
* User entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-04
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_user")
|
||||
class User() : Serializable {
|
||||
|
||||
@@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-用户-用户组
|
||||
* </p>
|
||||
* User group intermediate entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_user_group")
|
||||
class UserGroup : Serializable {
|
||||
|
||||
@@ -5,12 +5,10 @@ import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户资料表
|
||||
* </p>
|
||||
* User information entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-30
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_user_info")
|
||||
class UserInfo : Serializable {
|
||||
|
||||
@@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-用户-角色
|
||||
* </p>
|
||||
* User role intermediate entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_user_role")
|
||||
class UserRole : Serializable {
|
||||
|
||||
@@ -7,12 +7,10 @@ import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统日志表
|
||||
* </p>
|
||||
* System log entity
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-18
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@TableName("t_sys_log")
|
||||
class SysLog : Serializable {
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
package top.fatweb.api.exception
|
||||
|
||||
/**
|
||||
* Token has expired exception
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class TokenHasExpiredException : RuntimeException("Token has expired")
|
||||
@@ -6,6 +6,12 @@ import jakarta.servlet.ServletRequest
|
||||
import jakarta.servlet.ServletResponse
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
/**
|
||||
* Exception filter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Component
|
||||
class ExceptionFilter : Filter {
|
||||
override fun doFilter(
|
||||
|
||||
@@ -15,6 +15,12 @@ import top.fatweb.api.util.JwtUtil
|
||||
import top.fatweb.api.util.RedisUtil
|
||||
import top.fatweb.api.util.WebUtil
|
||||
|
||||
/**
|
||||
* Jwt authentication token filter
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Component
|
||||
class JwtAuthenticationTokenFilter(private val redisUtil: RedisUtil) : OncePerRequestFilter() {
|
||||
override fun doFilterInternal(
|
||||
|
||||
@@ -6,6 +6,12 @@ import org.springframework.stereotype.Component
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneOffset
|
||||
|
||||
/**
|
||||
* Date meta object handler
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Component
|
||||
class DataMetaObjectHandler : MetaObjectHandler {
|
||||
override fun insertFill(metaObject: MetaObject?) {
|
||||
|
||||
@@ -19,6 +19,12 @@ import top.fatweb.api.entity.common.ResponseCode
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.exception.TokenHasExpiredException
|
||||
|
||||
/**
|
||||
* Exception handler
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@RestControllerAdvice
|
||||
class ExceptionHandler {
|
||||
private val logger: Logger = LoggerFactory.getLogger(this::class.java)
|
||||
|
||||
@@ -6,6 +6,12 @@ import org.springframework.security.access.AccessDeniedException
|
||||
import org.springframework.security.web.access.AccessDeniedHandler
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
/**
|
||||
* Jwt access denied handler
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Component
|
||||
class JwtAccessDeniedHandler : AccessDeniedHandler {
|
||||
override fun handle(
|
||||
|
||||
@@ -6,6 +6,12 @@ import org.springframework.security.core.AuthenticationException
|
||||
import org.springframework.security.web.AuthenticationEntryPoint
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
/**
|
||||
* Jwt authentication entry point handler
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Component
|
||||
class JwtAuthenticationEntryPointHandler : AuthenticationEntryPoint {
|
||||
override fun commence(
|
||||
|
||||
@@ -22,6 +22,12 @@ import java.time.temporal.ChronoUnit
|
||||
import java.util.*
|
||||
import java.util.concurrent.Executor
|
||||
|
||||
/**
|
||||
* System log interceptor
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@ControllerAdvice
|
||||
class SysLogInterceptor(
|
||||
private val customThreadPoolTaskExecutor: Executor, private val sysLogService: ISysLogService
|
||||
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Element
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 页面元素表 Mapper 接口
|
||||
* </p>
|
||||
* Element mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface ElementMapper : BaseMapper<Element>
|
||||
|
||||
@@ -6,12 +6,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Group
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户组表 Mapper 接口
|
||||
* </p>
|
||||
* Group mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface GroupMapper : BaseMapper<Group> {
|
||||
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Menu
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表 Mapper 接口
|
||||
* </p>
|
||||
* Menu mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface MenuMapper : BaseMapper<Menu>
|
||||
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Module
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 模块表 Mapper 接口
|
||||
* </p>
|
||||
* Module mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface ModuleMapper : BaseMapper<Module>
|
||||
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Operation
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 功能表 Mapper 接口
|
||||
* </p>
|
||||
* Operation mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface OperationMapper : BaseMapper<Operation>
|
||||
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Power
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 权限表 Mapper 接口
|
||||
* </p>
|
||||
* Power mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface PowerMapper : BaseMapper<Power>
|
||||
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.PowerRole
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-权限-角色 Mapper 接口
|
||||
* </p>
|
||||
* Power role intermediate mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface PowerRoleMapper : BaseMapper<PowerRole>
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
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>
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.RoleGroup
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-角色-用户组 Mapper 接口
|
||||
* </p>
|
||||
* Role group intermediate mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface RoleGroupMapper : BaseMapper<RoleGroup>
|
||||
|
||||
@@ -6,12 +6,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Role
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色表 Mapper 接口
|
||||
* </p>
|
||||
* Role mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface RoleMapper : BaseMapper<Role> {
|
||||
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.UserGroup
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-用户-用户组 Mapper 接口
|
||||
* </p>
|
||||
* User group intermediate mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface UserGroupMapper : BaseMapper<UserGroup>
|
||||
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.UserInfo
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户资料表 Mapper 接口
|
||||
* </p>
|
||||
* User information mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-30
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface UserInfoMapper : BaseMapper<UserInfo>
|
||||
|
||||
@@ -6,12 +6,10 @@ import org.apache.ibatis.annotations.Param
|
||||
import top.fatweb.api.entity.permission.User
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户表 Mapper 接口
|
||||
* </p>
|
||||
* User mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-04
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface UserMapper : BaseMapper<User> {
|
||||
|
||||
@@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.UserRole
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-用户-角色 Mapper 接口
|
||||
* </p>
|
||||
* User role intermediate mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface UserRoleMapper : BaseMapper<UserRole>
|
||||
|
||||
@@ -7,12 +7,10 @@ import top.fatweb.api.entity.system.SysLog
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统日志表 Mapper 接口
|
||||
* </p>
|
||||
* System log mapper
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-18
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Mapper
|
||||
interface SysLogMapper : BaseMapper<SysLog> {
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.param
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.Min
|
||||
|
||||
/**
|
||||
* Page sort param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
open class PageSortParam {
|
||||
@Schema(description = "分页页码", example = "1", defaultValue = "1")
|
||||
@field:Min(1, message = "Pagination page number must be a positive integer")
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.param.authentication
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
|
||||
/**
|
||||
* Group add param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "用户组添加请求参数")
|
||||
data class GroupAddParam(
|
||||
@Schema(description = "用户组名称")
|
||||
|
||||
@@ -4,6 +4,12 @@ import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.Min
|
||||
import jakarta.validation.constraints.NotNull
|
||||
|
||||
/**
|
||||
* Group change status param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "用户组更改状态请求参数")
|
||||
data class GroupChangeStatusParam(
|
||||
@Schema(description = "用户组 ID")
|
||||
|
||||
@@ -2,6 +2,12 @@ package top.fatweb.api.param.authentication
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
|
||||
/**
|
||||
* Group delete param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "用户组删除请求参数")
|
||||
data class GroupDeleteParam(
|
||||
@Schema(description = "用户组 ID 列表")
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.param.authentication
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import top.fatweb.api.param.PageSortParam
|
||||
|
||||
/**
|
||||
* Group get param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "用户组查询请求参数")
|
||||
data class GroupGetParam(
|
||||
@Schema(description = "查询用户组名称")
|
||||
|
||||
@@ -4,6 +4,12 @@ import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.Min
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
|
||||
/**
|
||||
* Group update param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "用户组更新请求参数")
|
||||
data class GroupUpdateParam(
|
||||
@Schema(description = "用户组 ID")
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.param.authentication
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
|
||||
/**
|
||||
* Login param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "登录请求参数")
|
||||
data class LoginParam(
|
||||
@Schema(description = "用户名", example = "test", required = true)
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.param.authentication
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
|
||||
/**
|
||||
* Role add param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "角色添加请求参数")
|
||||
data class RoleAddParam(
|
||||
@Schema(description = "角色名称")
|
||||
|
||||
@@ -4,6 +4,12 @@ import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.Min
|
||||
import jakarta.validation.constraints.NotNull
|
||||
|
||||
/**
|
||||
* Role change status param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "角色更改状态请求参数")
|
||||
data class RoleChangeStatusParam(
|
||||
@Schema(description = "角色 ID")
|
||||
|
||||
@@ -2,6 +2,12 @@ package top.fatweb.api.param.authentication
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
|
||||
/**
|
||||
* Role delete param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "角色删除请求参数")
|
||||
data class RoleDeleteParam(
|
||||
@Schema(description = "角色 ID 列表")
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.param.authentication
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import top.fatweb.api.param.PageSortParam
|
||||
|
||||
/**
|
||||
* Role get param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "角色查询请求参数")
|
||||
data class RoleGetParam(
|
||||
@Schema(description = "查询角色名称")
|
||||
|
||||
@@ -4,6 +4,12 @@ import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.Min
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
|
||||
/**
|
||||
* Role update param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "角色更新请求参数")
|
||||
data class RoleUpdateParam(
|
||||
@Schema(description = "角色 ID")
|
||||
|
||||
@@ -5,6 +5,12 @@ import org.springframework.format.annotation.DateTimeFormat
|
||||
import top.fatweb.api.param.PageSortParam
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
* System log get param
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "获取系统日志请求参数")
|
||||
data class SysLogGetParam(
|
||||
@Schema(description = "类型过滤(多个使用逗号分隔)", example = "INFO", allowableValues = ["INFO", "ERROR"])
|
||||
|
||||
@@ -3,6 +3,12 @@ package top.fatweb.api.properties
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
/**
|
||||
* Admin properties
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties("app.admin")
|
||||
object AdminProperties {
|
||||
|
||||
@@ -4,6 +4,12 @@ import org.springframework.boot.context.properties.ConfigurationProperties
|
||||
import org.springframework.stereotype.Component
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
/**
|
||||
* Security properties
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties("app.security")
|
||||
object SecurityProperties {
|
||||
|
||||
@@ -6,6 +6,12 @@ import java.time.LocalDateTime
|
||||
import java.time.ZoneId
|
||||
import java.time.ZonedDateTime
|
||||
|
||||
/**
|
||||
* Application properties
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties("app")
|
||||
object ServerProperties {
|
||||
|
||||
@@ -5,6 +5,12 @@ import top.fatweb.api.entity.permission.User
|
||||
import top.fatweb.api.vo.permission.LoginVo
|
||||
import top.fatweb.api.vo.permission.TokenVo
|
||||
|
||||
/**
|
||||
* Authentication service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IAuthenticationService {
|
||||
fun login(request: HttpServletRequest, user: User): LoginVo
|
||||
|
||||
|
||||
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService
|
||||
import top.fatweb.api.entity.permission.Element
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 页面元素表 服务类
|
||||
* </p>
|
||||
* Element service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IElementService : IService<Element>
|
||||
|
||||
@@ -8,12 +8,10 @@ import top.fatweb.api.vo.permission.GroupVo
|
||||
import top.fatweb.api.vo.permission.GroupWithRoleVo
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户组表 服务类
|
||||
* </p>
|
||||
* Group service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IGroupService : IService<Group> {
|
||||
fun getPage(groupGetParam: GroupGetParam?): PageVo<GroupWithRoleVo>
|
||||
|
||||
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService
|
||||
import top.fatweb.api.entity.permission.Menu
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表 服务类
|
||||
* </p>
|
||||
* Menu service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IMenuService : IService<Menu>
|
||||
|
||||
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService
|
||||
import top.fatweb.api.entity.permission.Module
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 模块表 服务类
|
||||
* </p>
|
||||
* Module service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IModuleService : IService<Module>
|
||||
|
||||
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService
|
||||
import top.fatweb.api.entity.permission.Operation
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 功能表 服务类
|
||||
* </p>
|
||||
* Operation service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IOperationService : IService<Operation>
|
||||
|
||||
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService
|
||||
import top.fatweb.api.entity.permission.PowerRole
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-权限-角色 服务类
|
||||
* </p>
|
||||
* Power role intermediate service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IPowerRoleService : IService<PowerRole>
|
||||
|
||||
@@ -5,12 +5,10 @@ import top.fatweb.api.entity.permission.Power
|
||||
import top.fatweb.api.vo.permission.PowerSetVo
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 权限表 服务类
|
||||
* </p>
|
||||
* Power service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IPowerService : IService<Power> {
|
||||
fun getList(): PowerSetVo
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
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>
|
||||
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService
|
||||
import top.fatweb.api.entity.permission.RoleGroup
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-角色-用户组 服务类
|
||||
* </p>
|
||||
* Role group intermediate service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IRoleGroupService : IService<RoleGroup>
|
||||
|
||||
@@ -8,12 +8,10 @@ import top.fatweb.api.vo.permission.RoleVo
|
||||
import top.fatweb.api.vo.permission.RoleWithPowerVo
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色表 服务类
|
||||
* </p>
|
||||
* Role service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IRoleService : IService<Role> {
|
||||
fun getPage(roleGetParam: RoleGetParam?): PageVo<RoleWithPowerVo>
|
||||
|
||||
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService
|
||||
import top.fatweb.api.entity.permission.UserGroup
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 中间表-用户-用户组 服务类
|
||||
* </p>
|
||||
* User group intermediate service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-25
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IUserGroupService : IService<UserGroup>
|
||||
|
||||
@@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService
|
||||
import top.fatweb.api.entity.permission.UserInfo
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户资料表 服务类
|
||||
* </p>
|
||||
* User information service interface
|
||||
*
|
||||
* @author FatttSnake
|
||||
* @since 2023-10-30
|
||||
* @since 1.0.0
|
||||
*/
|
||||
interface IUserInfoService : IService<UserInfo>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user