瀏覽代碼

首页调整

傅行帆 6 年之前
父節點
當前提交
6820e9c914

+ 26
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpMessage.java 查看文件

38
     private Integer updateUser;
38
     private Integer updateUser;
39
 
39
 
40
     private Date updateDate;
40
     private Date updateDate;
41
+    
42
+    /**
43
+     * 工单状态
44
+     */
45
+    private String ticketStatus;
46
+    
47
+    /**
48
+     * 工单扭转自动添加的内容
49
+     */
50
+    private String content;
41
 
51
 
42
     public Integer getId() {
52
     public Integer getId() {
43
         return id;
53
         return id;
182
     public void setUpdateDate(Date updateDate) {
192
     public void setUpdateDate(Date updateDate) {
183
         this.updateDate = updateDate;
193
         this.updateDate = updateDate;
184
     }
194
     }
195
+    
196
+    public String getTicketStatus() {
197
+        return ticketStatus;
198
+    }
199
+    
200
+    public void setTicketStatus(String ticketStatus) {
201
+        this.ticketStatus = ticketStatus;
202
+    }
203
+    
204
+    public String getContent() {
205
+        return content;
206
+    }
207
+    
208
+    public void setContent(String content) {
209
+        this.content = content;
210
+    }
185
 }
211
 }

+ 34
- 9
CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml 查看文件

20
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
20
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
21
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
21
     <result column="update_user" property="updateUser" jdbcType="INTEGER" />
22
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
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" />
23
   </resultMap>
25
   </resultMap>
24
   <sql id="Base_Column_List" >
26
   <sql id="Base_Column_List" >
25
     id, ticket_id,community_id, message_type, advice_type, model_type, uuid, uuid_type, source,
27
     id, ticket_id,community_id, message_type, advice_type, model_type, uuid, uuid_type, source,
260
 
262
 
261
   <select id="getMessages" resultMap="BaseResultMap">
263
   <select id="getMessages" resultMap="BaseResultMap">
262
     SELECT
264
     SELECT
263
-      <include refid="Base_Column_List" />
265
+        t.id,
266
+        t.ticket_id,
267
+        t.community_id,
268
+        t.message_type,
269
+        t.advice_type,
270
+        t.model_type,
271
+        t.uuid,
272
+        t.uuid_type,
273
+        t.source,
274
+        t.message_content,
275
+        t.STATUS,
276
+        t.result,
277
+        t.meaasge_type_id,
278
+        t.read_status,
279
+        t.create_user,
280
+        t.create_date,
281
+        t.update_user,
282
+        t.update_date,
283
+        k.status,
284
+        r.content,
285
+        d.name as ticket_status
264
     FROM
286
     FROM
265
-        tp_message
287
+        tp_message t
288
+    LEFT JOIN tp_ticket k on t.ticket_id = k.id  AND k.community_id = #{communityId,jdbcType=INTEGER}
289
+    LEFT JOIN tp_ticket_record r on t.ticket_id = r.ticket_id AND r.community_id = #{communityId,jdbcType=INTEGER}  AND k.status = r.status
290
+    LEFT JOIN sys_dictionary d on k.status = d.code AND d.group_id = ( SELECT id FROM sys_dictionary WHERE CODE = "ticket_status" )
266
     WHERE
291
     WHERE
267
-        uuid_type = 1
268
-        AND community_id = #{communityId,jdbcType=INTEGER}
269
-        AND uuid = #{userId,jdbcType=INTEGER}
270
-        AND STATUS = 1
271
-        AND advice_type = 1
272
-        AND model_type = #{modelType,jdbcType=INTEGER}
292
+        t.uuid_type = 1
293
+        AND t.community_id = #{communityId,jdbcType=INTEGER}
294
+        AND t.uuid = #{userId,jdbcType=INTEGER}
295
+        AND t.STATUS = 1
296
+        AND t.advice_type = 1
297
+        AND t.model_type = #{modelType,jdbcType=INTEGER}
273
     ORDER BY
298
     ORDER BY
274
-    create_date DESC
299
+    t.create_date DESC
275
   </select>
300
   </select>
276
 
301
 
277
   <update id="updateReadStatus" parameterType="java.lang.Integer" >
302
   <update id="updateReadStatus" parameterType="java.lang.Integer" >