package com.huaheng.pc.system.role.service; import java.util.List; import java.util.Set; import com.huaheng.pc.system.role.domain.Role; /** * 角色业务层 * * @author huaheng */ public interface IRoleService { /** * 根据条件分页查询角色数据 * * @param role 角色信息 * @return 角色数据集合信息 */ public List<Role> selectRoleList(Role role); /** * 根据用户ID查询角色代码 * * @param userId 用户ID * @return 权限列表 */ public Set<String> selectRoleCodes(Integer userId); /** * 根据用户ID查询角色 * * @param userId 用户ID * @return 角色列表 */ public List<Role> selectRolesByUserId(Integer userId); /** * 查询所有角色 * * @return 角色列表 */ public List<Role> selectRoleAll(); /** * 通过角色ID查询角色 * * @param id 角色ID * @return 角色对象信息 */ public Role selectRoleById(Integer id); /** * 通过角色ID删除角色 * * @param id 角色ID * @return 结果 */ public boolean deleteRoleById(Integer id); /** * 批量删除角色用户信息 * * @param ids 需要删除的数据ID * @return 结果 * @throws Exception 异常 */ public int deleteRoleByIds(String ids) throws Exception; /** * 新增保存角色信息 * * @param role 角色信息 * @return 结果 */ public int insertRole(Role role); /** * 修改保存角色信息 * * @param role 角色信息 * @return 结果 */ public int updateRole(Role role); /** * 校验角色名称是否唯一 * * @param role 角色信息 * @return 结果 */ public String checkRoleNameUnique(Role role); /** * 校验角色权限是否唯一 * * @param role 角色信息 * @return 结果 */ public String checkroleCodeUnique(Role role); /** * 通过角色ID查询角色使用数量 * * @param id 角色ID * @return 结果 */ public int countUserRoleByRoleId(Integer id); //复制角色 Boolean roleCopy(String code,String newCode); //复制角色 Boolean roleMenuCopy(String code,String newCode); }