From d0897e57e0104bbe56b4b2414f6dfc72afb8f63b Mon Sep 17 00:00:00 2001 From: FatttSnake Date: Thu, 16 Nov 2023 17:33:49 +0800 Subject: [PATCH] Add doc --- .../top/fatweb/api/FatWebApiApplication.kt | 6 ++++++ .../top/fatweb/api/annotation/ApiVersion.kt | 6 ++++++ .../top/fatweb/api/config/DataFormatConfig.kt | 7 ++++++- .../top/fatweb/api/config/FilterConfig.kt | 6 ++++++ .../kotlin/top/fatweb/api/config/InitConfig.kt | 6 ++++++ .../top/fatweb/api/config/MybatisPlusConfig.kt | 6 ++++++ .../top/fatweb/api/config/RedisConfig.kt | 6 ++++++ .../top/fatweb/api/config/SecurityConfig.kt | 6 ++++++ .../top/fatweb/api/config/SwaggerConfig.kt | 6 ++++++ .../top/fatweb/api/config/SysLogConfig.kt | 6 ++++++ .../api/config/WebMvcRegistrationsConfig.kt | 6 ++++++ .../api/controller/ExceptionController.kt | 6 ++++++ .../permission/AuthenticationController.kt | 6 ++++++ .../controller/permission/GroupController.kt | 6 ++---- .../controller/permission/PowerController.kt | 5 ++++- .../controller/permission/RoleController.kt | 4 ++-- .../controller/permission/UserController.kt | 6 ++---- .../api/controller/system/SysLogController.kt | 10 ++++------ .../converter/permission/ElementConverter.kt | 6 ++++++ .../api/converter/permission/GroupConverter.kt | 6 ++++++ .../api/converter/permission/MenuConverter.kt | 6 ++++++ .../converter/permission/ModuleConverter.kt | 6 ++++++ .../converter/permission/OperationConverter.kt | 6 ++++++ .../api/converter/permission/PowerConverter.kt | 6 ++++++ .../api/converter/permission/RoleConverter.kt | 6 ++++++ .../api/converter/permission/UserConverter.kt | 6 ++++++ .../converter/permission/UserInfoConverter.kt | 6 ++++++ .../api/converter/system/SysLogConverter.kt | 12 +++++++++--- .../fatweb/api/entity/common/BusinessCode.kt | 6 ++++++ .../fatweb/api/entity/common/ResponseCode.kt | 6 ++++++ .../fatweb/api/entity/common/ResponseResult.kt | 6 ++++++ .../fatweb/api/entity/permission/Element.kt | 6 ++---- .../top/fatweb/api/entity/permission/Group.kt | 6 ++---- .../fatweb/api/entity/permission/LoginUser.kt | 6 ++++++ .../top/fatweb/api/entity/permission/Menu.kt | 6 ++---- .../top/fatweb/api/entity/permission/Module.kt | 6 ++---- .../fatweb/api/entity/permission/Operation.kt | 6 ++---- .../top/fatweb/api/entity/permission/Power.kt | 6 ++---- .../fatweb/api/entity/permission/PowerRole.kt | 6 ++---- .../fatweb/api/entity/permission/PowerSet.kt | 5 ++++- .../fatweb/api/entity/permission/PowerType.kt | 6 ++---- .../top/fatweb/api/entity/permission/Role.kt | 6 ++---- .../fatweb/api/entity/permission/RoleGroup.kt | 6 ++---- .../top/fatweb/api/entity/permission/User.kt | 6 ++---- .../fatweb/api/entity/permission/UserGroup.kt | 6 ++---- .../fatweb/api/entity/permission/UserInfo.kt | 6 ++---- .../fatweb/api/entity/permission/UserRole.kt | 6 ++---- .../top/fatweb/api/entity/system/SysLog.kt | 6 ++---- .../api/exception/TokenHasExpiredException.kt | 6 ++++++ .../top/fatweb/api/filter/ExceptionFilter.kt | 6 ++++++ .../api/filter/JwtAuthenticationTokenFilter.kt | 6 ++++++ .../api/handler/DataMetaObjectHandler.kt | 6 ++++++ .../top/fatweb/api/handler/ExceptionHandler.kt | 6 ++++++ .../api/handler/JwtAccessDeniedHandler.kt | 6 ++++++ .../JwtAuthenticationEntryPointHandler.kt | 6 ++++++ .../api/interceptor/SysLogInterceptor.kt | 6 ++++++ .../api/mapper/permission/ElementMapper.kt | 6 ++---- .../api/mapper/permission/GroupMapper.kt | 6 ++---- .../fatweb/api/mapper/permission/MenuMapper.kt | 6 ++---- .../api/mapper/permission/ModuleMapper.kt | 6 ++---- .../api/mapper/permission/OperationMapper.kt | 6 ++---- .../api/mapper/permission/PowerMapper.kt | 6 ++---- .../api/mapper/permission/PowerRoleMapper.kt | 6 ++---- .../api/mapper/permission/PowerTypeMapper.kt | 16 ---------------- .../api/mapper/permission/RoleGroupMapper.kt | 6 ++---- .../fatweb/api/mapper/permission/RoleMapper.kt | 6 ++---- .../api/mapper/permission/UserGroupMapper.kt | 6 ++---- .../api/mapper/permission/UserInfoMapper.kt | 6 ++---- .../fatweb/api/mapper/permission/UserMapper.kt | 6 ++---- .../api/mapper/permission/UserRoleMapper.kt | 6 ++---- .../fatweb/api/mapper/system/SysLogMapper.kt | 6 ++---- .../top/fatweb/api/param/PageSortParam.kt | 6 ++++++ .../api/param/authentication/GroupAddParam.kt | 6 ++++++ .../authentication/GroupChangeStatusParam.kt | 6 ++++++ .../param/authentication/GroupDeleteParam.kt | 6 ++++++ .../api/param/authentication/GroupGetParam.kt | 6 ++++++ .../param/authentication/GroupUpdateParam.kt | 6 ++++++ .../api/param/authentication/LoginParam.kt | 6 ++++++ .../api/param/authentication/RoleAddParam.kt | 6 ++++++ .../authentication/RoleChangeStatusParam.kt | 6 ++++++ .../param/authentication/RoleDeleteParam.kt | 6 ++++++ .../api/param/authentication/RoleGetParam.kt | 6 ++++++ .../param/authentication/RoleUpdateParam.kt | 6 ++++++ .../fatweb/api/param/system/SysLogGetParam.kt | 6 ++++++ .../fatweb/api/properties/AdminProperties.kt | 6 ++++++ .../api/properties/SecurityProperties.kt | 6 ++++++ .../fatweb/api/properties/ServerProperties.kt | 6 ++++++ .../permission/IAuthenticationService.kt | 6 ++++++ .../api/service/permission/IElementService.kt | 6 ++---- .../api/service/permission/IGroupService.kt | 6 ++---- .../api/service/permission/IMenuService.kt | 6 ++---- .../api/service/permission/IModuleService.kt | 6 ++---- .../service/permission/IOperationService.kt | 6 ++---- .../service/permission/IPowerRoleService.kt | 6 ++---- .../api/service/permission/IPowerService.kt | 6 ++---- .../service/permission/IPowerTypeService.kt | 14 -------------- .../service/permission/IRoleGroupService.kt | 6 ++---- .../api/service/permission/IRoleService.kt | 6 ++---- .../service/permission/IUserGroupService.kt | 6 ++---- .../api/service/permission/IUserInfoService.kt | 6 ++---- .../api/service/permission/IUserRoleService.kt | 6 ++---- .../api/service/permission/IUserService.kt | 6 ++---- .../impl/AuthenticationServiceImpl.kt | 6 ++++++ .../permission/impl/ElementServiceImpl.kt | 6 ++---- .../permission/impl/GroupServiceImpl.kt | 6 ++---- .../service/permission/impl/MenuServiceImpl.kt | 6 ++---- .../permission/impl/ModuleServiceImpl.kt | 6 ++---- .../permission/impl/OperationServiceImpl.kt | 6 ++---- .../permission/impl/PowerRoleServiceImpl.kt | 6 ++---- .../permission/impl/PowerServiceImpl.kt | 6 ++---- .../permission/impl/PowerTypeServiceImpl.kt | 18 ------------------ .../permission/impl/RoleGroupServiceImpl.kt | 6 ++---- .../service/permission/impl/RoleServiceImpl.kt | 6 ++---- .../permission/impl/UserDetailsServiceImpl.kt | 6 ++++++ .../permission/impl/UserGroupServiceImpl.kt | 6 ++---- .../permission/impl/UserInfoServiceImpl.kt | 6 ++---- .../permission/impl/UserRoleServiceImpl.kt | 6 ++---- .../service/permission/impl/UserServiceImpl.kt | 6 ++---- .../api/service/system/ISysLogService.kt | 6 ++---- .../service/system/impl/SysLogServiceImpl.kt | 6 ++---- .../util/ApiResponseMappingHandlerMapping.kt | 6 ++++++ .../top/fatweb/api/util/ApiVersionCondition.kt | 6 ++++++ .../kotlin/top/fatweb/api/util/ByteUtil.kt | 6 ++++++ src/main/kotlin/top/fatweb/api/util/JwtUtil.kt | 6 ++++++ .../kotlin/top/fatweb/api/util/PageUtil.kt | 6 ++++++ .../kotlin/top/fatweb/api/util/RedisUtil.kt | 6 ++++++ src/main/kotlin/top/fatweb/api/util/StrUtil.kt | 6 ++++++ src/main/kotlin/top/fatweb/api/util/WebUtil.kt | 6 ++++++ src/main/kotlin/top/fatweb/api/vo/PageVo.kt | 6 ++++++ .../top/fatweb/api/vo/permission/ElementVo.kt | 6 ++++++ .../top/fatweb/api/vo/permission/GroupVo.kt | 6 ++++++ .../api/vo/permission/GroupWithRoleVo.kt | 6 ++++++ .../top/fatweb/api/vo/permission/LoginVo.kt | 6 ++++++ .../top/fatweb/api/vo/permission/MenuVo.kt | 6 ++++++ .../top/fatweb/api/vo/permission/ModuleVo.kt | 6 ++++++ .../fatweb/api/vo/permission/OperationVo.kt | 6 ++++++ .../top/fatweb/api/vo/permission/PowerSetVo.kt | 6 ++++++ .../top/fatweb/api/vo/permission/RoleVo.kt | 6 ++++++ .../api/vo/permission/RoleWithPowerVo.kt | 6 ++++++ .../top/fatweb/api/vo/permission/TokenVo.kt | 6 ++++++ .../top/fatweb/api/vo/permission/UserInfoVo.kt | 6 ++++++ .../api/vo/permission/UserWithPowerInfoVo.kt | 6 ++++++ .../api/vo/permission/UserWithRoleInfoVo.kt | 6 ++++++ .../vo/system/{SysLogGetVo.kt => SysLogVo.kt} | 8 +++++++- .../mapper/permission/PowerTypeMapper.xml | 5 ----- 145 files changed, 604 insertions(+), 304 deletions(-) delete mode 100644 src/main/kotlin/top/fatweb/api/mapper/permission/PowerTypeMapper.kt delete mode 100644 src/main/kotlin/top/fatweb/api/service/permission/IPowerTypeService.kt delete mode 100644 src/main/kotlin/top/fatweb/api/service/permission/impl/PowerTypeServiceImpl.kt rename src/main/kotlin/top/fatweb/api/vo/system/{SysLogGetVo.kt => SysLogVo.kt} (94%) delete mode 100644 src/main/resources/mapper/permission/PowerTypeMapper.xml diff --git a/src/main/kotlin/top/fatweb/api/FatWebApiApplication.kt b/src/main/kotlin/top/fatweb/api/FatWebApiApplication.kt index 485fead..0d5f029 100644 --- a/src/main/kotlin/top/fatweb/api/FatWebApiApplication.kt +++ b/src/main/kotlin/top/fatweb/api/FatWebApiApplication.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/annotation/ApiVersion.kt b/src/main/kotlin/top/fatweb/api/annotation/ApiVersion.kt index a0b064c..84f702f 100644 --- a/src/main/kotlin/top/fatweb/api/annotation/ApiVersion.kt +++ b/src/main/kotlin/top/fatweb/api/annotation/ApiVersion.kt @@ -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( diff --git a/src/main/kotlin/top/fatweb/api/config/DataFormatConfig.kt b/src/main/kotlin/top/fatweb/api/config/DataFormatConfig.kt index 3a7b76c..e50dc07 100644 --- a/src/main/kotlin/top/fatweb/api/config/DataFormatConfig.kt +++ b/src/main/kotlin/top/fatweb/api/config/DataFormatConfig.kt @@ -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}") diff --git a/src/main/kotlin/top/fatweb/api/config/FilterConfig.kt b/src/main/kotlin/top/fatweb/api/config/FilterConfig.kt index 71374f9..e9f8c3d 100644 --- a/src/main/kotlin/top/fatweb/api/config/FilterConfig.kt +++ b/src/main/kotlin/top/fatweb/api/config/FilterConfig.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/config/InitConfig.kt b/src/main/kotlin/top/fatweb/api/config/InitConfig.kt index 9eab4ca..a055dea 100644 --- a/src/main/kotlin/top/fatweb/api/config/InitConfig.kt +++ b/src/main/kotlin/top/fatweb/api/config/InitConfig.kt @@ -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( diff --git a/src/main/kotlin/top/fatweb/api/config/MybatisPlusConfig.kt b/src/main/kotlin/top/fatweb/api/config/MybatisPlusConfig.kt index 2ce739c..f4371ae 100644 --- a/src/main/kotlin/top/fatweb/api/config/MybatisPlusConfig.kt +++ b/src/main/kotlin/top/fatweb/api/config/MybatisPlusConfig.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/config/RedisConfig.kt b/src/main/kotlin/top/fatweb/api/config/RedisConfig.kt index 14d3ee0..1eee6bb 100644 --- a/src/main/kotlin/top/fatweb/api/config/RedisConfig.kt +++ b/src/main/kotlin/top/fatweb/api/config/RedisConfig.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/config/SecurityConfig.kt b/src/main/kotlin/top/fatweb/api/config/SecurityConfig.kt index 3c9602d..f57d6cd 100644 --- a/src/main/kotlin/top/fatweb/api/config/SecurityConfig.kt +++ b/src/main/kotlin/top/fatweb/api/config/SecurityConfig.kt @@ -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( diff --git a/src/main/kotlin/top/fatweb/api/config/SwaggerConfig.kt b/src/main/kotlin/top/fatweb/api/config/SwaggerConfig.kt index 0525655..800cb9d 100644 --- a/src/main/kotlin/top/fatweb/api/config/SwaggerConfig.kt +++ b/src/main/kotlin/top/fatweb/api/config/SwaggerConfig.kt @@ -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 { diff --git a/src/main/kotlin/top/fatweb/api/config/SysLogConfig.kt b/src/main/kotlin/top/fatweb/api/config/SysLogConfig.kt index ba1c40b..942e42e 100644 --- a/src/main/kotlin/top/fatweb/api/config/SysLogConfig.kt +++ b/src/main/kotlin/top/fatweb/api/config/SysLogConfig.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/config/WebMvcRegistrationsConfig.kt b/src/main/kotlin/top/fatweb/api/config/WebMvcRegistrationsConfig.kt index 1db6a0f..1a9110f 100644 --- a/src/main/kotlin/top/fatweb/api/config/WebMvcRegistrationsConfig.kt +++ b/src/main/kotlin/top/fatweb/api/config/WebMvcRegistrationsConfig.kt @@ -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() diff --git a/src/main/kotlin/top/fatweb/api/controller/ExceptionController.kt b/src/main/kotlin/top/fatweb/api/controller/ExceptionController.kt index e5dfad2..f0c81b1 100644 --- a/src/main/kotlin/top/fatweb/api/controller/ExceptionController.kt +++ b/src/main/kotlin/top/fatweb/api/controller/ExceptionController.kt @@ -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") diff --git a/src/main/kotlin/top/fatweb/api/controller/permission/AuthenticationController.kt b/src/main/kotlin/top/fatweb/api/controller/permission/AuthenticationController.kt index 3c0ded1..2e4d3d2 100644 --- a/src/main/kotlin/top/fatweb/api/controller/permission/AuthenticationController.kt +++ b/src/main/kotlin/top/fatweb/api/controller/permission/AuthenticationController.kt @@ -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( diff --git a/src/main/kotlin/top/fatweb/api/controller/permission/GroupController.kt b/src/main/kotlin/top/fatweb/api/controller/permission/GroupController.kt index 02912da..54947d4 100644 --- a/src/main/kotlin/top/fatweb/api/controller/permission/GroupController.kt +++ b/src/main/kotlin/top/fatweb/api/controller/permission/GroupController.kt @@ -13,12 +13,10 @@ import top.fatweb.api.vo.permission.GroupVo import top.fatweb.api.vo.permission.GroupWithRoleVo /** - *

- * 用户组表 前端控制器 - *

+ * Group controller * * @author FatttSnake - * @since 2023-11-09 + * @since 1.0.0 */ @Tag(name = "用户组管理", description = "用户组管理相关接口") @RestController diff --git a/src/main/kotlin/top/fatweb/api/controller/permission/PowerController.kt b/src/main/kotlin/top/fatweb/api/controller/permission/PowerController.kt index d031d75..ceec0cd 100644 --- a/src/main/kotlin/top/fatweb/api/controller/permission/PowerController.kt +++ b/src/main/kotlin/top/fatweb/api/controller/permission/PowerController.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/controller/permission/RoleController.kt b/src/main/kotlin/top/fatweb/api/controller/permission/RoleController.kt index e0400e3..5422ca8 100644 --- a/src/main/kotlin/top/fatweb/api/controller/permission/RoleController.kt +++ b/src/main/kotlin/top/fatweb/api/controller/permission/RoleController.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/controller/permission/UserController.kt b/src/main/kotlin/top/fatweb/api/controller/permission/UserController.kt index 2dc0f2f..750195b 100644 --- a/src/main/kotlin/top/fatweb/api/controller/permission/UserController.kt +++ b/src/main/kotlin/top/fatweb/api/controller/permission/UserController.kt @@ -12,12 +12,10 @@ import top.fatweb.api.vo.permission.UserWithPowerInfoVo import top.fatweb.api.vo.permission.UserWithRoleInfoVo /** - *

- * 用户表 前端控制器 - *

+ * User controller * * @author FatttSnake - * @since 2023-10-04 + * @since 1.0.0 */ @Tag(name = "用户管理", description = "用户管理相关接口") @RestController diff --git a/src/main/kotlin/top/fatweb/api/controller/system/SysLogController.kt b/src/main/kotlin/top/fatweb/api/controller/system/SysLogController.kt index 6e1cf42..6769f48 100644 --- a/src/main/kotlin/top/fatweb/api/controller/system/SysLogController.kt +++ b/src/main/kotlin/top/fatweb/api/controller/system/SysLogController.kt @@ -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 /** - *

- * 系统日志表 前端控制器 - *

+ * 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> { + fun get(@Valid sysLogGetParam: SysLogGetParam?): ResponseResult> { return ResponseResult.success( ResponseCode.DATABASE_SELECT_SUCCESS, data = SysLogConverter.sysLogPageToSysLogPageVo( sysLogService.getPage(sysLogGetParam) diff --git a/src/main/kotlin/top/fatweb/api/converter/permission/ElementConverter.kt b/src/main/kotlin/top/fatweb/api/converter/permission/ElementConverter.kt index 3ab25e1..33037ec 100644 --- a/src/main/kotlin/top/fatweb/api/converter/permission/ElementConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/permission/ElementConverter.kt @@ -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, diff --git a/src/main/kotlin/top/fatweb/api/converter/permission/GroupConverter.kt b/src/main/kotlin/top/fatweb/api/converter/permission/GroupConverter.kt index bc66d32..2aa7be3 100644 --- a/src/main/kotlin/top/fatweb/api/converter/permission/GroupConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/permission/GroupConverter.kt @@ -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, diff --git a/src/main/kotlin/top/fatweb/api/converter/permission/MenuConverter.kt b/src/main/kotlin/top/fatweb/api/converter/permission/MenuConverter.kt index 3f03508..f1ae116 100644 --- a/src/main/kotlin/top/fatweb/api/converter/permission/MenuConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/permission/MenuConverter.kt @@ -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, diff --git a/src/main/kotlin/top/fatweb/api/converter/permission/ModuleConverter.kt b/src/main/kotlin/top/fatweb/api/converter/permission/ModuleConverter.kt index c7bd76b..e885203 100644 --- a/src/main/kotlin/top/fatweb/api/converter/permission/ModuleConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/permission/ModuleConverter.kt @@ -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, diff --git a/src/main/kotlin/top/fatweb/api/converter/permission/OperationConverter.kt b/src/main/kotlin/top/fatweb/api/converter/permission/OperationConverter.kt index 0c3cd5d..ebf17a2 100644 --- a/src/main/kotlin/top/fatweb/api/converter/permission/OperationConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/permission/OperationConverter.kt @@ -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, diff --git a/src/main/kotlin/top/fatweb/api/converter/permission/PowerConverter.kt b/src/main/kotlin/top/fatweb/api/converter/permission/PowerConverter.kt index 43877fb..30dfcc3 100644 --- a/src/main/kotlin/top/fatweb/api/converter/permission/PowerConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/permission/PowerConverter.kt @@ -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) }, diff --git a/src/main/kotlin/top/fatweb/api/converter/permission/RoleConverter.kt b/src/main/kotlin/top/fatweb/api/converter/permission/RoleConverter.kt index a6bc7c1..5d04df6 100644 --- a/src/main/kotlin/top/fatweb/api/converter/permission/RoleConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/permission/RoleConverter.kt @@ -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, diff --git a/src/main/kotlin/top/fatweb/api/converter/permission/UserConverter.kt b/src/main/kotlin/top/fatweb/api/converter/permission/UserConverter.kt index e84b210..cbc995c 100644 --- a/src/main/kotlin/top/fatweb/api/converter/permission/UserConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/permission/UserConverter.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/converter/permission/UserInfoConverter.kt b/src/main/kotlin/top/fatweb/api/converter/permission/UserInfoConverter.kt index 0d3e2b6..59c0252 100644 --- a/src/main/kotlin/top/fatweb/api/converter/permission/UserInfoConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/permission/UserInfoConverter.kt @@ -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, diff --git a/src/main/kotlin/top/fatweb/api/converter/system/SysLogConverter.kt b/src/main/kotlin/top/fatweb/api/converter/system/SysLogConverter.kt index 7ba551c..7b3b906 100644 --- a/src/main/kotlin/top/fatweb/api/converter/system/SysLogConverter.kt +++ b/src/main/kotlin/top/fatweb/api/converter/system/SysLogConverter.kt @@ -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): PageVo = PageVo( + fun sysLogPageToSysLogPageVo(syslogPage: IPage): PageVo = PageVo( syslogPage.total, syslogPage.pages, syslogPage.size, syslogPage.current, syslogPage.records.map { - SysLogGetVo( + SysLogVo( id = it.id, logType = it.logType, operateUserId = it.operateUserId, diff --git a/src/main/kotlin/top/fatweb/api/entity/common/BusinessCode.kt b/src/main/kotlin/top/fatweb/api/entity/common/BusinessCode.kt index 02178f5..e4bc399 100644 --- a/src/main/kotlin/top/fatweb/api/entity/common/BusinessCode.kt +++ b/src/main/kotlin/top/fatweb/api/entity/common/BusinessCode.kt @@ -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) diff --git a/src/main/kotlin/top/fatweb/api/entity/common/ResponseCode.kt b/src/main/kotlin/top/fatweb/api/entity/common/ResponseCode.kt index 18d621e..4de6865 100644 --- a/src/main/kotlin/top/fatweb/api/entity/common/ResponseCode.kt +++ b/src/main/kotlin/top/fatweb/api/entity/common/ResponseCode.kt @@ -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), diff --git a/src/main/kotlin/top/fatweb/api/entity/common/ResponseResult.kt b/src/main/kotlin/top/fatweb/api/entity/common/ResponseResult.kt index fb5452e..601acc1 100644 --- a/src/main/kotlin/top/fatweb/api/entity/common/ResponseResult.kt +++ b/src/main/kotlin/top/fatweb/api/entity/common/ResponseResult.kt @@ -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 private constructor( @Schema(description = "响应码", defaultValue = "200") val code: Int, diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/Element.kt b/src/main/kotlin/top/fatweb/api/entity/permission/Element.kt index 533b762..106bb07 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/Element.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/Element.kt @@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName import java.io.Serializable /** - *

- * 页面元素表 - *

+ * Element entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_element") class Element : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/Group.kt b/src/main/kotlin/top/fatweb/api/entity/permission/Group.kt index 732feb8..5d0109e 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/Group.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/Group.kt @@ -5,12 +5,10 @@ import java.io.Serializable import java.time.LocalDateTime /** - *

- * 用户组表 - *

+ * Group entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_group") class Group : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/LoginUser.kt b/src/main/kotlin/top/fatweb/api/entity/permission/LoginUser.kt index 84837d7..a31223d 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/LoginUser.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/LoginUser.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/Menu.kt b/src/main/kotlin/top/fatweb/api/entity/permission/Menu.kt index 79964d4..2ef1935 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/Menu.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/Menu.kt @@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName import java.io.Serializable /** - *

- * 菜单表 - *

+ * Menu entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_menu") class Menu : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/Module.kt b/src/main/kotlin/top/fatweb/api/entity/permission/Module.kt index 088cd86..2d76a4b 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/Module.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/Module.kt @@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName import java.io.Serializable /** - *

- * 模块表 - *

+ * Module Entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_module") class Module : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/Operation.kt b/src/main/kotlin/top/fatweb/api/entity/permission/Operation.kt index 9970982..2cbe6ab 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/Operation.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/Operation.kt @@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName import java.io.Serializable /** - *

- * 功能表 - *

+ * Operation entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_operation") class Operation : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/Power.kt b/src/main/kotlin/top/fatweb/api/entity/permission/Power.kt index 7886707..2446b6d 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/Power.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/Power.kt @@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName import java.io.Serializable /** - *

- * 权限表 - *

+ * Power entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_power") class Power : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/PowerRole.kt b/src/main/kotlin/top/fatweb/api/entity/permission/PowerRole.kt index 43c87af..58730c1 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/PowerRole.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/PowerRole.kt @@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.annotation.* import java.io.Serializable /** - *

- * 中间表-权限-角色 - *

+ * Power role intermediate entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_power_role") class PowerRole : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/PowerSet.kt b/src/main/kotlin/top/fatweb/api/entity/permission/PowerSet.kt index 744862d..3268be0 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/PowerSet.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/PowerSet.kt @@ -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? = null diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/PowerType.kt b/src/main/kotlin/top/fatweb/api/entity/permission/PowerType.kt index af0056e..6119271 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/PowerType.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/PowerType.kt @@ -6,12 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableName import java.io.Serializable /** - *

- * 权限类型表 - *

+ * Power type entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_power_type") class PowerType : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/Role.kt b/src/main/kotlin/top/fatweb/api/entity/permission/Role.kt index 6f31557..730a0b1 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/Role.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/Role.kt @@ -5,12 +5,10 @@ import java.io.Serializable import java.time.LocalDateTime /** - *

- * 角色表 - *

+ * Role entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_role") class Role : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/RoleGroup.kt b/src/main/kotlin/top/fatweb/api/entity/permission/RoleGroup.kt index 2d780b5..a56eff2 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/RoleGroup.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/RoleGroup.kt @@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.annotation.* import java.io.Serializable /** - *

- * 中间表-角色-用户组 - *

+ * Role group intermediate entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_role_group") class RoleGroup : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/User.kt b/src/main/kotlin/top/fatweb/api/entity/permission/User.kt index 7286e41..da9dd97 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/User.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/User.kt @@ -5,12 +5,10 @@ import java.io.Serializable import java.time.LocalDateTime /** - *

- * 用户表 - *

+ * User entity * * @author FatttSnake - * @since 2023-10-04 + * @since 1.0.0 */ @TableName("t_user") class User() : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/UserGroup.kt b/src/main/kotlin/top/fatweb/api/entity/permission/UserGroup.kt index ad2264f..8438feb 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/UserGroup.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/UserGroup.kt @@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.annotation.* import java.io.Serializable /** - *

- * 中间表-用户-用户组 - *

+ * User group intermediate entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_user_group") class UserGroup : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/UserInfo.kt b/src/main/kotlin/top/fatweb/api/entity/permission/UserInfo.kt index dfe59f4..71a8294 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/UserInfo.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/UserInfo.kt @@ -5,12 +5,10 @@ import java.io.Serializable import java.time.LocalDateTime /** - *

- * 用户资料表 - *

+ * User information entity * * @author FatttSnake - * @since 2023-10-30 + * @since 1.0.0 */ @TableName("t_user_info") class UserInfo : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/permission/UserRole.kt b/src/main/kotlin/top/fatweb/api/entity/permission/UserRole.kt index ffd6c49..d96e836 100644 --- a/src/main/kotlin/top/fatweb/api/entity/permission/UserRole.kt +++ b/src/main/kotlin/top/fatweb/api/entity/permission/UserRole.kt @@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.annotation.* import java.io.Serializable /** - *

- * 中间表-用户-角色 - *

+ * User role intermediate entity * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @TableName("t_user_role") class UserRole : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/entity/system/SysLog.kt b/src/main/kotlin/top/fatweb/api/entity/system/SysLog.kt index 304228c..5f0bd65 100644 --- a/src/main/kotlin/top/fatweb/api/entity/system/SysLog.kt +++ b/src/main/kotlin/top/fatweb/api/entity/system/SysLog.kt @@ -7,12 +7,10 @@ import java.io.Serializable import java.time.LocalDateTime /** - *

- * 系统日志表 - *

+ * System log entity * * @author FatttSnake - * @since 2023-10-18 + * @since 1.0.0 */ @TableName("t_sys_log") class SysLog : Serializable { diff --git a/src/main/kotlin/top/fatweb/api/exception/TokenHasExpiredException.kt b/src/main/kotlin/top/fatweb/api/exception/TokenHasExpiredException.kt index 2b0521f..fbd8a05 100644 --- a/src/main/kotlin/top/fatweb/api/exception/TokenHasExpiredException.kt +++ b/src/main/kotlin/top/fatweb/api/exception/TokenHasExpiredException.kt @@ -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") \ No newline at end of file diff --git a/src/main/kotlin/top/fatweb/api/filter/ExceptionFilter.kt b/src/main/kotlin/top/fatweb/api/filter/ExceptionFilter.kt index 0d4ac53..6398fcd 100644 --- a/src/main/kotlin/top/fatweb/api/filter/ExceptionFilter.kt +++ b/src/main/kotlin/top/fatweb/api/filter/ExceptionFilter.kt @@ -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( diff --git a/src/main/kotlin/top/fatweb/api/filter/JwtAuthenticationTokenFilter.kt b/src/main/kotlin/top/fatweb/api/filter/JwtAuthenticationTokenFilter.kt index 3078509..4173d58 100644 --- a/src/main/kotlin/top/fatweb/api/filter/JwtAuthenticationTokenFilter.kt +++ b/src/main/kotlin/top/fatweb/api/filter/JwtAuthenticationTokenFilter.kt @@ -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( diff --git a/src/main/kotlin/top/fatweb/api/handler/DataMetaObjectHandler.kt b/src/main/kotlin/top/fatweb/api/handler/DataMetaObjectHandler.kt index b4b87a8..359ee9a 100644 --- a/src/main/kotlin/top/fatweb/api/handler/DataMetaObjectHandler.kt +++ b/src/main/kotlin/top/fatweb/api/handler/DataMetaObjectHandler.kt @@ -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?) { diff --git a/src/main/kotlin/top/fatweb/api/handler/ExceptionHandler.kt b/src/main/kotlin/top/fatweb/api/handler/ExceptionHandler.kt index e8d9150..a1d3100 100644 --- a/src/main/kotlin/top/fatweb/api/handler/ExceptionHandler.kt +++ b/src/main/kotlin/top/fatweb/api/handler/ExceptionHandler.kt @@ -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) diff --git a/src/main/kotlin/top/fatweb/api/handler/JwtAccessDeniedHandler.kt b/src/main/kotlin/top/fatweb/api/handler/JwtAccessDeniedHandler.kt index a47a8c9..feddac2 100644 --- a/src/main/kotlin/top/fatweb/api/handler/JwtAccessDeniedHandler.kt +++ b/src/main/kotlin/top/fatweb/api/handler/JwtAccessDeniedHandler.kt @@ -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( diff --git a/src/main/kotlin/top/fatweb/api/handler/JwtAuthenticationEntryPointHandler.kt b/src/main/kotlin/top/fatweb/api/handler/JwtAuthenticationEntryPointHandler.kt index 4725a66..a2af324 100644 --- a/src/main/kotlin/top/fatweb/api/handler/JwtAuthenticationEntryPointHandler.kt +++ b/src/main/kotlin/top/fatweb/api/handler/JwtAuthenticationEntryPointHandler.kt @@ -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( diff --git a/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt b/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt index b9a1452..48dd9d5 100644 --- a/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt +++ b/src/main/kotlin/top/fatweb/api/interceptor/SysLogInterceptor.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/ElementMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/ElementMapper.kt index b3de56c..f350e7f 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/ElementMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/ElementMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.Element /** - *

- * 页面元素表 Mapper 接口 - *

+ * Element mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface ElementMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/GroupMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/GroupMapper.kt index a9b500e..585ce47 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/GroupMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/GroupMapper.kt @@ -6,12 +6,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.Group /** - *

- * 用户组表 Mapper 接口 - *

+ * Group mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface GroupMapper : BaseMapper { diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/MenuMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/MenuMapper.kt index f50941a..4001264 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/MenuMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/MenuMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.Menu /** - *

- * 菜单表 Mapper 接口 - *

+ * Menu mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface MenuMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/ModuleMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/ModuleMapper.kt index e52dfe6..a684499 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/ModuleMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/ModuleMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.Module /** - *

- * 模块表 Mapper 接口 - *

+ * Module mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface ModuleMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/OperationMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/OperationMapper.kt index da54c8f..1a8edd2 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/OperationMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/OperationMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.Operation /** - *

- * 功能表 Mapper 接口 - *

+ * Operation mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface OperationMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/PowerMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/PowerMapper.kt index f0a9e4d..4224257 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/PowerMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/PowerMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.Power /** - *

- * 权限表 Mapper 接口 - *

+ * Power mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface PowerMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/PowerRoleMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/PowerRoleMapper.kt index 565416d..e5698b9 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/PowerRoleMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/PowerRoleMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.PowerRole /** - *

- * 中间表-权限-角色 Mapper 接口 - *

+ * Power role intermediate mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface PowerRoleMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/PowerTypeMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/PowerTypeMapper.kt deleted file mode 100644 index d74ce5b..0000000 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/PowerTypeMapper.kt +++ /dev/null @@ -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 - -/** - *

- * 权限类型表 Mapper 接口 - *

- * - * @author FatttSnake - * @since 2023-10-25 - */ -@Mapper -interface PowerTypeMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/RoleGroupMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/RoleGroupMapper.kt index 6d8e73a..a28ff94 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/RoleGroupMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/RoleGroupMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.RoleGroup /** - *

- * 中间表-角色-用户组 Mapper 接口 - *

+ * Role group intermediate mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface RoleGroupMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/RoleMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/RoleMapper.kt index 578fc96..b87af6e 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/RoleMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/RoleMapper.kt @@ -6,12 +6,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.Role /** - *

- * 角色表 Mapper 接口 - *

+ * Role mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface RoleMapper : BaseMapper { diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/UserGroupMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/UserGroupMapper.kt index 5dac8dd..db5083f 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/UserGroupMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/UserGroupMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.UserGroup /** - *

- * 中间表-用户-用户组 Mapper 接口 - *

+ * User group intermediate mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface UserGroupMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/UserInfoMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/UserInfoMapper.kt index 630f77c..ce31cda 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/UserInfoMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/UserInfoMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.UserInfo /** - *

- * 用户资料表 Mapper 接口 - *

+ * User information mapper * * @author FatttSnake - * @since 2023-10-30 + * @since 1.0.0 */ @Mapper interface UserInfoMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/UserMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/UserMapper.kt index 4d237cc..f1012c6 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/UserMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/UserMapper.kt @@ -6,12 +6,10 @@ import org.apache.ibatis.annotations.Param import top.fatweb.api.entity.permission.User /** - *

- * 用户表 Mapper 接口 - *

+ * User mapper * * @author FatttSnake - * @since 2023-10-04 + * @since 1.0.0 */ @Mapper interface UserMapper : BaseMapper { diff --git a/src/main/kotlin/top/fatweb/api/mapper/permission/UserRoleMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/permission/UserRoleMapper.kt index d6f5478..25aefd2 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/permission/UserRoleMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/permission/UserRoleMapper.kt @@ -5,12 +5,10 @@ import org.apache.ibatis.annotations.Mapper import top.fatweb.api.entity.permission.UserRole /** - *

- * 中间表-用户-角色 Mapper 接口 - *

+ * User role intermediate mapper * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Mapper interface UserRoleMapper : BaseMapper diff --git a/src/main/kotlin/top/fatweb/api/mapper/system/SysLogMapper.kt b/src/main/kotlin/top/fatweb/api/mapper/system/SysLogMapper.kt index d66e2d8..15a763b 100644 --- a/src/main/kotlin/top/fatweb/api/mapper/system/SysLogMapper.kt +++ b/src/main/kotlin/top/fatweb/api/mapper/system/SysLogMapper.kt @@ -7,12 +7,10 @@ import top.fatweb.api.entity.system.SysLog import java.time.LocalDateTime /** - *

- * 系统日志表 Mapper 接口 - *

+ * System log mapper * * @author FatttSnake - * @since 2023-10-18 + * @since 1.0.0 */ @Mapper interface SysLogMapper : BaseMapper { diff --git a/src/main/kotlin/top/fatweb/api/param/PageSortParam.kt b/src/main/kotlin/top/fatweb/api/param/PageSortParam.kt index ed10a0e..a90d411 100644 --- a/src/main/kotlin/top/fatweb/api/param/PageSortParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/PageSortParam.kt @@ -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") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/GroupAddParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/GroupAddParam.kt index 309bbf2..e7902c1 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/GroupAddParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/GroupAddParam.kt @@ -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 = "用户组名称") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/GroupChangeStatusParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/GroupChangeStatusParam.kt index 5f18624..181fd62 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/GroupChangeStatusParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/GroupChangeStatusParam.kt @@ -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") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/GroupDeleteParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/GroupDeleteParam.kt index c68e60f..5e9a710 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/GroupDeleteParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/GroupDeleteParam.kt @@ -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 列表") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/GroupGetParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/GroupGetParam.kt index 373f20d..5e48636 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/GroupGetParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/GroupGetParam.kt @@ -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 = "查询用户组名称") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/GroupUpdateParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/GroupUpdateParam.kt index 5b4a686..eb84f1f 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/GroupUpdateParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/GroupUpdateParam.kt @@ -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") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/LoginParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/LoginParam.kt index 3ed78f2..4176bc0 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/LoginParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/LoginParam.kt @@ -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) diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/RoleAddParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/RoleAddParam.kt index 8fe1414..23c2ce1 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/RoleAddParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/RoleAddParam.kt @@ -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 = "角色名称") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/RoleChangeStatusParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/RoleChangeStatusParam.kt index dbad488..a90548d 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/RoleChangeStatusParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/RoleChangeStatusParam.kt @@ -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") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/RoleDeleteParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/RoleDeleteParam.kt index 1fe8669..1c58d47 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/RoleDeleteParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/RoleDeleteParam.kt @@ -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 列表") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/RoleGetParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/RoleGetParam.kt index 2246cd0..a0d7aeb 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/RoleGetParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/RoleGetParam.kt @@ -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 = "查询角色名称") diff --git a/src/main/kotlin/top/fatweb/api/param/authentication/RoleUpdateParam.kt b/src/main/kotlin/top/fatweb/api/param/authentication/RoleUpdateParam.kt index 6423b48..e83e698 100644 --- a/src/main/kotlin/top/fatweb/api/param/authentication/RoleUpdateParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/authentication/RoleUpdateParam.kt @@ -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") diff --git a/src/main/kotlin/top/fatweb/api/param/system/SysLogGetParam.kt b/src/main/kotlin/top/fatweb/api/param/system/SysLogGetParam.kt index c605079..84ecb72 100644 --- a/src/main/kotlin/top/fatweb/api/param/system/SysLogGetParam.kt +++ b/src/main/kotlin/top/fatweb/api/param/system/SysLogGetParam.kt @@ -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"]) diff --git a/src/main/kotlin/top/fatweb/api/properties/AdminProperties.kt b/src/main/kotlin/top/fatweb/api/properties/AdminProperties.kt index a14e079..3fb6d9b 100644 --- a/src/main/kotlin/top/fatweb/api/properties/AdminProperties.kt +++ b/src/main/kotlin/top/fatweb/api/properties/AdminProperties.kt @@ -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 { diff --git a/src/main/kotlin/top/fatweb/api/properties/SecurityProperties.kt b/src/main/kotlin/top/fatweb/api/properties/SecurityProperties.kt index b4b475a..8f287a3 100644 --- a/src/main/kotlin/top/fatweb/api/properties/SecurityProperties.kt +++ b/src/main/kotlin/top/fatweb/api/properties/SecurityProperties.kt @@ -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 { diff --git a/src/main/kotlin/top/fatweb/api/properties/ServerProperties.kt b/src/main/kotlin/top/fatweb/api/properties/ServerProperties.kt index 124cb39..d0ea0af 100644 --- a/src/main/kotlin/top/fatweb/api/properties/ServerProperties.kt +++ b/src/main/kotlin/top/fatweb/api/properties/ServerProperties.kt @@ -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 { diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IAuthenticationService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IAuthenticationService.kt index 9e4f59f..ea0aafd 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IAuthenticationService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IAuthenticationService.kt @@ -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 diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IElementService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IElementService.kt index 64157d9..a4dcb4a 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IElementService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IElementService.kt @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.Element /** - *

- * 页面元素表 服务类 - *

+ * Element service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IElementService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IGroupService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IGroupService.kt index e49b315..65f2559 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IGroupService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IGroupService.kt @@ -8,12 +8,10 @@ import top.fatweb.api.vo.permission.GroupVo import top.fatweb.api.vo.permission.GroupWithRoleVo /** - *

- * 用户组表 服务类 - *

+ * Group service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IGroupService : IService { fun getPage(groupGetParam: GroupGetParam?): PageVo diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IMenuService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IMenuService.kt index 0bcd1f1..5ed2ff1 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IMenuService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IMenuService.kt @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.Menu /** - *

- * 菜单表 服务类 - *

+ * Menu service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IMenuService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IModuleService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IModuleService.kt index e7912fd..4a0a942 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IModuleService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IModuleService.kt @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.Module /** - *

- * 模块表 服务类 - *

+ * Module service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IModuleService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IOperationService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IOperationService.kt index ce0b8b9..e995a57 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IOperationService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IOperationService.kt @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.Operation /** - *

- * 功能表 服务类 - *

+ * Operation service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IOperationService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IPowerRoleService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IPowerRoleService.kt index 8b8e0e3..80582c5 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IPowerRoleService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IPowerRoleService.kt @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.PowerRole /** - *

- * 中间表-权限-角色 服务类 - *

+ * Power role intermediate service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IPowerRoleService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IPowerService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IPowerService.kt index 481e52f..ce777e8 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IPowerService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IPowerService.kt @@ -5,12 +5,10 @@ import top.fatweb.api.entity.permission.Power import top.fatweb.api.vo.permission.PowerSetVo /** - *

- * 权限表 服务类 - *

+ * Power service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IPowerService : IService { fun getList(): PowerSetVo diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IPowerTypeService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IPowerTypeService.kt deleted file mode 100644 index 8202bb7..0000000 --- a/src/main/kotlin/top/fatweb/api/service/permission/IPowerTypeService.kt +++ /dev/null @@ -1,14 +0,0 @@ -package top.fatweb.api.service.permission - -import com.baomidou.mybatisplus.extension.service.IService -import top.fatweb.api.entity.permission.PowerType - -/** - *

- * 权限类型表 服务类 - *

- * - * @author FatttSnake - * @since 2023-10-25 - */ -interface IPowerTypeService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IRoleGroupService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IRoleGroupService.kt index 30ce26b..264b81b 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IRoleGroupService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IRoleGroupService.kt @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.RoleGroup /** - *

- * 中间表-角色-用户组 服务类 - *

+ * Role group intermediate service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IRoleGroupService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IRoleService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IRoleService.kt index eba95c3..e7ceaeb 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IRoleService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IRoleService.kt @@ -8,12 +8,10 @@ import top.fatweb.api.vo.permission.RoleVo import top.fatweb.api.vo.permission.RoleWithPowerVo /** - *

- * 角色表 服务类 - *

+ * Role service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IRoleService : IService { fun getPage(roleGetParam: RoleGetParam?): PageVo diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IUserGroupService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IUserGroupService.kt index 0356954..4d835a2 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IUserGroupService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IUserGroupService.kt @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.UserGroup /** - *

- * 中间表-用户-用户组 服务类 - *

+ * User group intermediate service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IUserGroupService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IUserInfoService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IUserInfoService.kt index 19ea471..3912c82 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IUserInfoService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IUserInfoService.kt @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.UserInfo /** - *

- * 用户资料表 服务类 - *

+ * User information service interface * * @author FatttSnake - * @since 2023-10-30 + * @since 1.0.0 */ interface IUserInfoService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IUserRoleService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IUserRoleService.kt index be86fef..5df6ff6 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IUserRoleService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IUserRoleService.kt @@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.UserRole /** - *

- * 中间表-用户-角色 服务类 - *

+ * User role intermediate service interface * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ interface IUserRoleService : IService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/IUserService.kt b/src/main/kotlin/top/fatweb/api/service/permission/IUserService.kt index a0b29c3..327bbdc 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/IUserService.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/IUserService.kt @@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.extension.service.IService import top.fatweb.api.entity.permission.User /** - *

- * 用户表 服务类 - *

+ * User service interface * * @author FatttSnake - * @since 2023-10-04 + * @since 1.0.0 */ interface IUserService : IService { fun getUserWithPower(username: String): User? diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/AuthenticationServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/AuthenticationServiceImpl.kt index 0dfedd1..d68df8b 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/AuthenticationServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/AuthenticationServiceImpl.kt @@ -21,6 +21,12 @@ import top.fatweb.api.vo.permission.TokenVo import java.time.LocalDateTime import java.time.ZoneOffset +/** + * Authentication service implement + * + * @author FatttSnake + * @since 1.0.0 + */ @Service class AuthenticationServiceImpl( private val authenticationManager: AuthenticationManager, diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/ElementServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/ElementServiceImpl.kt index 6f644f5..2a108bc 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/ElementServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/ElementServiceImpl.kt @@ -7,12 +7,10 @@ import top.fatweb.api.mapper.permission.ElementMapper import top.fatweb.api.service.permission.IElementService /** - *

- * 页面元素表 服务实现类 - *

+ * Element service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class ElementServiceImpl : ServiceImpl(), IElementService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/GroupServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/GroupServiceImpl.kt index 5628dfd..06a8696 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/GroupServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/GroupServiceImpl.kt @@ -18,12 +18,10 @@ import top.fatweb.api.vo.permission.GroupVo import top.fatweb.api.vo.permission.GroupWithRoleVo /** - *

- * 用户组表 服务实现类 - *

+ * Group service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class GroupServiceImpl( diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/MenuServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/MenuServiceImpl.kt index cc18cde..da9f21d 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/MenuServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/MenuServiceImpl.kt @@ -7,12 +7,10 @@ import top.fatweb.api.mapper.permission.MenuMapper import top.fatweb.api.service.permission.IMenuService /** - *

- * 菜单表 服务实现类 - *

+ * Menu service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class MenuServiceImpl : ServiceImpl(), IMenuService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/ModuleServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/ModuleServiceImpl.kt index fbbe08b..e259d25 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/ModuleServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/ModuleServiceImpl.kt @@ -7,12 +7,10 @@ import top.fatweb.api.mapper.permission.ModuleMapper import top.fatweb.api.service.permission.IModuleService /** - *

- * 模块表 服务实现类 - *

+ * Module service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class ModuleServiceImpl : ServiceImpl(), IModuleService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/OperationServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/OperationServiceImpl.kt index 4eeed21..32c3fbb 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/OperationServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/OperationServiceImpl.kt @@ -7,12 +7,10 @@ import top.fatweb.api.mapper.permission.OperationMapper import top.fatweb.api.service.permission.IOperationService /** - *

- * 功能表 服务实现类 - *

+ * Operation service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class OperationServiceImpl : ServiceImpl(), IOperationService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerRoleServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerRoleServiceImpl.kt index 1dafe8b..aeb9999 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerRoleServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerRoleServiceImpl.kt @@ -7,12 +7,10 @@ import top.fatweb.api.mapper.permission.PowerRoleMapper import top.fatweb.api.service.permission.IPowerRoleService /** - *

- * 中间表-权限-角色 服务实现类 - *

+ * Power role intermediate service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class PowerRoleServiceImpl : ServiceImpl(), IPowerRoleService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerServiceImpl.kt index 78f7d9d..fdf0cfd 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerServiceImpl.kt @@ -9,12 +9,10 @@ import top.fatweb.api.mapper.permission.PowerMapper import top.fatweb.api.service.permission.* /** - *

- * 权限表 服务实现类 - *

+ * Power service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class PowerServiceImpl( diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerTypeServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerTypeServiceImpl.kt deleted file mode 100644 index d051131..0000000 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/PowerTypeServiceImpl.kt +++ /dev/null @@ -1,18 +0,0 @@ -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 - -/** - *

- * 权限类型表 服务实现类 - *

- * - * @author FatttSnake - * @since 2023-10-25 - */ -@Service -class PowerTypeServiceImpl : ServiceImpl(), IPowerTypeService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/RoleGroupServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/RoleGroupServiceImpl.kt index 002c299..468f153 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/RoleGroupServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/RoleGroupServiceImpl.kt @@ -7,12 +7,10 @@ import top.fatweb.api.mapper.permission.RoleGroupMapper import top.fatweb.api.service.permission.IRoleGroupService /** - *

- * 中间表-角色-用户组 服务实现类 - *

+ * Role group intermediate service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class RoleGroupServiceImpl : ServiceImpl(), IRoleGroupService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/RoleServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/RoleServiceImpl.kt index 0b464a0..a89ed18 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/RoleServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/RoleServiceImpl.kt @@ -20,12 +20,10 @@ import top.fatweb.api.vo.permission.RoleVo import top.fatweb.api.vo.permission.RoleWithPowerVo /** - *

- * 角色表 服务实现类 - *

+ * Role service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class RoleServiceImpl( diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserDetailsServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserDetailsServiceImpl.kt index e6847d7..46e055d 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserDetailsServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserDetailsServiceImpl.kt @@ -6,6 +6,12 @@ import org.springframework.stereotype.Service import top.fatweb.api.entity.permission.LoginUser import top.fatweb.api.service.permission.IUserService +/** + * User details service implement + * + * @author FatttSnake + * @since 1.0.0 + */ @Service class UserDetailsServiceImpl(val userService: IUserService) : UserDetailsService { override fun loadUserByUsername(username: String): UserDetails { diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserGroupServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserGroupServiceImpl.kt index 7bcfd5d..a5d7c54 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserGroupServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserGroupServiceImpl.kt @@ -7,12 +7,10 @@ import top.fatweb.api.mapper.permission.UserGroupMapper import top.fatweb.api.service.permission.IUserGroupService /** - *

- * 中间表-用户-用户组 服务实现类 - *

+ * User group intermediate service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class UserGroupServiceImpl : ServiceImpl(), IUserGroupService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserInfoServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserInfoServiceImpl.kt index 73cc191..a48de2d 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserInfoServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserInfoServiceImpl.kt @@ -7,12 +7,10 @@ import top.fatweb.api.mapper.permission.UserInfoMapper import top.fatweb.api.service.permission.IUserInfoService /** - *

- * 用户资料表 服务实现类 - *

+ * User information service implement * * @author FatttSnake - * @since 2023-10-30 + * @since 1.0.0 */ @Service class UserInfoServiceImpl : ServiceImpl(), IUserInfoService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserRoleServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserRoleServiceImpl.kt index e89f64d..5547d30 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserRoleServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserRoleServiceImpl.kt @@ -7,12 +7,10 @@ import top.fatweb.api.mapper.permission.UserRoleMapper import top.fatweb.api.service.permission.IUserRoleService /** - *

- * 中间表-用户-角色 服务实现类 - *

+ * User role intermediate service implement * * @author FatttSnake - * @since 2023-10-25 + * @since 1.0.0 */ @Service class UserRoleServiceImpl : ServiceImpl(), IUserRoleService diff --git a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserServiceImpl.kt index 34e4b43..9108b3c 100644 --- a/src/main/kotlin/top/fatweb/api/service/permission/impl/UserServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/permission/impl/UserServiceImpl.kt @@ -8,12 +8,10 @@ import top.fatweb.api.service.permission.* import top.fatweb.api.util.WebUtil /** - *

- * 用户表 服务实现类 - *

+ * User service implement * * @author FatttSnake - * @since 2023-10-04 + * @since 1.0.0 */ @Service class UserServiceImpl( diff --git a/src/main/kotlin/top/fatweb/api/service/system/ISysLogService.kt b/src/main/kotlin/top/fatweb/api/service/system/ISysLogService.kt index 1aa0fb6..cf54860 100644 --- a/src/main/kotlin/top/fatweb/api/service/system/ISysLogService.kt +++ b/src/main/kotlin/top/fatweb/api/service/system/ISysLogService.kt @@ -6,12 +6,10 @@ import top.fatweb.api.entity.system.SysLog import top.fatweb.api.param.system.SysLogGetParam /** - *

- * 系统日志表 服务类 - *

+ * System log service interface * * @author FatttSnake - * @since 2023-10-18 + * @since 1.0.0 */ interface ISysLogService : IService { fun getPage(sysLogGetParam: SysLogGetParam?): IPage diff --git a/src/main/kotlin/top/fatweb/api/service/system/impl/SysLogServiceImpl.kt b/src/main/kotlin/top/fatweb/api/service/system/impl/SysLogServiceImpl.kt index 518983d..4742d62 100644 --- a/src/main/kotlin/top/fatweb/api/service/system/impl/SysLogServiceImpl.kt +++ b/src/main/kotlin/top/fatweb/api/service/system/impl/SysLogServiceImpl.kt @@ -12,12 +12,10 @@ import top.fatweb.api.service.system.ISysLogService import top.fatweb.api.util.PageUtil /** - *

- * 系统日志表 服务实现类 - *

+ * System log service implement * * @author FatttSnake - * @since 2023-10-18 + * @since 1.0.0 */ @Service class SysLogServiceImpl : ServiceImpl(), ISysLogService { diff --git a/src/main/kotlin/top/fatweb/api/util/ApiResponseMappingHandlerMapping.kt b/src/main/kotlin/top/fatweb/api/util/ApiResponseMappingHandlerMapping.kt index 8dafc0e..863d468 100644 --- a/src/main/kotlin/top/fatweb/api/util/ApiResponseMappingHandlerMapping.kt +++ b/src/main/kotlin/top/fatweb/api/util/ApiResponseMappingHandlerMapping.kt @@ -6,6 +6,12 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl import top.fatweb.api.annotation.ApiVersion import java.lang.reflect.Method +/** + * Api response mapping handler mapping + * + * @author FatttSnake + * @since 1.0.0 + */ class ApiResponseMappingHandlerMapping : RequestMappingHandlerMapping() { private val versionFlag = "{apiVersion}" diff --git a/src/main/kotlin/top/fatweb/api/util/ApiVersionCondition.kt b/src/main/kotlin/top/fatweb/api/util/ApiVersionCondition.kt index 381edaa..5064cc7 100644 --- a/src/main/kotlin/top/fatweb/api/util/ApiVersionCondition.kt +++ b/src/main/kotlin/top/fatweb/api/util/ApiVersionCondition.kt @@ -4,6 +4,12 @@ import jakarta.servlet.http.HttpServletRequest import org.springframework.web.servlet.mvc.condition.RequestCondition import java.util.regex.Pattern +/** + * Api version condition + * + * @author FatttSnake + * @since 1.0.0 + */ class ApiVersionCondition(private val apiVersion: Int) : RequestCondition { private val versionPrefixPattern: Pattern = Pattern.compile(".*v(\\d+).*") diff --git a/src/main/kotlin/top/fatweb/api/util/ByteUtil.kt b/src/main/kotlin/top/fatweb/api/util/ByteUtil.kt index d8dbfef..3cfc6c1 100644 --- a/src/main/kotlin/top/fatweb/api/util/ByteUtil.kt +++ b/src/main/kotlin/top/fatweb/api/util/ByteUtil.kt @@ -2,6 +2,12 @@ package top.fatweb.api.util import kotlin.math.floor +/** + * Byte util + * + * @author FatttSnake + * @since 1.0.0 + */ object ByteUtil { private const val BASE = 1024 diff --git a/src/main/kotlin/top/fatweb/api/util/JwtUtil.kt b/src/main/kotlin/top/fatweb/api/util/JwtUtil.kt index 7f73719..23212b1 100644 --- a/src/main/kotlin/top/fatweb/api/util/JwtUtil.kt +++ b/src/main/kotlin/top/fatweb/api/util/JwtUtil.kt @@ -8,6 +8,12 @@ import java.util.* import java.util.concurrent.TimeUnit import javax.crypto.spec.SecretKeySpec +/** + * Jwt util + * + * @author FatttSnake + * @since 1.0.0 + */ object JwtUtil { private fun getUUID() = UUID.randomUUID().toString().replace("-", "") diff --git a/src/main/kotlin/top/fatweb/api/util/PageUtil.kt b/src/main/kotlin/top/fatweb/api/util/PageUtil.kt index 2d5c11a..90b4793 100644 --- a/src/main/kotlin/top/fatweb/api/util/PageUtil.kt +++ b/src/main/kotlin/top/fatweb/api/util/PageUtil.kt @@ -4,6 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.OrderItem import com.baomidou.mybatisplus.extension.plugins.pagination.Page import top.fatweb.api.param.PageSortParam +/** + * Page util + * + * @author FatttSnake + * @since 1.0.0 + */ object PageUtil { fun > setPageSort(pageSortParam: PageSortParam?, page: T, defaultOrder: OrderItem? = null) { if (pageSortParam?.sortField != null || pageSortParam?.sortOrder != null) { diff --git a/src/main/kotlin/top/fatweb/api/util/RedisUtil.kt b/src/main/kotlin/top/fatweb/api/util/RedisUtil.kt index 35991a8..231387d 100644 --- a/src/main/kotlin/top/fatweb/api/util/RedisUtil.kt +++ b/src/main/kotlin/top/fatweb/api/util/RedisUtil.kt @@ -5,6 +5,12 @@ import org.springframework.data.redis.core.RedisTemplate import org.springframework.stereotype.Component import java.util.concurrent.TimeUnit +/** + * Redis util + * + * @author FatttSnake + * @since 1.0.0 + */ @Suppress("UNCHECKED_CAST") @Component class RedisUtil(private val redisTemplate: RedisTemplate) { diff --git a/src/main/kotlin/top/fatweb/api/util/StrUtil.kt b/src/main/kotlin/top/fatweb/api/util/StrUtil.kt index e2296a1..47e097b 100644 --- a/src/main/kotlin/top/fatweb/api/util/StrUtil.kt +++ b/src/main/kotlin/top/fatweb/api/util/StrUtil.kt @@ -2,6 +2,12 @@ package top.fatweb.api.util import java.util.regex.Pattern +/** + * String util + * + * @author FatttSnake + * @since 1.0.0 + */ object StrUtil { fun upperToUnderLetter(str: String?): String { str ?: let { return "" } diff --git a/src/main/kotlin/top/fatweb/api/util/WebUtil.kt b/src/main/kotlin/top/fatweb/api/util/WebUtil.kt index 97bed49..1dd0b74 100644 --- a/src/main/kotlin/top/fatweb/api/util/WebUtil.kt +++ b/src/main/kotlin/top/fatweb/api/util/WebUtil.kt @@ -5,6 +5,12 @@ import org.springframework.security.core.context.SecurityContextHolder import top.fatweb.api.entity.permission.LoginUser import top.fatweb.api.properties.SecurityProperties +/** + * Web util + * + * @author FatttSnake + * @since 1.0.0 + */ object WebUtil { fun getLoginUser() = if (SecurityContextHolder.getContext().authentication.principal is String) null else SecurityContextHolder.getContext().authentication.principal as LoginUser diff --git a/src/main/kotlin/top/fatweb/api/vo/PageVo.kt b/src/main/kotlin/top/fatweb/api/vo/PageVo.kt index b10c786..7195856 100644 --- a/src/main/kotlin/top/fatweb/api/vo/PageVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/PageVo.kt @@ -2,6 +2,12 @@ package top.fatweb.api.vo import io.swagger.v3.oas.annotations.media.Schema +/** + * Page value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "分页返回参数") data class PageVo( @Schema(description = "总数量", example = "100") diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/ElementVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/ElementVo.kt index 6b963f7..27ada17 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/ElementVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/ElementVo.kt @@ -2,6 +2,12 @@ package top.fatweb.api.vo.permission import io.swagger.v3.oas.annotations.media.Schema +/** + * Element value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "页面元素返回参数") data class ElementVo( val id: Long?, diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/GroupVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/GroupVo.kt index 1967feb..9635c02 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/GroupVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/GroupVo.kt @@ -5,6 +5,12 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer import io.swagger.v3.oas.annotations.media.Schema import java.time.LocalDateTime +/** + * Group value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "用户组返回参数") data class GroupVo( @JsonSerialize(using = ToStringSerializer::class) diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/GroupWithRoleVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/GroupWithRoleVo.kt index 06b85a3..8cec6b1 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/GroupWithRoleVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/GroupWithRoleVo.kt @@ -5,6 +5,12 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer import io.swagger.v3.oas.annotations.media.Schema import java.time.LocalDateTime +/** + * Group with role value object + * + * @author FatttSnake + * @since 1.0.0 + */ data class GroupWithRoleVo( @JsonSerialize(using = ToStringSerializer::class) val id: Long?, diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/LoginVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/LoginVo.kt index 21a7e77..50b5810 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/LoginVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/LoginVo.kt @@ -3,6 +3,12 @@ package top.fatweb.api.vo.permission import io.swagger.v3.oas.annotations.media.Schema import java.time.LocalDateTime +/** + * Login value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "登录返回参数") data class LoginVo( @Schema( diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/MenuVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/MenuVo.kt index c101f50..ed842ed 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/MenuVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/MenuVo.kt @@ -2,6 +2,12 @@ package top.fatweb.api.vo.permission import io.swagger.v3.oas.annotations.media.Schema +/** + * Menu value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "菜单返回参数") data class MenuVo( val id: Long?, diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/ModuleVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/ModuleVo.kt index 28d8848..ce75e8d 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/ModuleVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/ModuleVo.kt @@ -2,6 +2,12 @@ package top.fatweb.api.vo.permission import io.swagger.v3.oas.annotations.media.Schema +/** + * Module value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "模块返回参数") data class ModuleVo( val id: Long?, diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/OperationVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/OperationVo.kt index c42e8e1..b8d8456 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/OperationVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/OperationVo.kt @@ -2,6 +2,12 @@ package top.fatweb.api.vo.permission import io.swagger.v3.oas.annotations.media.Schema +/** + * Operation value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "功能返回参数") data class OperationVo( val id: Long?, diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/PowerSetVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/PowerSetVo.kt index 600b114..6b53c00 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/PowerSetVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/PowerSetVo.kt @@ -2,6 +2,12 @@ package top.fatweb.api.vo.permission import io.swagger.v3.oas.annotations.media.Schema +/** + * Set of power value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "权限集合返回参数") data class PowerSetVo( @Schema(description = "模块列表") diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/RoleVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/RoleVo.kt index 3ea3a29..32270a0 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/RoleVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/RoleVo.kt @@ -5,6 +5,12 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer import io.swagger.v3.oas.annotations.media.Schema import java.time.LocalDateTime +/** + * Role value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "角色返回参数") data class RoleVo( @JsonSerialize(using = ToStringSerializer::class) diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/RoleWithPowerVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/RoleWithPowerVo.kt index 4ff2f07..7b459c6 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/RoleWithPowerVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/RoleWithPowerVo.kt @@ -5,6 +5,12 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer import io.swagger.v3.oas.annotations.media.Schema import java.time.LocalDateTime +/** + * Role with power value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "角色返回参数") data class RoleWithPowerVo( @JsonSerialize(using = ToStringSerializer::class) diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/TokenVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/TokenVo.kt index 05e8dbe..995b3cc 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/TokenVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/TokenVo.kt @@ -2,6 +2,12 @@ package top.fatweb.api.vo.permission import io.swagger.v3.oas.annotations.media.Schema +/** + * Token value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "Token 返回参数") data class TokenVo( @Schema( diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/UserInfoVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/UserInfoVo.kt index d78c21f..7c66118 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/UserInfoVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/UserInfoVo.kt @@ -5,6 +5,12 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer import io.swagger.v3.oas.annotations.media.Schema import java.time.LocalDateTime +/** + * User information value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "用户资料返回参数") data class UserInfoVo( @JsonSerialize(using = ToStringSerializer::class) diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/UserWithPowerInfoVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/UserWithPowerInfoVo.kt index 010c446..b54d501 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/UserWithPowerInfoVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/UserWithPowerInfoVo.kt @@ -5,6 +5,12 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer import io.swagger.v3.oas.annotations.media.Schema import java.time.LocalDateTime +/** + * User with power information value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "用户权限信息返回参数") data class UserWithPowerInfoVo( @JsonSerialize(using = ToStringSerializer::class) diff --git a/src/main/kotlin/top/fatweb/api/vo/permission/UserWithRoleInfoVo.kt b/src/main/kotlin/top/fatweb/api/vo/permission/UserWithRoleInfoVo.kt index 87369b0..7c96e69 100644 --- a/src/main/kotlin/top/fatweb/api/vo/permission/UserWithRoleInfoVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/permission/UserWithRoleInfoVo.kt @@ -5,6 +5,12 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer import io.swagger.v3.oas.annotations.media.Schema import java.time.LocalDateTime +/** + * User with role information value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "用户角色信息返回参数") data class UserWithRoleInfoVo( @JsonSerialize(using = ToStringSerializer::class) diff --git a/src/main/kotlin/top/fatweb/api/vo/system/SysLogGetVo.kt b/src/main/kotlin/top/fatweb/api/vo/system/SysLogVo.kt similarity index 94% rename from src/main/kotlin/top/fatweb/api/vo/system/SysLogGetVo.kt rename to src/main/kotlin/top/fatweb/api/vo/system/SysLogVo.kt index b8d45c6..7495a2f 100644 --- a/src/main/kotlin/top/fatweb/api/vo/system/SysLogGetVo.kt +++ b/src/main/kotlin/top/fatweb/api/vo/system/SysLogVo.kt @@ -5,8 +5,14 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer import io.swagger.v3.oas.annotations.media.Schema import java.time.LocalDateTime +/** + * System log value object + * + * @author FatttSnake + * @since 1.0.0 + */ @Schema(description = "获取系统日志返回参数") -class SysLogGetVo( +class SysLogVo( @JsonSerialize(using = ToStringSerializer::class) val id: Long?, diff --git a/src/main/resources/mapper/permission/PowerTypeMapper.xml b/src/main/resources/mapper/permission/PowerTypeMapper.xml deleted file mode 100644 index 8c3fe6e..0000000 --- a/src/main/resources/mapper/permission/PowerTypeMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - -