Optimize code

This commit is contained in:
2023-10-31 15:38:48 +08:00
parent 7b2ee34917
commit a8ba913ee2
32 changed files with 156 additions and 58 deletions

View File

@@ -1,4 +1,4 @@
package top.fatweb.api.vo.authentication
package top.fatweb.api.vo.permission
import io.swagger.v3.oas.annotations.media.Schema

View File

@@ -1,4 +1,4 @@
package top.fatweb.api.vo.authentication
package top.fatweb.api.vo.permission
import io.swagger.v3.oas.annotations.media.Schema
import java.time.LocalDateTime

View File

@@ -1,4 +1,4 @@
package top.fatweb.api.vo.authentication
package top.fatweb.api.vo.permission
import io.swagger.v3.oas.annotations.media.Schema

View File

@@ -1,4 +1,4 @@
package top.fatweb.api.vo.authentication
package top.fatweb.api.vo.permission
import io.swagger.v3.oas.annotations.media.Schema

View File

@@ -1,4 +1,4 @@
package top.fatweb.api.vo.authentication
package top.fatweb.api.vo.permission
import io.swagger.v3.oas.annotations.media.Schema

View File

@@ -1,4 +1,4 @@
package top.fatweb.api.vo.authentication
package top.fatweb.api.vo.permission
import io.swagger.v3.oas.annotations.media.Schema

View File

@@ -0,0 +1,31 @@
package top.fatweb.api.vo.permission
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
import io.swagger.v3.oas.annotations.media.Schema
import java.time.LocalDateTime
@Schema(description = "用户资料返回参数")
data class UserInfoVo(
@JsonSerialize(using = ToStringSerializer::class)
val id: Long?,
@Schema(description = "用户ID")
@JsonSerialize(using = ToStringSerializer::class)
val userId: Long?,
@Schema(description = "昵称", example = "User")
val nickName: String?,
@Schema(description = "头像")
val avatar: String?,
@Schema(description = "邮箱", example = "user@fatweb.top")
val email: String?,
@Schema(description = "创建时间", example = "1900-01-01T00:00:00.000Z")
val createTime: LocalDateTime?,
@Schema(description = "修改时间", example = "1900-01-01T00:00:00.000Z")
val updateTime: LocalDateTime?
)

View File

@@ -1,4 +1,4 @@
package top.fatweb.api.vo.authentication
package top.fatweb.api.vo.permission
import com.fasterxml.jackson.databind.annotation.JsonSerialize
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer
@@ -43,6 +43,9 @@ data class UserWithInfoVo(
@Schema(description = "修改时间", example = "1900-01-01T00:00:00.000Z")
val updateTime: LocalDateTime?,
@Schema(description = "用户资料")
val userInfo: UserInfoVo?,
@Schema(description = "模块列表")
val modules: List<ModuleVo>?,