Refactor(UserService): Change wrong method name

Change method getIdsWithRoleIds to getIdsByRoleIds, and change method getIdsWithGroupIds to getIdsByGroupIds
This commit is contained in:
2024-04-22 00:17:48 +08:00
parent fcfd76d60c
commit a0812b4f11
4 changed files with 6 additions and 6 deletions

View File

@@ -161,7 +161,7 @@ interface IUserService : IService<User> {
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
fun getIdsWithRoleIds(roleIds: List<Long>): List<Long>
fun getIdsByRoleIds(roleIds: List<Long>): List<Long>
/**
* Get user IDs list by list of group IDs
@@ -171,5 +171,5 @@ interface IUserService : IService<User> {
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
fun getIdsWithGroupIds(groupIds: List<Long>): List<Long>
fun getIdsByGroupIds(groupIds: List<Long>): List<Long>
}

View File

@@ -148,7 +148,7 @@ class GroupServiceImpl(
}
private fun offlineUser(vararg groupIds: Long) {
val userIds = userService.getIdsWithGroupIds(groupIds.toList())
val userIds = userService.getIdsByGroupIds(groupIds.toList())
WebUtil.offlineUser(redisUtil, *userIds.toLongArray())
}
}

View File

@@ -181,7 +181,7 @@ class RoleServiceImpl(
}
private fun offlineUser(vararg roleIds: Long) {
val userIds = userService.getIdsWithRoleIds(roleIds.toList())
val userIds = userService.getIdsByRoleIds(roleIds.toList())
WebUtil.offlineUser(redisUtil, *userIds.toLongArray())
}
}

View File

@@ -323,7 +323,7 @@ class UserServiceImpl(
WebUtil.offlineUser(redisUtil, *ids.toLongArray())
}
override fun getIdsWithRoleIds(roleIds: List<Long>) = baseMapper.selectIdsWithRoleIds(roleIds)
override fun getIdsByRoleIds(roleIds: List<Long>) = baseMapper.selectIdsWithRoleIds(roleIds)
override fun getIdsWithGroupIds(groupIds: List<Long>) = baseMapper.selectIdsWithGroupIds(groupIds)
override fun getIdsByGroupIds(groupIds: List<Long>) = baseMapper.selectIdsWithGroupIds(groupIds)
}