package com.ho.user.mapper;


import com.ho.user.entity.SysRolePermission;
import com.ho.user.vo.req.RolePermissionOperationReqVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface SysRolePermissionMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(SysRolePermission record);

    int insertSelective(SysRolePermission record);

    SysRolePermission selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysRolePermission record);

    int updateByPrimaryKey(SysRolePermission record);

    int removeByRoleId(Integer roleId);

    List<Integer> getPermissionIdsByRoles(@Param("roleIds") List<Integer> roleIds);

    int batchRolePermission(List<SysRolePermission> list);

    int removeByPermissionId(Integer permissionId);

    List<Integer> getRoleIds(Integer permissionId);

    List<Integer> getPermissionIdsByRoleId(Integer roleId);

    int deleteRolePermissions(@Param("vo") RolePermissionOperationReqVO reqVO);
}