IMDoingOrderCommentMapper.xml 2.2 KB
<?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.sibu.orderHelper.integral.dao.IMDoingOrderCommentDao">

	<sql id="IMDoingOrderComment_Column">
		doing_order_comment_id,comment_member_id,comment_nickname,comment_phone,
		comment_head,comment_level_name,order_id,wuliu_grade,speed_grade,distribution_grade,create_date
	</sql>
    <insert id="addOrderComment" parameterType="map">
        insert into ${doingOrderCommentTable}(<include refid="IMDoingOrderComment_Column"/>)
        value(
            #{doingOrderComment.doingOrderCommentId},
            #{doingOrderComment.commentMemberId},
            #{doingOrderComment.commentNickname},
            #{doingOrderComment.commentPhone},
            #{doingOrderComment.commentHead},
            #{doingOrderComment.commentLevelName},
            #{doingOrderComment.orderId},
            #{doingOrderComment.wuliuGrade},
            #{doingOrderComment.speedGrade},
            #{doingOrderComment.distributionGrade},
            NOW()
        )
    </insert>
    
    <!-- 查询评价 -->
    <select id="getOrderCommentDetail" parameterType="map" resultMap="listIMdoingOrderComment">
    	select <include refid="IMDoingOrderComment_Column" /> 
   		from ${doingOrderCommentTable} 
   		where order_id=#{orderId} 
   		limit 1	
    </select>
    
   	<resultMap type="IMDoingOrderCommentBean" id="listIMdoingOrderComment">
   		<id column="im_comment_id" property="doingOrderCommentId" />
        <result column="comment_member_id" property="commentMemberId" />
        <result column="comment_nickname" property="commentNickname" />
        <result column="comment_phone" property="commentPhone" />
        <result column="comment_head" property="commentHead" />
        <result column="comment_level_name" property="commentLevelName" />
        <result column="order_id" property="orderId" />
        <result column="wuliu_grade" property="wuliuGrade" />
        <result column="speed_grade" property="speedGrade" />
        <result column="create_date" property="createDate" />
        <result column="distribution_grade" property="distributionGrade" />
   	</resultMap>
</mapper>