IMDoingOrderCommentMapper.xml
2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?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>