package com.inspect.system.service;

import com.inspect.system.base.domain.SysRole;
import com.inspect.system.domain.SysUserRole;

import java.util.List;
import java.util.Set;

public interface ISysRoleService {
    List<SysRole> selectRoleList(SysRole sysRole);

    List<SysRole> selectRolesByUserId(Long userId);

    Set<String> selectRolePermissionByUserId(Long userId);

    List<SysRole> selectRoleAll();

    List<Long> selectRoleListByUserId(Long userId);

    SysRole selectRoleById(Long id);

    String checkRoleNameUnique(SysRole sysRole);

    String checkRoleKeyUnique(SysRole sysRole);

    void checkRoleAllowed(SysRole sysRole);

    void checkRoleDataScope(Long roleId);

    int countUserRoleByRoleId(Long roleId);

    int insertRole(SysRole sysRole);

    int updateRole(SysRole sysRole);

    int updateRoleStatus(SysRole sysRole);

    int authDataScope(SysRole sysRole);

    int deleteRoleById(Long roleId);

    int deleteRoleByIds(Long[] roleIds);

    int deleteAuthUser(SysUserRole sysUserRole);

    int deleteAuthUsers(Long roleId, Long[] userIds);

    int insertAuthUsers(Long roleId, Long[] userIds);
}
