Change namespace to top.fatweb.oxygen.api
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api
|
||||
package top.fatweb.oxygen.api
|
||||
|
||||
import org.slf4j.LoggerFactory
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
@@ -17,7 +17,7 @@ import java.util.*
|
||||
@SpringBootApplication
|
||||
@EnableTransactionManagement
|
||||
@EnableScheduling
|
||||
class FatWebApiApplication
|
||||
class OxygenApiApplication
|
||||
|
||||
/**
|
||||
* Main function
|
||||
@@ -53,10 +53,10 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
if (File("application-config.yml").exists() || File("data/application-config.yml").exists()) {
|
||||
runApplication<FatWebApiApplication>(*args)
|
||||
runApplication<OxygenApiApplication>(*args)
|
||||
} else {
|
||||
logger.warn("File 'application-config.yml' cannot be found in the running path or the data path. The configuration file template 'application-config.example.yml' has been created in directory 'data'. Please change the configuration file content, move it to the running path, rename it to 'application-config.yml', and then restart the server.")
|
||||
FatWebApiApplication::class.java.getResource("/application-config-template.yml")?.readText()?.let {
|
||||
OxygenApiApplication::class.java.getResource("/application-config-template.yml")?.readText()?.let {
|
||||
File("data/application-config.example.yml").writeText(
|
||||
it.replace(
|
||||
"\$uuid\$", UUID.randomUUID().toString().replace("-", "")
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.annotation
|
||||
package top.fatweb.oxygen.api.annotation
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag
|
||||
import org.springframework.core.annotation.AliasFor
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.annotation
|
||||
package top.fatweb.oxygen.api.annotation
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag
|
||||
import org.springframework.core.annotation.AliasFor
|
||||
@@ -1,6 +1,6 @@
|
||||
package top.fatweb.api.annotation
|
||||
package top.fatweb.oxygen.api.annotation
|
||||
|
||||
import top.fatweb.api.entity.system.EventLog
|
||||
import top.fatweb.oxygen.api.entity.system.EventLog
|
||||
|
||||
/**
|
||||
* Event log record annotation
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.annotation
|
||||
package top.fatweb.oxygen.api.annotation
|
||||
|
||||
import io.swagger.v3.oas.annotations.Hidden
|
||||
import org.springframework.core.annotation.AliasFor
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.aop
|
||||
package top.fatweb.oxygen.api.aop
|
||||
|
||||
import org.aspectj.lang.JoinPoint
|
||||
import org.aspectj.lang.annotation.AfterReturning
|
||||
@@ -6,11 +6,11 @@ import org.aspectj.lang.annotation.Aspect
|
||||
import org.aspectj.lang.annotation.Pointcut
|
||||
import org.aspectj.lang.reflect.MethodSignature
|
||||
import org.springframework.stereotype.Component
|
||||
import top.fatweb.api.annotation.EventLogRecord
|
||||
import top.fatweb.api.service.system.IEventLogService
|
||||
import top.fatweb.api.util.WebUtil
|
||||
import top.fatweb.api.vo.permission.LoginVo
|
||||
import top.fatweb.api.vo.permission.RegisterVo
|
||||
import top.fatweb.oxygen.api.annotation.EventLogRecord
|
||||
import top.fatweb.oxygen.api.service.system.IEventLogService
|
||||
import top.fatweb.oxygen.api.util.WebUtil
|
||||
import top.fatweb.oxygen.api.vo.permission.LoginVo
|
||||
import top.fatweb.oxygen.api.vo.permission.RegisterVo
|
||||
|
||||
/**
|
||||
* Event log record aspect
|
||||
@@ -30,7 +30,7 @@ class EventLogAspect(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Pointcut("@annotation(top.fatweb.api.annotation.EventLogRecord)")
|
||||
@Pointcut("@annotation(top.fatweb.oxygen.api.annotation.EventLogRecord)")
|
||||
fun eventLogPointcut() {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
|
||||
@@ -1,9 +1,9 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import top.fatweb.api.filter.ExceptionFilter
|
||||
import top.fatweb.oxygen.api.filter.ExceptionFilter
|
||||
|
||||
/**
|
||||
* Filter configuration
|
||||
@@ -1,11 +1,11 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource
|
||||
import jakarta.annotation.PostConstruct
|
||||
import org.flywaydb.core.Flyway
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.context.annotation.DependsOn
|
||||
import top.fatweb.api.properties.FlywayProperties
|
||||
import top.fatweb.oxygen.api.properties.FlywayProperties
|
||||
import javax.sql.DataSource
|
||||
|
||||
/**
|
||||
@@ -1,20 +1,19 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import com.baomidou.mybatisplus.extension.kotlin.KtQueryWrapper
|
||||
import jakarta.annotation.PostConstruct
|
||||
import org.apache.velocity.app.VelocityEngine
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import org.springframework.context.annotation.DependsOn
|
||||
import org.springframework.security.crypto.password.PasswordEncoder
|
||||
import org.springframework.stereotype.Component
|
||||
import top.fatweb.api.entity.permission.User
|
||||
import top.fatweb.api.entity.permission.UserInfo
|
||||
import top.fatweb.api.properties.AdminProperties
|
||||
import top.fatweb.api.service.permission.IUserInfoService
|
||||
import top.fatweb.api.service.permission.IUserService
|
||||
import top.fatweb.api.util.StrUtil
|
||||
import top.fatweb.avatargenerator.GitHubAvatar
|
||||
import top.fatweb.oxygen.api.entity.permission.User
|
||||
import top.fatweb.oxygen.api.entity.permission.UserInfo
|
||||
import top.fatweb.oxygen.api.properties.AdminProperties
|
||||
import top.fatweb.oxygen.api.service.permission.IUserInfoService
|
||||
import top.fatweb.oxygen.api.service.permission.IUserService
|
||||
import top.fatweb.oxygen.api.util.StrUtil
|
||||
|
||||
/**
|
||||
* Application initialization configuration
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
@@ -13,9 +13,9 @@ import org.springframework.security.web.SecurityFilterChain
|
||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
|
||||
import org.springframework.web.cors.CorsConfiguration
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource
|
||||
import top.fatweb.api.filter.JwtAuthenticationTokenFilter
|
||||
import top.fatweb.api.handler.JwtAccessDeniedHandler
|
||||
import top.fatweb.api.handler.JwtAuthenticationEntryPointHandler
|
||||
import top.fatweb.oxygen.api.filter.JwtAuthenticationTokenFilter
|
||||
import top.fatweb.oxygen.api.handler.JwtAccessDeniedHandler
|
||||
import top.fatweb.oxygen.api.handler.JwtAuthenticationEntryPointHandler
|
||||
|
||||
/**
|
||||
* Spring Security configuration
|
||||
@@ -1,11 +1,11 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import io.swagger.v3.oas.models.OpenAPI
|
||||
import io.swagger.v3.oas.models.info.Contact
|
||||
import io.swagger.v3.oas.models.info.Info
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import top.fatweb.api.properties.ServerProperties
|
||||
import top.fatweb.oxygen.api.properties.ServerProperties
|
||||
|
||||
/**
|
||||
* Swagger API doc configuration
|
||||
@@ -17,9 +17,9 @@ import top.fatweb.api.properties.ServerProperties
|
||||
class SwaggerConfig {
|
||||
@Bean
|
||||
fun customOpenAPI(): OpenAPI? {
|
||||
val contact = Contact().name("FatttSnake").url("https://fatweb.top").email("fatttsnake@fatweb.top")
|
||||
val contact = Contact().name("FatttSnake").url("https://fatweb.top").email("fatttsnake@gmail.com")
|
||||
return OpenAPI().info(
|
||||
Info().title("FatWeb API 文档").description("FatWeb 后端 API 文档,包含各个 Controller 调用信息")
|
||||
Info().title("Oxygen API 文档").description("Oxygen 后端 API 文档,包含各个 Controller 调用信息")
|
||||
.contact(contact).version(
|
||||
ServerProperties.version
|
||||
)
|
||||
@@ -1,9 +1,9 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
|
||||
import top.fatweb.api.interceptor.SysLogInterceptor
|
||||
import top.fatweb.oxygen.api.interceptor.SysLogInterceptor
|
||||
|
||||
/**
|
||||
* System log configuration
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import org.apache.velocity.app.VelocityEngine
|
||||
import org.apache.velocity.runtime.RuntimeConstants
|
||||
@@ -1,10 +1,10 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
|
||||
import top.fatweb.api.annotation.ApiController
|
||||
import top.fatweb.oxygen.api.annotation.ApiController
|
||||
|
||||
/**
|
||||
* Web MVC configurer configuration
|
||||
@@ -16,6 +16,6 @@ import top.fatweb.api.annotation.ApiController
|
||||
@Configuration
|
||||
class WebMvcConfigurerConfig : WebMvcConfigurer {
|
||||
override fun configurePathMatch(configurer: PathMatchConfigurer) {
|
||||
configurer.addPathPrefix("/api/{API_VERSION}") {it.isAnnotationPresent(ApiController::class.java)}
|
||||
configurer.addPathPrefix("/api/{API_VERSION}") { it.isAnnotationPresent(ApiController::class.java) }
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
package top.fatweb.api.config
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
|
||||
import top.fatweb.api.util.ApiResponseMappingHandlerMapping
|
||||
import top.fatweb.oxygen.api.util.ApiResponseMappingHandlerMapping
|
||||
|
||||
/**
|
||||
* Web MVC registrations configuration
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.controller
|
||||
package top.fatweb.oxygen.api.controller
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import top.fatweb.api.annotation.HiddenController
|
||||
import top.fatweb.oxygen.api.annotation.HiddenController
|
||||
|
||||
/**
|
||||
* Exception controller
|
||||
@@ -1,16 +1,16 @@
|
||||
package top.fatweb.api.controller.api.v1
|
||||
package top.fatweb.oxygen.api.controller.api.v1
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation
|
||||
import jakarta.validation.Valid
|
||||
import org.springframework.http.MediaType
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import top.fatweb.api.annotation.ApiController
|
||||
import top.fatweb.api.entity.common.ResponseCode
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.param.api.v1.avatar.AvatarBaseParam
|
||||
import top.fatweb.api.param.api.v1.avatar.AvatarGitHubParam
|
||||
import top.fatweb.api.service.api.v1.IAvatarService
|
||||
import top.fatweb.api.vo.api.v1.avatar.AvatarBase64Vo
|
||||
import top.fatweb.oxygen.api.annotation.ApiController
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.param.api.v1.avatar.AvatarBaseParam
|
||||
import top.fatweb.oxygen.api.param.api.v1.avatar.AvatarGitHubParam
|
||||
import top.fatweb.oxygen.api.service.api.v1.IAvatarService
|
||||
import top.fatweb.oxygen.api.vo.api.v1.avatar.AvatarBase64Vo
|
||||
|
||||
/**
|
||||
* Avatar controller
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.controller.permission
|
||||
package top.fatweb.oxygen.api.controller.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation
|
||||
import jakarta.servlet.http.HttpServletRequest
|
||||
@@ -6,15 +6,15 @@ import jakarta.validation.Valid
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.RequestBody
|
||||
import top.fatweb.api.annotation.BaseController
|
||||
import top.fatweb.api.entity.common.ResponseCode
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.param.permission.*
|
||||
import top.fatweb.api.service.permission.IAuthenticationService
|
||||
import top.fatweb.api.util.WebUtil
|
||||
import top.fatweb.api.vo.permission.LoginVo
|
||||
import top.fatweb.api.vo.permission.RegisterVo
|
||||
import top.fatweb.api.vo.permission.TokenVo
|
||||
import top.fatweb.oxygen.api.annotation.BaseController
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.param.permission.*
|
||||
import top.fatweb.oxygen.api.service.permission.IAuthenticationService
|
||||
import top.fatweb.oxygen.api.util.WebUtil
|
||||
import top.fatweb.oxygen.api.vo.permission.LoginVo
|
||||
import top.fatweb.oxygen.api.vo.permission.RegisterVo
|
||||
import top.fatweb.oxygen.api.vo.permission.TokenVo
|
||||
|
||||
/**
|
||||
* Authentication controller
|
||||
@@ -114,7 +114,10 @@ class AuthenticationController(
|
||||
*/
|
||||
@Operation(summary = "找回密码")
|
||||
@PostMapping("/retrieve")
|
||||
fun retrieve(request: HttpServletRequest, @Valid @RequestBody retrieveParam: RetrieveParam): ResponseResult<Nothing> {
|
||||
fun retrieve(
|
||||
request: HttpServletRequest,
|
||||
@Valid @RequestBody retrieveParam: RetrieveParam
|
||||
): ResponseResult<Nothing> {
|
||||
authenticationService.retrieve(request, retrieveParam)
|
||||
|
||||
return ResponseResult.success(ResponseCode.PERMISSION_RETRIEVE_SUCCESS)
|
||||
@@ -1,17 +1,17 @@
|
||||
package top.fatweb.api.controller.permission
|
||||
package top.fatweb.oxygen.api.controller.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation
|
||||
import jakarta.validation.Valid
|
||||
import org.springframework.security.access.prepost.PreAuthorize
|
||||
import org.springframework.web.bind.annotation.*
|
||||
import top.fatweb.api.annotation.BaseController
|
||||
import top.fatweb.api.entity.common.ResponseCode
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.param.permission.group.*
|
||||
import top.fatweb.api.service.permission.IGroupService
|
||||
import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.permission.GroupWithRoleVo
|
||||
import top.fatweb.api.vo.permission.base.GroupVo
|
||||
import top.fatweb.oxygen.api.annotation.BaseController
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.param.permission.group.*
|
||||
import top.fatweb.oxygen.api.service.permission.IGroupService
|
||||
import top.fatweb.oxygen.api.vo.PageVo
|
||||
import top.fatweb.oxygen.api.vo.permission.GroupWithRoleVo
|
||||
import top.fatweb.oxygen.api.vo.permission.base.GroupVo
|
||||
|
||||
/**
|
||||
* Group controller
|
||||
@@ -1,12 +1,12 @@
|
||||
package top.fatweb.api.controller.permission
|
||||
package top.fatweb.oxygen.api.controller.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation
|
||||
import org.springframework.security.access.prepost.PreAuthorize
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import top.fatweb.api.annotation.BaseController
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.service.permission.IPowerService
|
||||
import top.fatweb.api.vo.permission.PowerSetVo
|
||||
import top.fatweb.oxygen.api.annotation.BaseController
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.service.permission.IPowerService
|
||||
import top.fatweb.oxygen.api.vo.permission.PowerSetVo
|
||||
|
||||
/**
|
||||
* Power controller
|
||||
@@ -1,17 +1,17 @@
|
||||
package top.fatweb.api.controller.permission
|
||||
package top.fatweb.oxygen.api.controller.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation
|
||||
import jakarta.validation.Valid
|
||||
import org.springframework.security.access.prepost.PreAuthorize
|
||||
import org.springframework.web.bind.annotation.*
|
||||
import top.fatweb.api.annotation.BaseController
|
||||
import top.fatweb.api.entity.common.ResponseCode
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.param.permission.role.*
|
||||
import top.fatweb.api.service.permission.IRoleService
|
||||
import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.permission.RoleWithPowerVo
|
||||
import top.fatweb.api.vo.permission.base.RoleVo
|
||||
import top.fatweb.oxygen.api.annotation.BaseController
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.param.permission.role.*
|
||||
import top.fatweb.oxygen.api.service.permission.IRoleService
|
||||
import top.fatweb.oxygen.api.vo.PageVo
|
||||
import top.fatweb.oxygen.api.vo.permission.RoleWithPowerVo
|
||||
import top.fatweb.oxygen.api.vo.permission.base.RoleVo
|
||||
|
||||
/**
|
||||
* Role controller
|
||||
@@ -1,19 +1,19 @@
|
||||
package top.fatweb.api.controller.permission
|
||||
package top.fatweb.oxygen.api.controller.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation
|
||||
import jakarta.validation.Valid
|
||||
import org.springframework.security.access.prepost.PreAuthorize
|
||||
import org.springframework.web.bind.annotation.*
|
||||
import top.fatweb.api.annotation.BaseController
|
||||
import top.fatweb.api.entity.common.ResponseCode
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.exception.NoRecordFoundException
|
||||
import top.fatweb.api.param.permission.user.*
|
||||
import top.fatweb.api.service.permission.IUserService
|
||||
import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.permission.UserWithPasswordRoleInfoVo
|
||||
import top.fatweb.api.vo.permission.UserWithPowerInfoVo
|
||||
import top.fatweb.api.vo.permission.UserWithRoleInfoVo
|
||||
import top.fatweb.oxygen.api.annotation.BaseController
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.exception.NoRecordFoundException
|
||||
import top.fatweb.oxygen.api.param.permission.user.*
|
||||
import top.fatweb.oxygen.api.service.permission.IUserService
|
||||
import top.fatweb.oxygen.api.vo.PageVo
|
||||
import top.fatweb.oxygen.api.vo.permission.UserWithPasswordRoleInfoVo
|
||||
import top.fatweb.oxygen.api.vo.permission.UserWithPowerInfoVo
|
||||
import top.fatweb.oxygen.api.vo.permission.UserWithRoleInfoVo
|
||||
|
||||
/**
|
||||
* User controller
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.controller.system
|
||||
package top.fatweb.oxygen.api.controller.system
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation
|
||||
import jakarta.validation.Valid
|
||||
@@ -7,14 +7,14 @@ import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.PutMapping
|
||||
import org.springframework.web.bind.annotation.RequestBody
|
||||
import top.fatweb.api.annotation.BaseController
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.param.system.BaseSettingsParam
|
||||
import top.fatweb.api.param.system.MailSendParam
|
||||
import top.fatweb.api.param.system.MailSettingsParam
|
||||
import top.fatweb.api.service.system.ISettingsService
|
||||
import top.fatweb.api.vo.system.BaseSettingsVo
|
||||
import top.fatweb.api.vo.system.MailSettingsVo
|
||||
import top.fatweb.oxygen.api.annotation.BaseController
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.param.system.BaseSettingsParam
|
||||
import top.fatweb.oxygen.api.param.system.MailSendParam
|
||||
import top.fatweb.oxygen.api.param.system.MailSettingsParam
|
||||
import top.fatweb.oxygen.api.service.system.ISettingsService
|
||||
import top.fatweb.oxygen.api.vo.system.BaseSettingsVo
|
||||
import top.fatweb.oxygen.api.vo.system.MailSettingsVo
|
||||
|
||||
/**
|
||||
* System settings controller
|
||||
@@ -1,14 +1,14 @@
|
||||
package top.fatweb.api.controller.system
|
||||
package top.fatweb.oxygen.api.controller.system
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation
|
||||
import org.springframework.security.access.prepost.PreAuthorize
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import top.fatweb.api.annotation.BaseController
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.param.system.ActiveInfoGetParam
|
||||
import top.fatweb.api.param.system.OnlineInfoGetParam
|
||||
import top.fatweb.api.service.system.IStatisticsService
|
||||
import top.fatweb.api.vo.system.*
|
||||
import top.fatweb.oxygen.api.annotation.BaseController
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.param.system.ActiveInfoGetParam
|
||||
import top.fatweb.oxygen.api.param.system.OnlineInfoGetParam
|
||||
import top.fatweb.oxygen.api.service.system.IStatisticsService
|
||||
import top.fatweb.oxygen.api.vo.system.*
|
||||
|
||||
/**
|
||||
* Statistics controller
|
||||
@@ -1,16 +1,16 @@
|
||||
package top.fatweb.api.controller.system
|
||||
package top.fatweb.oxygen.api.controller.system
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation
|
||||
import jakarta.validation.Valid
|
||||
import org.springframework.security.access.prepost.PreAuthorize
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import top.fatweb.api.annotation.BaseController
|
||||
import top.fatweb.api.entity.common.ResponseCode
|
||||
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.SysLogVo
|
||||
import top.fatweb.oxygen.api.annotation.BaseController
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.param.system.SysLogGetParam
|
||||
import top.fatweb.oxygen.api.service.system.ISysLogService
|
||||
import top.fatweb.oxygen.api.vo.PageVo
|
||||
import top.fatweb.oxygen.api.vo.system.SysLogVo
|
||||
|
||||
/**
|
||||
* System log controller
|
||||
@@ -1,7 +1,7 @@
|
||||
package top.fatweb.api.converter.permission
|
||||
package top.fatweb.oxygen.api.converter.permission
|
||||
|
||||
import top.fatweb.api.entity.permission.Func
|
||||
import top.fatweb.api.vo.permission.base.FuncVo
|
||||
import top.fatweb.oxygen.api.entity.permission.Func
|
||||
import top.fatweb.oxygen.api.vo.permission.base.FuncVo
|
||||
|
||||
/**
|
||||
* Function converter
|
||||
@@ -1,14 +1,14 @@
|
||||
package top.fatweb.api.converter.permission
|
||||
package top.fatweb.oxygen.api.converter.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage
|
||||
import top.fatweb.api.entity.permission.Group
|
||||
import top.fatweb.api.entity.permission.Role
|
||||
import top.fatweb.api.param.permission.group.GroupAddParam
|
||||
import top.fatweb.api.param.permission.group.GroupUpdateStatusParam
|
||||
import top.fatweb.api.param.permission.group.GroupUpdateParam
|
||||
import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.permission.base.GroupVo
|
||||
import top.fatweb.api.vo.permission.GroupWithRoleVo
|
||||
import top.fatweb.oxygen.api.entity.permission.Group
|
||||
import top.fatweb.oxygen.api.entity.permission.Role
|
||||
import top.fatweb.oxygen.api.param.permission.group.GroupAddParam
|
||||
import top.fatweb.oxygen.api.param.permission.group.GroupUpdateParam
|
||||
import top.fatweb.oxygen.api.param.permission.group.GroupUpdateStatusParam
|
||||
import top.fatweb.oxygen.api.vo.PageVo
|
||||
import top.fatweb.oxygen.api.vo.permission.GroupWithRoleVo
|
||||
import top.fatweb.oxygen.api.vo.permission.base.GroupVo
|
||||
|
||||
/**
|
||||
* Group converter
|
||||
@@ -1,7 +1,7 @@
|
||||
package top.fatweb.api.converter.permission
|
||||
package top.fatweb.oxygen.api.converter.permission
|
||||
|
||||
import top.fatweb.api.entity.permission.Menu
|
||||
import top.fatweb.api.vo.permission.base.MenuVo
|
||||
import top.fatweb.oxygen.api.entity.permission.Menu
|
||||
import top.fatweb.oxygen.api.vo.permission.base.MenuVo
|
||||
|
||||
/**
|
||||
* Menu converter
|
||||
@@ -1,7 +1,7 @@
|
||||
package top.fatweb.api.converter.permission
|
||||
package top.fatweb.oxygen.api.converter.permission
|
||||
|
||||
import top.fatweb.api.entity.permission.Module
|
||||
import top.fatweb.api.vo.permission.base.ModuleVo
|
||||
import top.fatweb.oxygen.api.entity.permission.Module
|
||||
import top.fatweb.oxygen.api.vo.permission.base.ModuleVo
|
||||
|
||||
/**
|
||||
* Module converter
|
||||
@@ -1,7 +1,7 @@
|
||||
package top.fatweb.api.converter.permission
|
||||
package top.fatweb.oxygen.api.converter.permission
|
||||
|
||||
import top.fatweb.api.entity.permission.Operation
|
||||
import top.fatweb.api.vo.permission.base.OperationVo
|
||||
import top.fatweb.oxygen.api.entity.permission.Operation
|
||||
import top.fatweb.oxygen.api.vo.permission.base.OperationVo
|
||||
|
||||
/**
|
||||
* Operation converter
|
||||
@@ -1,7 +1,7 @@
|
||||
package top.fatweb.api.converter.permission
|
||||
package top.fatweb.oxygen.api.converter.permission
|
||||
|
||||
import top.fatweb.api.entity.permission.PowerSet
|
||||
import top.fatweb.api.vo.permission.PowerSetVo
|
||||
import top.fatweb.oxygen.api.entity.permission.PowerSet
|
||||
import top.fatweb.oxygen.api.vo.permission.PowerSetVo
|
||||
|
||||
/**
|
||||
* Power converter
|
||||
@@ -1,14 +1,14 @@
|
||||
package top.fatweb.api.converter.permission
|
||||
package top.fatweb.oxygen.api.converter.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage
|
||||
import top.fatweb.api.entity.permission.Power
|
||||
import top.fatweb.api.entity.permission.Role
|
||||
import top.fatweb.api.param.permission.role.RoleAddParam
|
||||
import top.fatweb.api.param.permission.role.RoleUpdateStatusParam
|
||||
import top.fatweb.api.param.permission.role.RoleUpdateParam
|
||||
import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.permission.base.RoleVo
|
||||
import top.fatweb.api.vo.permission.RoleWithPowerVo
|
||||
import top.fatweb.oxygen.api.entity.permission.Power
|
||||
import top.fatweb.oxygen.api.entity.permission.Role
|
||||
import top.fatweb.oxygen.api.param.permission.role.RoleAddParam
|
||||
import top.fatweb.oxygen.api.param.permission.role.RoleUpdateParam
|
||||
import top.fatweb.oxygen.api.param.permission.role.RoleUpdateStatusParam
|
||||
import top.fatweb.oxygen.api.vo.PageVo
|
||||
import top.fatweb.oxygen.api.vo.permission.RoleWithPowerVo
|
||||
import top.fatweb.oxygen.api.vo.permission.base.RoleVo
|
||||
|
||||
/**
|
||||
* Role converter
|
||||
@@ -1,18 +1,18 @@
|
||||
package top.fatweb.api.converter.permission
|
||||
package top.fatweb.oxygen.api.converter.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage
|
||||
import top.fatweb.api.entity.permission.Group
|
||||
import top.fatweb.api.entity.permission.Role
|
||||
import top.fatweb.api.entity.permission.User
|
||||
import top.fatweb.api.entity.permission.UserInfo
|
||||
import top.fatweb.api.param.permission.user.UserAddParam
|
||||
import top.fatweb.api.param.permission.user.UserUpdateParam
|
||||
import top.fatweb.api.vo.PageVo
|
||||
import top.fatweb.api.vo.permission.UserWithInfoVo
|
||||
import top.fatweb.api.vo.permission.UserWithPasswordRoleInfoVo
|
||||
import top.fatweb.api.vo.permission.UserWithPowerInfoVo
|
||||
import top.fatweb.api.vo.permission.UserWithRoleInfoVo
|
||||
import top.fatweb.avatargenerator.GitHubAvatar
|
||||
import top.fatweb.oxygen.api.entity.permission.Group
|
||||
import top.fatweb.oxygen.api.entity.permission.Role
|
||||
import top.fatweb.oxygen.api.entity.permission.User
|
||||
import top.fatweb.oxygen.api.entity.permission.UserInfo
|
||||
import top.fatweb.oxygen.api.param.permission.user.UserAddParam
|
||||
import top.fatweb.oxygen.api.param.permission.user.UserUpdateParam
|
||||
import top.fatweb.oxygen.api.vo.PageVo
|
||||
import top.fatweb.oxygen.api.vo.permission.UserWithInfoVo
|
||||
import top.fatweb.oxygen.api.vo.permission.UserWithPasswordRoleInfoVo
|
||||
import top.fatweb.oxygen.api.vo.permission.UserWithPowerInfoVo
|
||||
import top.fatweb.oxygen.api.vo.permission.UserWithRoleInfoVo
|
||||
|
||||
/**
|
||||
* User converter
|
||||
@@ -1,7 +1,7 @@
|
||||
package top.fatweb.api.converter.permission
|
||||
package top.fatweb.oxygen.api.converter.permission
|
||||
|
||||
import top.fatweb.api.entity.permission.UserInfo
|
||||
import top.fatweb.api.vo.permission.base.UserInfoVo
|
||||
import top.fatweb.oxygen.api.entity.permission.UserInfo
|
||||
import top.fatweb.oxygen.api.vo.permission.base.UserInfoVo
|
||||
|
||||
/**
|
||||
* User information converter
|
||||
@@ -1,9 +1,9 @@
|
||||
package top.fatweb.api.converter.system
|
||||
package top.fatweb.oxygen.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.SysLogVo
|
||||
import top.fatweb.oxygen.api.entity.system.SysLog
|
||||
import top.fatweb.oxygen.api.vo.PageVo
|
||||
import top.fatweb.oxygen.api.vo.system.SysLogVo
|
||||
|
||||
/**
|
||||
* System log converter
|
||||
@@ -1,11 +1,11 @@
|
||||
package top.fatweb.api.cron
|
||||
package top.fatweb.oxygen.api.cron
|
||||
|
||||
import org.springframework.scheduling.annotation.Scheduled
|
||||
import org.springframework.stereotype.Component
|
||||
import top.fatweb.api.entity.system.StatisticsLog
|
||||
import top.fatweb.api.properties.SecurityProperties
|
||||
import top.fatweb.api.service.system.IStatisticsLogService
|
||||
import top.fatweb.api.util.RedisUtil
|
||||
import top.fatweb.oxygen.api.entity.system.StatisticsLog
|
||||
import top.fatweb.oxygen.api.properties.SecurityProperties
|
||||
import top.fatweb.oxygen.api.service.system.IStatisticsLogService
|
||||
import top.fatweb.oxygen.api.util.RedisUtil
|
||||
|
||||
/**
|
||||
* Statistics scheduled tasks
|
||||
@@ -29,7 +29,7 @@ class StatisticsCron(
|
||||
statisticsLogService.save(StatisticsLog().apply {
|
||||
key = StatisticsLog.KeyItem.ONLINE_USERS_COUNT
|
||||
value = redisUtil.keys("${SecurityProperties.jwtIssuer}_login_*")
|
||||
.distinctBy { Regex("FatWeb_login_(.*):.*").matchEntire(it)?.groupValues?.getOrNull(1) }.size.toString()
|
||||
.distinctBy { Regex("${SecurityProperties.jwtIssuer}_login_(.*):.*").matchEntire(it)?.groupValues?.getOrNull(1) }.size.toString()
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.common
|
||||
package top.fatweb.oxygen.api.entity.common
|
||||
|
||||
/**
|
||||
* Business code entity
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.common
|
||||
package top.fatweb.oxygen.api.entity.common
|
||||
|
||||
/**
|
||||
* Response code entity
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.common
|
||||
package top.fatweb.oxygen.api.entity.common
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import java.io.Serializable
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField
|
||||
import com.baomidou.mybatisplus.annotation.TableId
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
@@ -90,6 +90,6 @@ class Group : Serializable {
|
||||
var roles: List<Role>? = null
|
||||
|
||||
override fun toString(): String {
|
||||
return "Group(id=$id, name=$name, enable=$enable, deleted=$deleted, version=$version, roles=$roles)"
|
||||
return "Group(id=$id, name=$name, enable=$enable, createTime=$createTime, updateTime=$updateTime, deleted=$deleted, version=$version, roles=$roles)"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo
|
||||
@@ -60,4 +60,8 @@ class LoginUser() : UserDetails {
|
||||
|
||||
@JsonIgnore
|
||||
override fun isEnabled() = user.enable == 1
|
||||
|
||||
override fun toString(): String {
|
||||
return "LoginUser(user=$user, authorities=$authorities)"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField
|
||||
import com.baomidou.mybatisplus.annotation.TableId
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField
|
||||
import com.baomidou.mybatisplus.annotation.TableId
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField
|
||||
import com.baomidou.mybatisplus.annotation.TableId
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField
|
||||
import com.baomidou.mybatisplus.annotation.TableId
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
@@ -44,4 +44,8 @@ class PowerSet : Serializable {
|
||||
* @see Operation
|
||||
*/
|
||||
var operationList: List<Operation>? = null
|
||||
|
||||
override fun toString(): String {
|
||||
return "PowerSet(moduleList=$moduleList, menuList=$menuList, funcList=$funcList, operationList=$operationList)"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField
|
||||
import com.baomidou.mybatisplus.annotation.TableId
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
@@ -130,6 +130,6 @@ class Role : Serializable {
|
||||
var powers: List<Power>? = null
|
||||
|
||||
override fun toString(): String {
|
||||
return "Role(id=$id, name=$name, enable=$enable, deleted=$deleted, version=$version, modules=$modules, menus=$menus, funcs=$funcs, operations=$operations, powers=$powers)"
|
||||
return "Role(id=$id, name=$name, enable=$enable, createTime=$createTime, updateTime=$updateTime, deleted=$deleted, version=$version, modules=$modules, menus=$menus, funcs=$funcs, operations=$operations, powers=$powers)"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.permission
|
||||
package top.fatweb.oxygen.api.entity.permission
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*
|
||||
import java.io.Serializable
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.system
|
||||
package top.fatweb.oxygen.api.entity.system
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue
|
||||
import com.baomidou.mybatisplus.annotation.TableField
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.system
|
||||
package top.fatweb.oxygen.api.entity.system
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue
|
||||
import com.baomidou.mybatisplus.annotation.TableField
|
||||
@@ -56,7 +56,7 @@ class StatisticsLog : Serializable {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS")
|
||||
@TableField("record_time")
|
||||
var recordTime: LocalDateTime?= null
|
||||
var recordTime: LocalDateTime? = null
|
||||
|
||||
override fun toString(): String {
|
||||
return "StatisticsLog(id=$id, key=$key, value=$value, recordTime=$recordTime)"
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.entity.system
|
||||
package top.fatweb.oxygen.api.entity.system
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue
|
||||
import com.baomidou.mybatisplus.annotation.TableField
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.exception
|
||||
package top.fatweb.oxygen.api.exception
|
||||
|
||||
/**
|
||||
* Account need initialize exception
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.exception
|
||||
package top.fatweb.oxygen.api.exception
|
||||
|
||||
/**
|
||||
* Account need reset password exception
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.exception
|
||||
package top.fatweb.oxygen.api.exception
|
||||
|
||||
/**
|
||||
* Email settings not configured exception
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.exception
|
||||
package top.fatweb.oxygen.api.exception
|
||||
|
||||
/**
|
||||
* No record found exception
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.exception
|
||||
package top.fatweb.oxygen.api.exception
|
||||
|
||||
/**
|
||||
* No verification required exception
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.exception
|
||||
package top.fatweb.oxygen.api.exception
|
||||
|
||||
/**
|
||||
* Retrieve code error or expired exception
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.exception
|
||||
package top.fatweb.oxygen.api.exception
|
||||
|
||||
/**
|
||||
* Token has expired exception
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.exception
|
||||
package top.fatweb.oxygen.api.exception
|
||||
|
||||
/**
|
||||
* User not found exception
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.exception
|
||||
package top.fatweb.oxygen.api.exception
|
||||
|
||||
/**
|
||||
* Verification code error or expired exception
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.filter
|
||||
package top.fatweb.oxygen.api.filter
|
||||
|
||||
import jakarta.servlet.Filter
|
||||
import jakarta.servlet.FilterChain
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.filter
|
||||
package top.fatweb.oxygen.api.filter
|
||||
|
||||
import jakarta.servlet.FilterChain
|
||||
import jakarta.servlet.http.HttpServletRequest
|
||||
@@ -8,12 +8,12 @@ import org.springframework.security.core.context.SecurityContextHolder
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.util.StringUtils
|
||||
import org.springframework.web.filter.OncePerRequestFilter
|
||||
import top.fatweb.api.entity.permission.LoginUser
|
||||
import top.fatweb.api.exception.TokenHasExpiredException
|
||||
import top.fatweb.api.properties.SecurityProperties
|
||||
import top.fatweb.api.util.JwtUtil
|
||||
import top.fatweb.api.util.RedisUtil
|
||||
import top.fatweb.api.util.WebUtil
|
||||
import top.fatweb.oxygen.api.entity.permission.LoginUser
|
||||
import top.fatweb.oxygen.api.exception.TokenHasExpiredException
|
||||
import top.fatweb.oxygen.api.properties.SecurityProperties
|
||||
import top.fatweb.oxygen.api.util.JwtUtil
|
||||
import top.fatweb.oxygen.api.util.RedisUtil
|
||||
import top.fatweb.oxygen.api.util.WebUtil
|
||||
|
||||
/**
|
||||
* Jwt authentication token filter
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.handler
|
||||
package top.fatweb.oxygen.api.handler
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler
|
||||
import org.apache.ibatis.reflection.MetaObject
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.handler
|
||||
package top.fatweb.oxygen.api.handler
|
||||
|
||||
import com.auth0.jwt.exceptions.JWTDecodeException
|
||||
import com.auth0.jwt.exceptions.SignatureVerificationException
|
||||
@@ -14,10 +14,10 @@ import org.springframework.web.HttpRequestMethodNotSupportedException
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice
|
||||
import top.fatweb.api.entity.common.ResponseCode
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.exception.*
|
||||
import top.fatweb.avatargenerator.AvatarException
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.exception.*
|
||||
|
||||
/**
|
||||
* Exception handler
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.handler
|
||||
package top.fatweb.oxygen.api.handler
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest
|
||||
import jakarta.servlet.http.HttpServletResponse
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.handler
|
||||
package top.fatweb.oxygen.api.handler
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest
|
||||
import jakarta.servlet.http.HttpServletResponse
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.interceptor
|
||||
package top.fatweb.oxygen.api.interceptor
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest
|
||||
import jakarta.servlet.http.HttpServletResponse
|
||||
@@ -11,12 +11,12 @@ import org.springframework.http.server.ServerHttpResponse
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice
|
||||
import org.springframework.web.servlet.HandlerInterceptor
|
||||
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice
|
||||
import top.fatweb.api.entity.common.ResponseCode
|
||||
import top.fatweb.api.entity.common.ResponseResult
|
||||
import top.fatweb.api.entity.system.SysLog
|
||||
import top.fatweb.api.service.system.ISysLogService
|
||||
import top.fatweb.api.util.WebUtil
|
||||
import top.fatweb.api.vo.permission.LoginVo
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||
import top.fatweb.oxygen.api.entity.system.SysLog
|
||||
import top.fatweb.oxygen.api.service.system.ISysLogService
|
||||
import top.fatweb.oxygen.api.util.WebUtil
|
||||
import top.fatweb.oxygen.api.vo.permission.LoginVo
|
||||
import java.net.URI
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneOffset
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Func
|
||||
import top.fatweb.oxygen.api.entity.permission.Func
|
||||
|
||||
/**
|
||||
* Function mapper
|
||||
@@ -1,10 +1,10 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import org.apache.ibatis.annotations.Param
|
||||
import top.fatweb.api.entity.permission.Group
|
||||
import top.fatweb.oxygen.api.entity.permission.Group
|
||||
|
||||
/**
|
||||
* Group mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Menu
|
||||
import top.fatweb.oxygen.api.entity.permission.Menu
|
||||
|
||||
/**
|
||||
* Menu mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Module
|
||||
import top.fatweb.oxygen.api.entity.permission.Module
|
||||
|
||||
/**
|
||||
* Module mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Operation
|
||||
import top.fatweb.oxygen.api.entity.permission.Operation
|
||||
|
||||
/**
|
||||
* Operation mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.Power
|
||||
import top.fatweb.oxygen.api.entity.permission.Power
|
||||
|
||||
/**
|
||||
* Power mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.PowerRole
|
||||
import top.fatweb.oxygen.api.entity.permission.PowerRole
|
||||
|
||||
/**
|
||||
* Power role intermediate mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.RoleGroup
|
||||
import top.fatweb.oxygen.api.entity.permission.RoleGroup
|
||||
|
||||
/**
|
||||
* Role group intermediate mapper
|
||||
@@ -1,10 +1,10 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import org.apache.ibatis.annotations.Param
|
||||
import top.fatweb.api.entity.permission.Role
|
||||
import top.fatweb.oxygen.api.entity.permission.Role
|
||||
|
||||
/**
|
||||
* Role mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.UserGroup
|
||||
import top.fatweb.oxygen.api.entity.permission.UserGroup
|
||||
|
||||
/**
|
||||
* User group intermediate mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.UserInfo
|
||||
import top.fatweb.oxygen.api.entity.permission.UserInfo
|
||||
|
||||
/**
|
||||
* User information mapper
|
||||
@@ -1,10 +1,10 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import org.apache.ibatis.annotations.Param
|
||||
import top.fatweb.api.entity.permission.User
|
||||
import top.fatweb.oxygen.api.entity.permission.User
|
||||
|
||||
/**
|
||||
* User mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.permission
|
||||
package top.fatweb.oxygen.api.mapper.permission
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.permission.UserRole
|
||||
import top.fatweb.oxygen.api.entity.permission.UserRole
|
||||
|
||||
/**
|
||||
* User role intermediate mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.system
|
||||
package top.fatweb.oxygen.api.mapper.system
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.system.EventLog
|
||||
import top.fatweb.oxygen.api.entity.system.EventLog
|
||||
|
||||
/**
|
||||
* Event log mapper
|
||||
@@ -1,8 +1,8 @@
|
||||
package top.fatweb.api.mapper.system
|
||||
package top.fatweb.oxygen.api.mapper.system
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import top.fatweb.api.entity.system.StatisticsLog
|
||||
import top.fatweb.oxygen.api.entity.system.StatisticsLog
|
||||
|
||||
/**
|
||||
* Statistics log mapper
|
||||
@@ -1,10 +1,10 @@
|
||||
package top.fatweb.api.mapper.system
|
||||
package top.fatweb.oxygen.api.mapper.system
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage
|
||||
import org.apache.ibatis.annotations.Mapper
|
||||
import org.apache.ibatis.annotations.Param
|
||||
import top.fatweb.api.entity.system.SysLog
|
||||
import top.fatweb.oxygen.api.entity.system.SysLog
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.param
|
||||
package top.fatweb.oxygen.api.param
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.Min
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.param.api.v1.avatar
|
||||
package top.fatweb.oxygen.api.param.api.v1.avatar
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.Max
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.param.api.v1.avatar
|
||||
package top.fatweb.oxygen.api.param.api.v1.avatar
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.Max
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.param.permission
|
||||
package top.fatweb.oxygen.api.param.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.param.permission
|
||||
package top.fatweb.oxygen.api.param.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.param.permission
|
||||
package top.fatweb.oxygen.api.param.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
@@ -1,4 +1,4 @@
|
||||
package top.fatweb.api.param.permission
|
||||
package top.fatweb.oxygen.api.param.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user