|
@@ -3,7 +3,7 @@
|
3
|
3
|
<mapper namespace="com.community.huiju.dao.TpMessageMapper" >
|
4
|
4
|
<resultMap id="BaseResultMap" type="com.community.huiju.model.TpMessage" >
|
5
|
5
|
<id column="id" property="id" jdbcType="INTEGER" />
|
6
|
|
- <id column="ticket_id" property="ticketId" jdbcType="INTEGER" />
|
|
6
|
+ <result column="ticket_id" property="ticketId" jdbcType="INTEGER" />
|
7
|
7
|
<result column="community_id" property="communityId" jdbcType="INTEGER" />
|
8
|
8
|
<result column="message_type" property="messageType" jdbcType="CHAR" />
|
9
|
9
|
<result column="advice_type" property="adviceType" jdbcType="CHAR" />
|
|
@@ -20,21 +20,17 @@
|
20
|
20
|
<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
|
21
|
21
|
<result column="update_user" property="updateUser" jdbcType="INTEGER" />
|
22
|
22
|
<result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
|
23
|
|
- <result column="ticket_status" property="ticketStatus" jdbcType="VARCHAR" />
|
24
|
|
- <result column="content" property="content" jdbcType="VARCHAR" />
|
25
|
|
- <result column="read_message_icon" property="readMessageIcon" jdbcType="VARCHAR" />
|
26
|
|
- <result column="unread_message_icon" property="unreadMessageIcon" jdbcType="VARCHAR" />
|
27
|
|
- <result column="message_detail_url" property="messageDetailUrl" jdbcType="VARCHAR" />
|
28
|
|
- <result column="message_icon_title" property="messageIconTitle" jdbcType="VARCHAR" />
|
29
|
|
- <result column="common_id" property="commonId" jdbcType="INTEGER" />
|
|
23
|
+ <result column="bill_id" property="billId" jdbcType="INTEGER" />
|
|
24
|
+ <result column="activity_id" property="activityId" jdbcType="INTEGER" />
|
|
25
|
+ <result column="announcement_id" property="announcementId" jdbcType="INTEGER" />
|
30
|
26
|
</resultMap>
|
31
|
27
|
<sql id="Base_Column_List" >
|
32
|
|
- id, ticket_id,community_id, message_type, advice_type, model_type, uuid, uuid_type, source,
|
33
|
|
- message_content, status, result, meaasge_type_id, read_status, create_user, create_date,
|
34
|
|
- update_user, update_date, common_id
|
|
28
|
+ id, ticket_id, community_id, message_type, advice_type, model_type, uuid, uuid_type,
|
|
29
|
+ source, message_content, status, result, meaasge_type_id, read_status, create_user,
|
|
30
|
+ create_date, update_user, update_date, bill_id, activity_id, announcement_id
|
35
|
31
|
</sql>
|
36
|
32
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
37
|
|
- select
|
|
33
|
+ select
|
38
|
34
|
<include refid="Base_Column_List" />
|
39
|
35
|
from tp_message
|
40
|
36
|
where id = #{id,jdbcType=INTEGER}
|
|
@@ -44,26 +40,28 @@
|
44
|
40
|
where id = #{id,jdbcType=INTEGER}
|
45
|
41
|
</delete>
|
46
|
42
|
<insert id="insert" parameterType="com.community.huiju.model.TpMessage" >
|
47
|
|
- insert into tp_message (id, ticket_id, community_id, message_type,
|
48
|
|
- advice_type, model_type, uuid,
|
49
|
|
- uuid_type, source, message_content,
|
50
|
|
- status, result, meaasge_type_id,
|
51
|
|
- read_status, create_user, create_date,
|
52
|
|
- update_user, update_date, common_id)
|
53
|
|
- values (#{id,jdbcType=INTEGER}, #{ticketId,jdbcType=INTEGER},#{communityId,jdbcType=INTEGER}, #{messageType,jdbcType=CHAR},
|
54
|
|
- #{adviceType,jdbcType=CHAR}, #{modelType,jdbcType=CHAR}, #{uuid,jdbcType=INTEGER},
|
55
|
|
- #{uuidType,jdbcType=CHAR}, #{source,jdbcType=CHAR}, #{messageContent,jdbcType=VARCHAR},
|
56
|
|
- #{status,jdbcType=CHAR}, #{result,jdbcType=VARCHAR}, #{meaasgeTypeId,jdbcType=VARCHAR},
|
57
|
|
- #{readStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
|
58
|
|
- #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}, #{commonId,jdbcType=INTEGER})
|
|
43
|
+ insert into tp_message (id, ticket_id, community_id,
|
|
44
|
+ message_type, advice_type, model_type,
|
|
45
|
+ uuid, uuid_type, source, message_content,
|
|
46
|
+ status, result, meaasge_type_id,
|
|
47
|
+ read_status, create_user, create_date,
|
|
48
|
+ update_user, update_date, bill_id,
|
|
49
|
+ activity_id, announcement_id)
|
|
50
|
+ values (#{id,jdbcType=INTEGER}, #{ticketId,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},
|
|
51
|
+ #{messageType,jdbcType=CHAR}, #{adviceType,jdbcType=CHAR}, #{modelType,jdbcType=CHAR},
|
|
52
|
+ #{uuid,jdbcType=INTEGER}, #{uuidType,jdbcType=CHAR}, #{source,jdbcType=CHAR}, #{messageContent,jdbcType=VARCHAR},
|
|
53
|
+ #{status,jdbcType=CHAR}, #{result,jdbcType=VARCHAR}, #{meaasgeTypeId,jdbcType=VARCHAR},
|
|
54
|
+ #{readStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
|
|
55
|
+ #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}, #{billId,jdbcType=INTEGER},
|
|
56
|
+ #{activityId,jdbcType=INTEGER}, #{announcementId,jdbcType=INTEGER})
|
59
|
57
|
</insert>
|
60
|
|
- <insert id="insertSelective" parameterType="com.community.huiju.model.TpMessage" useGeneratedKeys="true" keyProperty="id" >
|
|
58
|
+ <insert id="insertSelective" parameterType="com.community.huiju.model.TpMessage" >
|
61
|
59
|
insert into tp_message
|
62
|
60
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
63
|
61
|
<if test="id != null" >
|
64
|
62
|
id,
|
65
|
63
|
</if>
|
66
|
|
- <if test="ticketId != null">
|
|
64
|
+ <if test="ticketId != null" >
|
67
|
65
|
ticket_id,
|
68
|
66
|
</if>
|
69
|
67
|
<if test="communityId != null" >
|
|
@@ -114,15 +112,21 @@
|
114
|
112
|
<if test="updateDate != null" >
|
115
|
113
|
update_date,
|
116
|
114
|
</if>
|
117
|
|
- <if test="commonId != null">
|
118
|
|
- common_id,
|
|
115
|
+ <if test="billId != null" >
|
|
116
|
+ bill_id,
|
|
117
|
+ </if>
|
|
118
|
+ <if test="activityId != null" >
|
|
119
|
+ activity_id,
|
|
120
|
+ </if>
|
|
121
|
+ <if test="announcementId != null" >
|
|
122
|
+ announcement_id,
|
119
|
123
|
</if>
|
120
|
124
|
</trim>
|
121
|
125
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
122
|
126
|
<if test="id != null" >
|
123
|
127
|
#{id,jdbcType=INTEGER},
|
124
|
128
|
</if>
|
125
|
|
- <if test="ticketId != null">
|
|
129
|
+ <if test="ticketId != null" >
|
126
|
130
|
#{ticketId,jdbcType=INTEGER},
|
127
|
131
|
</if>
|
128
|
132
|
<if test="communityId != null" >
|
|
@@ -173,15 +177,21 @@
|
173
|
177
|
<if test="updateDate != null" >
|
174
|
178
|
#{updateDate,jdbcType=TIMESTAMP},
|
175
|
179
|
</if>
|
176
|
|
- <if test="commonId != null">
|
177
|
|
- #{commonId,jdbcType=INTEGER},
|
|
180
|
+ <if test="billId != null" >
|
|
181
|
+ #{billId,jdbcType=INTEGER},
|
|
182
|
+ </if>
|
|
183
|
+ <if test="activityId != null" >
|
|
184
|
+ #{activityId,jdbcType=INTEGER},
|
|
185
|
+ </if>
|
|
186
|
+ <if test="announcementId != null" >
|
|
187
|
+ #{announcementId,jdbcType=INTEGER},
|
178
|
188
|
</if>
|
179
|
189
|
</trim>
|
180
|
190
|
</insert>
|
181
|
191
|
<update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpMessage" >
|
182
|
192
|
update tp_message
|
183
|
193
|
<set >
|
184
|
|
- <if test="ticketId != null">
|
|
194
|
+ <if test="ticketId != null" >
|
185
|
195
|
ticket_id = #{ticketId,jdbcType=INTEGER},
|
186
|
196
|
</if>
|
187
|
197
|
<if test="communityId != null" >
|
|
@@ -232,8 +242,14 @@
|
232
|
242
|
<if test="updateDate != null" >
|
233
|
243
|
update_date = #{updateDate,jdbcType=TIMESTAMP},
|
234
|
244
|
</if>
|
235
|
|
- <if test="commonId != null">
|
236
|
|
- common_id = #{commonId,jdbcType=INTEGER}
|
|
245
|
+ <if test="billId != null" >
|
|
246
|
+ bill_id = #{billId,jdbcType=INTEGER},
|
|
247
|
+ </if>
|
|
248
|
+ <if test="activityId != null" >
|
|
249
|
+ activity_id = #{activityId,jdbcType=INTEGER},
|
|
250
|
+ </if>
|
|
251
|
+ <if test="announcementId != null" >
|
|
252
|
+ announcement_id = #{announcementId,jdbcType=INTEGER},
|
237
|
253
|
</if>
|
238
|
254
|
</set>
|
239
|
255
|
where id = #{id,jdbcType=INTEGER}
|
|
@@ -257,7 +273,9 @@
|
257
|
273
|
create_date = #{createDate,jdbcType=TIMESTAMP},
|
258
|
274
|
update_user = #{updateUser,jdbcType=INTEGER},
|
259
|
275
|
update_date = #{updateDate,jdbcType=TIMESTAMP},
|
260
|
|
- common_id = #{commonId,jdbcType=INTEGER}
|
|
276
|
+ bill_id = #{billId,jdbcType=INTEGER},
|
|
277
|
+ activity_id = #{activityId,jdbcType=INTEGER},
|
|
278
|
+ announcement_id = #{announcementId,jdbcType=INTEGER}
|
261
|
279
|
where id = #{id,jdbcType=INTEGER}
|
262
|
280
|
</update>
|
263
|
281
|
|