<?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.younike.system.mapper.GoodsCommentDimensionMapper">
    <resultMap type="com.younike.system.domain.vo.GoodsCommentDimensionVo" extends="GoodsCommentDimensionResult" id="GoodsCommentDimensionResultVo">
        <result property="name" column="name"/>
    </resultMap>
    <select id="selectDimensionByCommentId" resultMap="GoodsCommentDimensionResultVo" >
        select gcd.id, gcd.comment_id, gcd.dimension_id, gcd.score, gcd.is_del, gcd.create_time, gcd.update_time, gcd.version,di.name
        from goods_comment_dimension gcd
        LEFT JOIN dimension di ON gcd.dimension_id = di.dimension_id AND di.del_flag = 0
        WHERE gcd.is_del = 0
        AND gcd.comment_id = #{commentId}
    </select>
</mapper>
