package com.community.huiju.dao;


import com.community.huiju.model.TaSysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;

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

    int insert(TaSysRole record);

    int insertSelective(TaSysRole record);

    TaSysRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TaSysRole record);

    int updateByPrimaryKey(TaSysRole record);

    TaSysRole findRoleByUserId(Integer userId);

    /**
     * 根据 角色名称 查询
     * @param roleName
     * @return
     */
    @ResultMap("BaseResultMap")
    @Select("select * from ta_sys_role where role_name=#{roleName}")
    TaSysRole selectByRoleName(String roleName);

}