@Service public class RoleService extends AbstractBaseDomainObjectService<Role,RoleEntity> implements IRoleService
domainObjectClass, entityClass| 构造器和说明 |
|---|
RoleService() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
assignPermission(long roleId,
List<Long> permissionIds)
为该角色分配权限
|
void |
assignUser(long roleId,
List<Long> userIds)
为角色分配用户
|
Role |
getByName(String roleName)
通过名称检索角色
|
protected IBaseEntityHandler<RoleEntity> |
getEntityHandler() |
List<Role> |
listByUserId(long userId)
根据用户Id查询所有角色
|
List<String> |
listRoleNamesByUserId(long userId)
根据用户Id查询所有角色
|
countByFilter, createClientObject, createClientObject, createClientObjects, createClientObjects, createFilter, delete, deleteById, deleteByIds, getByFilter, getById, getByIdAndEvict, getInternalEntities, getInternalEntity, getObjectType, list, list, listByFilter, listSimpleData, pagingByFilter, save, saveAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcountByFilter, createFilter, delete, deleteById, deleteByIds, getByFilter, getById, getByIdAndEvict, list, list, listByFilter, listSimpleData, pagingByFilter, save, saveAllprotected IBaseEntityHandler<RoleEntity> getEntityHandler()
public void assignUser(long roleId,
List<Long> userIds)
IRoleServiceassignUser 在接口中 IRoleServiceroleId - 角色的IDuserIds - 用户的ID列表public void assignPermission(long roleId,
List<Long> permissionIds)
IRoleServiceassignPermission 在接口中 IRoleServiceroleId - 角色的IDpermissionIds - 权限的ID列表public Role getByName(String roleName)
IRoleServicegetByName 在接口中 IRoleServiceroleName - 角色的名字,在角色中全局唯一public List<String> listRoleNamesByUserId(long userId)
listRoleNamesByUserId 在接口中 IRoleServiceuserId - public List<Role> listByUserId(long userId)
IRoleServicelistByUserId 在接口中 IRoleServiceCopyright © 2019. All rights reserved.