package cn.com.ty.lift.ud.userInfo.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import cn.com.ty.lift.ud.userInfo.mapper.entity.Role;

public interface RoleMapper extends BaseMapper<Role> {

    @Select("SELECT b.* FROM user_role a LEFT JOIN role b ON a.role_id=b.id WHERE a.user_id=#{userId}")
    List<Role> getByUserId(@Param("userId")Long userId);
    
}
