<?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.tofly.feesapi.udb.mapper.UserRoleMapper">
    <cache flushInterval="10000"/>
    <select id="get" resultType="com.tofly.feesapi.udb.entity.UserRole">
        select id,
               ROLE_NAME roleName,
               ROLE_CODE roleCode,
               ROLE_DESC roleDesc
        from tf_smpn_role_x
        where id in (select role_id
                     from tf_smpn_userrole_x
                     where user_id = #{userid})
    </select>
</mapper>
