package com.inspect.system.mapper;

import com.inspect.system.base.domain.SysRole;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SysRoleMapper {
    List<SysRole> selectRoleList(SysRole sysRole);

    List<SysRole> selectRolePermissionByUserId(Long userId);

    List<SysRole> selectRoleAll();

    List<Long> selectRoleListByUserId(Long userId);

    SysRole selectRoleById(Long id);

    List<SysRole> selectRolesByUserName(String userName);

    SysRole checkRoleNameUnique(String name);

    SysRole checkRoleKeyUnique(String key);

    int updateRole(SysRole sysRole);

    int insertRole(SysRole sysRole);

    int deleteRoleById(Long id);

    int deleteRoleByIds(Long[] ids);
}
