<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuyuanshen.app.mapper.AppRoleMapper">

    <select id="selectRolesByUserId" resultType="com.fuyuanshen.app.domain.vo.AppRoleVo">
        select r.role_id,
        r.role_name,
        r.role_key,
        r.role_sort,
        r.data_scope,
        r.status
        from app_role r
        WHERE r.del_flag = '0' and r.role_id in (select role_id from app_user_role where user_id = #{userId})

    </select>

</mapper>
