Add get user list controller

This commit is contained in:
2023-11-01 18:26:49 +08:00
parent a94bf94bc7
commit e5c71c8a51
18 changed files with 237 additions and 23 deletions

View File

@@ -15,4 +15,6 @@ interface IUserService : IService<User> {
fun getUserWithPower(username: String): User?
fun getInfo(): User?
fun getList(): List<User>
}

View File

@@ -23,7 +23,7 @@ class UserServiceImpl(
private val operationService: IOperationService
) : ServiceImpl<UserMapper, User>(), IUserService {
override fun getUserWithPower(username: String): User? {
val user = baseMapper.getOneWithPowerByUsername(username)
val user = baseMapper.getOneWithPowerInfoByUsername(username)
user ?: let { return null }
if (user.id == 0L) {
@@ -38,4 +38,5 @@ class UserServiceImpl(
override fun getInfo() = WebUtil.getLoginUsername()?.let { getUserWithPower(it) } ?: let { null }
override fun getList() = baseMapper.getListWithRoleInfo()
}