package com.community.huiju.dao;

import com.community.huiju.model.TpSysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

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

    int insert(TpSysRole record);

    int insertSelective(TpSysRole record);

    TpSysRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TpSysRole record);

    int updateByPrimaryKey(TpSysRole record);

    /**
     * 根据用户id查询角色
     * @param userId
     * @return
     */
    List<TpSysRole> selectRoleByUserId(@Param("userId") Integer userId);
}