dingxin преди 6 години
родител
ревизия
77959cf6b3

+ 2
- 2
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java Целия файл

@@ -262,7 +262,7 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
262 262
 	public ResponseBean transactionReplyList(String paramets, Integer communityId, Integer userID) {
263 263
 		ResponseBean responseBean = new ResponseBean();
264 264
 		JSONObject object= JSONObject.parseObject(paramets);
265
-		Integer id = object.getInteger("id");
265
+		Integer transactionId = object.getInteger("id");
266 266
 		/*回复*/
267 267
 		String replyTaUserName = object.getString("replyTaUserName");
268 268
 		/*被回复*/
@@ -278,7 +278,7 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
278 278
 		// 获得aap的id
279 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 284
 		for (TransactionReply transactionReply:TransactionReplylList){

+ 11
- 11
CODE/smart-community/property-api/src/main/resources/mapper/TransactionReplyMapper.xml Целия файл

@@ -15,23 +15,23 @@
15 15
     FROM
16 16
         tp_transaction tr
17 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 21
     WHERE
19 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 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 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 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 35
     </if>
36 36
 
37 37
     <if test="taUserName != null and taUserName !=''">