This commit is contained in:
2023-10-26 23:47:41 +08:00
parent 2a364cfcfe
commit 7aa2212976
4 changed files with 35 additions and 17 deletions

View File

@@ -1,17 +0,0 @@
package top.fatweb.api.controller
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
/**
* <p>
* 用户 前端控制器
* </p>
*
* @author FatttSnake
* @since 2023-10-04
*/
@RestController
@RequestMapping("/api/user")
class UserController

View File

@@ -0,0 +1,25 @@
package top.fatweb.api.controller.permission
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import top.fatweb.api.service.permission.IUserService
/**
* <p>
* 用户 前端控制器
* </p>
*
* @author FatttSnake
* @since 2023-10-04
*/
@RestController
@RequestMapping("/system/user")
class UserController(
private val userService: IUserService
) {
@GetMapping("info")
fun getInfo() {
}
}

View File

@@ -21,5 +21,13 @@ class ResponseResult<T> private constructor(
fun <T> fail(code: ResponseCode = ResponseCode.SYSTEM_ERROR, msg: String = "fail", data: T? = null) = fun <T> fail(code: ResponseCode = ResponseCode.SYSTEM_ERROR, msg: String = "fail", data: T? = null) =
build(code, false, msg, data) build(code, false, msg, data)
fun <T> databaseSuccess(
code: ResponseCode = ResponseCode.DATABASE_SELECT_SUCCESS, msg: String = "success", data: T? = null
) = build(code, true, msg, data)
fun <T> databaseFail(
code: ResponseCode = ResponseCode.DATABASE_SELECT_FAILED, msg: String = "fail", data: T? = null
) = build(code, false, msg, data)
} }
} }

View File

@@ -13,4 +13,6 @@ import top.fatweb.api.entity.permission.User
*/ */
interface IUserService : IService<User> { interface IUserService : IService<User> {
fun getUserWithPower(username: String): User? fun getUserWithPower(username: String): User?
fun getInfo(): User
} }