<?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.unis.crk.basic.mapper.RoleInfoMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.unis.crk.basic.entity.RoleInfo">
        <id column="role_id" property="roleId" />
        <result column="role_name" property="roleName" />
        <result column="parent_id" property="parentId" />
        <result column="remark" property="remark" />
        <result column="del_flag" property="delFlag" />
        <result column="org_id" property="orgId" />
       <!-- <result column="createtime" property="createtime" />-->
        <result column="updatetime" property="updatetime" />
    </resultMap>
    <select id="getUserRoleByUserID"  parameterType="java.lang.String" resultType="com.unis.crk.basic.entity.RoleInfo">
        select b.* from user_role a  left join  role_info b on a.role_id=b.role_id where a.user_id =#{userId};
    </select>
</mapper>
