Optimize function name
This commit is contained in:
@@ -15,7 +15,7 @@ import top.fatweb.api.entity.permission.Group
|
||||
interface GroupMapper : BaseMapper<Group> {
|
||||
fun selectPage(page: IPage<Long>, searchName: String?, searchRegex: Boolean): IPage<Long>
|
||||
|
||||
fun getWithRoleByList(groupIds: List<Long>): List<Group>?
|
||||
fun selectListWithRoleByIds(groupIds: List<Long>): List<Group>?
|
||||
|
||||
fun selectOne(id: Long): Group?
|
||||
fun selectOneById(id: Long): Group?
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import top.fatweb.api.entity.permission.Role
|
||||
interface RoleMapper : BaseMapper<Role> {
|
||||
fun selectPage(page: IPage<Long>, searchName: String?, searchRegex: Boolean): IPage<Long>
|
||||
|
||||
fun getWithPowerByList(roleIds: List<Long>): List<Role>?
|
||||
fun selectListWithPowerByIds(roleIds: List<Long>): List<Role>?
|
||||
|
||||
fun selectOne(id: Long): Role?
|
||||
fun selectOneById(id: Long): Role?
|
||||
}
|
||||
|
||||
@@ -36,14 +36,14 @@ class GroupServiceImpl(
|
||||
baseMapper.selectPage(groupIdsPage, groupGetParam?.searchName, groupGetParam?.searchRegex ?: false)
|
||||
val groupPage = Page<Group>(groupIdsPage.current, groupIdsIPage.size, groupIdsIPage.total)
|
||||
if (groupIdsIPage.total > 0) {
|
||||
groupPage.setRecords(baseMapper.getWithRoleByList(groupIdsIPage.records))
|
||||
groupPage.setRecords(baseMapper.selectListWithRoleByIds(groupIdsIPage.records))
|
||||
}
|
||||
|
||||
return GroupConverter.groupPageToGroupWithRolePageVo(groupPage)
|
||||
}
|
||||
|
||||
override fun getOne(id: Long): GroupWithRoleVo? {
|
||||
return baseMapper.selectOne(id)?.let { GroupConverter.groupToGroupWithRoleVo(it) } ?: let { null }
|
||||
return baseMapper.selectOneById(id)?.let { GroupConverter.groupToGroupWithRoleVo(it) } ?: let { null }
|
||||
}
|
||||
|
||||
override fun listAll(): List<GroupVo> {
|
||||
|
||||
@@ -41,7 +41,7 @@ class RoleServiceImpl(
|
||||
|
||||
val rolePage = Page<Role>(roleIdsPage.current, roleIdsIPage.size, roleIdsIPage.total)
|
||||
if (roleIdsIPage.total > 0) {
|
||||
rolePage.setRecords(baseMapper.getWithPowerByList(roleIdsIPage.records))
|
||||
rolePage.setRecords(baseMapper.selectListWithPowerByIds(roleIdsIPage.records))
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class RoleServiceImpl(
|
||||
}
|
||||
|
||||
override fun getOne(id: Long): RoleWithPowerVo? {
|
||||
return baseMapper.selectOne(id)?.let { RoleConverter.roleToRoleWithPowerVo(it) } ?: let { null }
|
||||
return baseMapper.selectOneById(id)?.let { RoleConverter.roleToRoleWithPowerVo(it) } ?: let { null }
|
||||
}
|
||||
|
||||
override fun listAll(): List<RoleVo> {
|
||||
|
||||
Reference in New Issue
Block a user