package com.community.huiju.dao;

import com.community.huiju.model.ToSysUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface ToSysUserRoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ToSysUserRole record);

    int insertSelective(ToSysUserRole record);

    ToSysUserRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ToSysUserRole record);

    int updateByPrimaryKey(ToSysUserRole record);


    void deleteRole(@Param("userId") Integer userId);
    /**
     * 根据 角色id 查询 用户和角色关联关系
     * @param roleId
     * @return
     */
    List<ToSysUserRole> selelctByRoleId(@Param("roleId") Integer roleId);

    /**
     * 根据 角色id 删除关联关系
     * @param list
     * @return
     */
    int deleteByRoleId(List<Integer> list);
}