dingxin 6 years ago
parent
commit
77959cf6b3

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java View File

262
 	public ResponseBean transactionReplyList(String paramets, Integer communityId, Integer userID) {
262
 	public ResponseBean transactionReplyList(String paramets, Integer communityId, Integer userID) {
263
 		ResponseBean responseBean = new ResponseBean();
263
 		ResponseBean responseBean = new ResponseBean();
264
 		JSONObject object= JSONObject.parseObject(paramets);
264
 		JSONObject object= JSONObject.parseObject(paramets);
265
-		Integer id = object.getInteger("id");
265
+		Integer transactionId = object.getInteger("id");
266
 		/*回复*/
266
 		/*回复*/
267
 		String replyTaUserName = object.getString("replyTaUserName");
267
 		String replyTaUserName = object.getString("replyTaUserName");
268
 		/*被回复*/
268
 		/*被回复*/
278
 		// 获得aap的id
278
 		// 获得aap的id
279
 		Integer taUserId= userMapper.selectById(userID).getTaUserId();
279
 		Integer taUserId= userMapper.selectById(userID).getTaUserId();
280
 		// 分页查询
280
 		// 分页查询
281
-		List<TransactionReply> TransactionReplylList = transactionReplyMapper.transactionReplyList(page,id,taUserId,status,taUserName,createDate,replyTaUserName);
281
+		List<TransactionReply> TransactionReplylList = transactionReplyMapper.transactionReplyList(page,transactionId,taUserId,status,taUserName,createDate,replyTaUserName);
282
 		//查询帖子评论所带图片
282
 		//查询帖子评论所带图片
283
 
283
 
284
 		for (TransactionReply transactionReply:TransactionReplylList){
284
 		for (TransactionReply transactionReply:TransactionReplylList){

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

15
     FROM
15
     FROM
16
         tp_transaction tr
16
         tp_transaction tr
17
     LEFT JOIN tp_transaction_reply re ON tr.id = re.transaction_id
17
     LEFT JOIN tp_transaction_reply re ON tr.id = re.transaction_id
18
+    <if test="status == 1 ">
19
+    LEFT JOIN tp_user u ON re.reply_ta_user_id = u.ta_user_id
20
+    </if>
18
     WHERE
21
     WHERE
19
         tr.id = #{id}
22
         tr.id = #{id}
20
-    <if test="status != null and status !=''and status == 0 ">
21
-    AND re.reply_ta_user_id = #{taUserId}
23
+    <if test="status == 1 ">
24
+     AND  re.reply_ta_user_id = u.ta_user_id
22
     </if>
25
     </if>
23
-    <if test="status != null and status !=''and status == 1 ">
24
-    AND re.release_identity = 0
25
-    AND re.reply_ta_user_id = #{userID}
26
+    <if test="status == 0 ">
27
+    AND re.reply_ta_user_id = #{taUserId,jdbcType=INTEGER}
26
     </if>
28
     </if>
27
-
28
-    <if test="status != null and status !=''and status == 2 ">
29
-    AND re.release_identity = 0
30
-    AND re.ta_user_id = #{userID}
29
+    <if test="status == 2 ">
30
+    AND re.release_identity = 1
31
     </if>
31
     </if>
32
 
32
 
33
-    <if test="status != null and status !=''and status == 3 ">
34
-    AND re.ta_user_id = tr.create_user
33
+    <if test="status == 3 ">
34
+    AND re.ta_user_id = #{taUserId,jdbcType=INTEGER}
35
     </if>
35
     </if>
36
 
36
 
37
     <if test="taUserName != null and taUserName !=''">
37
     <if test="taUserName != null and taUserName !=''">