<?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.keyware.shandan.bianmu.mapper.ReviewRecordMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.keyware.shandan.bianmu.entity.ReviewRecordVo">
        <result column="ID" property="id" />
        <result column="ENTITY_ID" property="entityId" />
        <result column="ENTITY_TYPE" property="entityType" />
        <result column="REVIEW_OPERATE" property="reviewOperate" />
        <result column="REVIEW_OPINION" property="reviewOpinion" />
        <result column="CREATE_USER" property="createUser" />
        <result column="CREATE_TIME" property="createTime" />
        <result column="MODIFY_USER" property="modifyUser" />
        <result column="MODIFY_TIME" property="modifyTime" />
        <association property="reviewUser" column="CREATE_USER" select="selectUserById" />
    </resultMap>
    <select id="selectUserById" resultType="String" parameterType="String">
        select USER_NAME from SYS_USER where USER_ID = #{userId}
    </select>
</mapper>
