Rename table t_element to t_func

This commit is contained in:
2023-11-30 23:03:42 +08:00
parent 4fcbceb149
commit cdb6339787
31 changed files with 132 additions and 132 deletions

View File

@@ -1,12 +1,12 @@
package top.fatweb.api.service.permission
import com.baomidou.mybatisplus.extension.service.IService
import top.fatweb.api.entity.permission.Element
import top.fatweb.api.entity.permission.Func
/**
* Element service interface
* Function service interface
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
interface IElementService : IService<Element>
interface IFuncService : IService<Func>

View File

@@ -1,16 +0,0 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.Element
import top.fatweb.api.mapper.permission.ElementMapper
import top.fatweb.api.service.permission.IElementService
/**
* Element service implement
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@Service
class ElementServiceImpl : ServiceImpl<ElementMapper, Element>(), IElementService

View File

@@ -0,0 +1,16 @@
package top.fatweb.api.service.permission.impl
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
import org.springframework.stereotype.Service
import top.fatweb.api.entity.permission.Func
import top.fatweb.api.mapper.permission.FuncMapper
import top.fatweb.api.service.permission.IFuncService
/**
* Function service implement
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@Service
class FuncServiceImpl : ServiceImpl<FuncMapper, Func>(), IFuncService

View File

@@ -18,13 +18,13 @@ import top.fatweb.api.service.permission.*
class PowerServiceImpl(
private val moduleService: IModuleService,
private val menuService: IMenuService,
private val elementService: IElementService,
private val funcService: IFuncService,
private val operationService: IOperationService
) : ServiceImpl<PowerMapper, Power>(), IPowerService {
override fun getList() = PowerConverter.powerSetToPowerSetVo(PowerSet().apply {
moduleList = moduleService.list()
menuList = menuService.list()
elementList = elementService.list()
funcList = funcService.list()
operationList = operationService.list()
})
}

View File

@@ -10,7 +10,7 @@ import top.fatweb.api.entity.permission.PowerRole
import top.fatweb.api.entity.permission.Role
import top.fatweb.api.mapper.permission.RoleMapper
import top.fatweb.api.param.permission.role.*
import top.fatweb.api.service.permission.IElementService
import top.fatweb.api.service.permission.IFuncService
import top.fatweb.api.service.permission.IMenuService
import top.fatweb.api.service.permission.IPowerRoleService
import top.fatweb.api.service.permission.IRoleService
@@ -28,7 +28,7 @@ import top.fatweb.api.vo.permission.RoleWithPowerVo
@Service
class RoleServiceImpl(
private val powerRoleService: IPowerRoleService,
private val elementService: IElementService,
private val funcService: IFuncService,
private val menuService: IMenuService
) : ServiceImpl<RoleMapper, Role>(), IRoleService {
override fun getPage(roleGetParam: RoleGetParam?): PageVo<RoleWithPowerVo> {
@@ -150,7 +150,7 @@ class RoleServiceImpl(
private fun getElementParent(id: Long, parentIds: HashSet<Long>) {
parentIds.add(id)
elementService.getById(id)?.parentId?.let {
funcService.getById(id)?.parentId?.let {
getElementParent(it, parentIds)
}
}

View File

@@ -38,7 +38,7 @@ class UserServiceImpl(
private val userInfoService: IUserInfoService,
private val moduleService: IModuleService,
private val menuService: IMenuService,
private val elementService: IElementService,
private val funcService: IFuncService,
private val operationService: IOperationService,
private val userRoleService: IUserRoleService,
private val userGroupService: IUserGroupService
@@ -50,7 +50,7 @@ class UserServiceImpl(
if (user.id == 0L) {
user.modules = moduleService.list()
user.menus = menuService.list()
user.elements = elementService.list()
user.funcs = funcService.list()
user.operations = operationService.list()
}