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> {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getWithRoleByList" resultMap="groupWithRoleMap">
|
||||
<select id="selectListWithRoleByIds" resultMap="groupWithRoleMap">
|
||||
select t_group.id as group_id,
|
||||
t_group.name as group_name,
|
||||
t_group.enable as group_enable,
|
||||
@@ -45,7 +45,7 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOne" resultMap="groupWithRoleMap">
|
||||
<select id="selectOneById" resultMap="groupWithRoleMap">
|
||||
select t_group.id as group_id,
|
||||
t_group.name as group_name,
|
||||
t_group.enable as group_enable,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getWithPowerByList" resultMap="roleWithPowerMap">
|
||||
<select id="selectListWithPowerByIds" resultMap="roleWithPowerMap">
|
||||
select distinct t_role.id as role_id,
|
||||
t_role.name as role_name,
|
||||
t_role.enable as role_enable,
|
||||
@@ -57,7 +57,7 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOne" resultMap="roleWithPowerMap">
|
||||
<select id="selectOneById" resultMap="roleWithPowerMap">
|
||||
select distinct t_role.id as role_id,
|
||||
t_role.name as role_name,
|
||||
t_role.enable as role_enable,
|
||||
|
||||
Reference in New Issue
Block a user