|
@@ -4,7 +4,7 @@
|
4
|
4
|
<resultMap id="BaseResultMap" type="com.community.huiju.model.TpTicketRecordComment" >
|
5
|
5
|
<id column="id" property="id" jdbcType="INTEGER" />
|
6
|
6
|
<result column="community_id" property="communityId" jdbcType="INTEGER" />
|
7
|
|
- <result column="ticker_id" property="tickerId" jdbcType="INTEGER" />
|
|
7
|
+ <result column="ticket_id" property="ticketId" jdbcType="INTEGER" />
|
8
|
8
|
<result column="ticket_record_id" property="ticketRecordId" jdbcType="INTEGER" />
|
9
|
9
|
<result column="uuid" property="uuid" jdbcType="INTEGER" />
|
10
|
10
|
<result column="user_type" property="userType" jdbcType="CHAR" />
|
|
@@ -14,7 +14,7 @@
|
14
|
14
|
<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
|
15
|
15
|
</resultMap>
|
16
|
16
|
<sql id="Base_Column_List" >
|
17
|
|
- id, community_id, ticker_id, ticket_record_id, uuid, user_type, content, parent_id,
|
|
17
|
+ id, community_id, ticket_id, ticket_record_id, uuid, user_type, content, parent_id,
|
18
|
18
|
user_name, create_date
|
19
|
19
|
</sql>
|
20
|
20
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
@@ -28,11 +28,11 @@
|
28
|
28
|
where id = #{id,jdbcType=INTEGER}
|
29
|
29
|
</delete>
|
30
|
30
|
<insert id="insert" parameterType="com.community.huiju.model.TpTicketRecordComment" >
|
31
|
|
- insert into tp_ticket_record_comment (id, community_id, ticker_id,
|
|
31
|
+ insert into tp_ticket_record_comment (id, community_id, ticket_id,
|
32
|
32
|
ticket_record_id, uuid, user_type,
|
33
|
33
|
content, parent_id, user_name,
|
34
|
34
|
create_date)
|
35
|
|
- values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{tickerId,jdbcType=INTEGER},
|
|
35
|
+ values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{ticketId,jdbcType=INTEGER},
|
36
|
36
|
#{ticketRecordId,jdbcType=INTEGER}, #{uuid,jdbcType=INTEGER}, #{userType,jdbcType=CHAR},
|
37
|
37
|
#{content,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR},
|
38
|
38
|
#{createDate,jdbcType=TIMESTAMP})
|
|
@@ -46,8 +46,8 @@
|
46
|
46
|
<if test="communityId != null" >
|
47
|
47
|
community_id,
|
48
|
48
|
</if>
|
49
|
|
- <if test="tickerId != null" >
|
50
|
|
- ticker_id,
|
|
49
|
+ <if test="ticketId != null" >
|
|
50
|
+ ticket_id,
|
51
|
51
|
</if>
|
52
|
52
|
<if test="ticketRecordId != null" >
|
53
|
53
|
ticket_record_id,
|
|
@@ -78,8 +78,8 @@
|
78
|
78
|
<if test="communityId != null" >
|
79
|
79
|
#{communityId,jdbcType=INTEGER},
|
80
|
80
|
</if>
|
81
|
|
- <if test="tickerId != null" >
|
82
|
|
- #{tickerId,jdbcType=INTEGER},
|
|
81
|
+ <if test="ticketId != null" >
|
|
82
|
+ #{ticketId,jdbcType=INTEGER},
|
83
|
83
|
</if>
|
84
|
84
|
<if test="ticketRecordId != null" >
|
85
|
85
|
#{ticketRecordId,jdbcType=INTEGER},
|
|
@@ -110,8 +110,8 @@
|
110
|
110
|
<if test="communityId != null" >
|
111
|
111
|
community_id = #{communityId,jdbcType=INTEGER},
|
112
|
112
|
</if>
|
113
|
|
- <if test="tickerId != null" >
|
114
|
|
- ticker_id = #{tickerId,jdbcType=INTEGER},
|
|
113
|
+ <if test="ticketId != null" >
|
|
114
|
+ ticket_id = #{ticketId,jdbcType=INTEGER},
|
115
|
115
|
</if>
|
116
|
116
|
<if test="ticketRecordId != null" >
|
117
|
117
|
ticket_record_id = #{ticketRecordId,jdbcType=INTEGER},
|
|
@@ -140,7 +140,7 @@
|
140
|
140
|
<update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpTicketRecordComment" >
|
141
|
141
|
update tp_ticket_record_comment
|
142
|
142
|
set community_id = #{communityId,jdbcType=INTEGER},
|
143
|
|
- ticker_id = #{tickerId,jdbcType=INTEGER},
|
|
143
|
+ ticket_id = #{ticketId,jdbcType=INTEGER},
|
144
|
144
|
ticket_record_id = #{ticketRecordId,jdbcType=INTEGER},
|
145
|
145
|
uuid = #{uuid,jdbcType=INTEGER},
|
146
|
146
|
user_type = #{userType,jdbcType=CHAR},
|
|
@@ -155,6 +155,17 @@
|
155
|
155
|
select ttrc.* from tp_ticket tp
|
156
|
156
|
inner join tp_ticket_record ttr on tp.id = ttr.ticket_id
|
157
|
157
|
inner join tp_ticket_record_comment ttrc on ttr.ticket_id = ttrc.ticket_record_id
|
158
|
|
- where tp.id=#{tickerId,jdbcType=INTEGER} order by ttrc.create_date DESC LIMIT #{size,jdbcType=INTEGER}
|
|
158
|
+ where tp.id=#{ticketId,jdbcType=INTEGER} order by ttrc.create_date DESC LIMIT #{size,jdbcType=INTEGER}
|
|
159
|
+ </select>
|
|
160
|
+
|
|
161
|
+ <select id="selectByTicketRecordId" parameterType="com.community.huiju.model.TpTicketRecord" resultMap="BaseResultMap" >
|
|
162
|
+ SELECT
|
|
163
|
+ <include refid="Base_Column_List" />
|
|
164
|
+ FROM
|
|
165
|
+ tp_ticket_record_comment
|
|
166
|
+ WHERE
|
|
167
|
+ community_id = #{communityId,jdbcType=INTEGER}
|
|
168
|
+ AND ticket_id = #{ticketId,jdbcType=INTEGER}
|
|
169
|
+ AND ticket_record_id = #{id,jdbcType=INTEGER}
|
159
|
170
|
</select>
|
160
|
171
|
</mapper>
|