Complete core functions #9

Merged
FatttSnake merged 171 commits from FatttSnake into dev 2024-02-23 11:56:35 +08:00
4 changed files with 35 additions and 17 deletions
Showing only changes of commit 7aa2212976 - Show all commits

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) =
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> {
fun getUserWithPower(username: String): User?
fun getInfo(): User
}