dingxin 6 years ago
parent
commit
94a302ad26

+ 6
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/MessageMapper.java View File

58
      * @return
58
      * @return
59
      */
59
      */
60
     IPage<Message> myMessageList(Page<Message> page, @Param("messageType") String messageType, @Param("readStatus")String readStatus, @Param("createDate")Date createDate, @Param("messageContent")String messageContent, @Param("uuid")Integer uuid);
60
     IPage<Message> myMessageList(Page<Message> page, @Param("messageType") String messageType, @Param("readStatus")String readStatus, @Param("createDate")Date createDate, @Param("messageContent")String messageContent, @Param("uuid")Integer uuid);
61
+
62
+    /**
63
+     * 工单分配后改变message的状态
64
+     * @param ticketId
65
+     */
66
+    void updateTickMessageStatus(@Param("ticketId") Integer ticketId);
61
 }
67
 }

+ 3
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpTicketServiceImpl.java View File

349
                 tdImagesMapper.insert(tdImages);
349
                 tdImagesMapper.insert(tdImages);
350
             }
350
             }
351
         }
351
         }
352
+        //分配成功后这只messgae消息表status为无效
353
+        messageMapper.updateTickMessageStatus(ticketId);
354
+
352
         response.addSuccess("成功");
355
         response.addSuccess("成功");
353
         return response;
356
         return response;
354
     }
357
     }

+ 11
- 0
CODE/smart-community/property-api/src/main/resources/mapper/MessageMapper.xml View File

138
             order by create_date desc
138
             order by create_date desc
139
         </where>
139
         </where>
140
     </select>
140
     </select>
141
+
142
+    <update id="updateTickMessageStatus" >
143
+        update tp_message
144
+        set
145
+            status = 0
146
+        where
147
+        ticket_id = #{ticketId,jdbcType=INTEGER}
148
+        and model_type=2
149
+        order by create_date ASC
150
+        LIMIT 1
151
+    </update>
141
 </mapper>
152
 </mapper>

+ 7
- 7
VUECODE/smart-property-manage/src/views/message/messageIndex.vue View File

55
        <template slot-scope="scope" >
55
        <template slot-scope="scope" >
56
         <a :title="scope.row.messageContent" v-if="scope.row.readStatus==='0'">
56
         <a :title="scope.row.messageContent" v-if="scope.row.readStatus==='0'">
57
           <span style="color: black	" >
57
           <span style="color: black	" >
58
-           {{ scope.row.messageContent.length>='100'?scope.row.messageContent.substring(0,15)+'..':scope.row.messageContent }}
58
+           {{ scope.row.messageContent.length>='1000'?scope.row.messageContent.substring(0,15)+'..':scope.row.messageContent }}
59
           </span>
59
           </span>
60
         </a>
60
         </a>
61
 
61
 
62
         <a :title="scope.row.messageContent" v-if="scope.row.readStatus==='1'">
62
         <a :title="scope.row.messageContent" v-if="scope.row.readStatus==='1'">
63
           <span style="color:#AAAAAA" >
63
           <span style="color:#AAAAAA" >
64
-           {{ scope.row.messageContent.length>='100'?scope.row.messageContent.substring(0,15)+'..':scope.row.messageContent }}
64
+           {{ scope.row.messageContent.length>='1000'?scope.row.messageContent.substring(0,15)+'..':scope.row.messageContent }}
65
           </span>
65
           </span>
66
         </a>
66
         </a>
67
       </template> 
67
       </template> 
68
        </el-table-column>
68
        </el-table-column>
69
-        <el-table-column prop="id" label="操作1" align="center">
69
+        <el-table-column prop="id" label="操作" align="center">
70
         <template slot-scope="scope">
70
         <template slot-scope="scope">
71
             <!--无效的-->
71
             <!--无效的-->
72
           <span  v-if="scope.row.readStatus==='1'" style="color:#AAAAAA">
72
           <span  v-if="scope.row.readStatus==='1'" style="color:#AAAAAA">
243
       const ide= this.deleteIds
243
       const ide= this.deleteIds
244
        console.log('this.listQuery.id',ide)
244
        console.log('this.listQuery.id',ide)
245
        if ( ide.length<=0) {
245
        if ( ide.length<=0) {
246
-        this.$message.error('只能选择一行数据进行修改!')
246
+        this.$message.error('请您选择一条消息')
247
         return
247
         return
248
       }
248
       }
249
       this.$store.dispatch('DelectRead', ide).then((res) => {
249
       this.$store.dispatch('DelectRead', ide).then((res) => {
250
         this.$message({
250
         this.$message({
251
           message: '成功',
251
           message: '成功',
252
           type: 'success'
252
           type: 'success'
253
-        });
254
-       this.dataQuery()     
255
-      })    
253
+        });    
254
+      })
255
+      this.dataQuery()     
256
     },
256
     },
257
     //点击详情修改当前状态为已读
257
     //点击详情修改当前状态为已读
258
     already(ide){
258
     already(ide){