dingxin 6 years ago
parent
commit
e9680aaf44

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransactionReport.java View File

@@ -21,6 +21,20 @@ public class TpTransactionReport {
21 21
      */
22 22
     private String reportName;
23 23
 
24
+    /**
25
+     * 举报人姓名
26
+     * @return
27
+     */
28
+    private String reportStringName;
29
+
30
+    public String getReportStringName() {
31
+        return reportStringName;
32
+    }
33
+
34
+    public void setReportStringName(String reportStringName) {
35
+        this.reportStringName = reportStringName;
36
+    }
37
+
24 38
     public String getReportName() {
25 39
         return reportName;
26 40
     }

+ 4
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java View File

@@ -597,9 +597,10 @@ public class SocialServiceImpl implements SocialServiceI {
597 597
         tpTransactionReply.setUuidRole(taSysRoleMapper.selectByPrimaryKey(taUserVerify.getRoleId()).getDescription());
598 598
 
599 599
         TpTransactionReply tpTransactionReplyBack = new TpTransactionReply();
600
+        TpTransaction tpTransaction = new TpTransaction();
600 601
         //replyId为空的情况下被回复人就是帖子的创建人
601 602
         if (StringUtils.isEmpty(tpTransactionReply.getReplyId())) {
602
-            TpTransaction tpTransaction = tpTransactionMapper.selectByPrimaryKey(tpTransactionReply.getTransactionId(),tpTransactionReply.getCommunityId());
603
+              tpTransaction = tpTransactionMapper.selectByPrimaryKey(tpTransactionReply.getTransactionId(),tpTransactionReply.getCommunityId());
603 604
             //塞入被回复人信息
604 605
             tpTransactionReply.setReplyUuid(tpTransaction.getUuid());
605 606
             tpTransactionReply.setReplyUuidType(tpTransaction.getUuidType());
@@ -638,7 +639,8 @@ public class SocialServiceImpl implements SocialServiceI {
638 639
             }
639 640
         }
640 641
         // 推消息
641
-        TpMessage  tpMessage = new TpMessage(null,userElement.getCommunityId(),"9","1","1", tpTransactionReplyBack.getUuid(),"1","2",  userElement.getUserName()+":"+tpTransactionReply.getReplyContent(),
642
+        Integer uuId= "".equals(tpTransactionReplyBack.getUuid())?tpTransaction.getUuid():tpTransactionReplyBack.getUuid();
643
+        TpMessage  tpMessage = new TpMessage(null,userElement.getCommunityId(),"6","1","1", uuId,"1","2",  userElement.getUserName()+":"+tpTransactionReply.getReplyContent(),
642 644
                                           "1",null,null,"0",userElement.getUserVerifyId(),new Date(),null,null,null,null,null,tpTransactionReplyBack.getTransactionId());
643 645
         tpMessageMapper.insert(tpMessage);
644 646
         response.addSuccess("成功");

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml View File

@@ -344,7 +344,7 @@
344 344
                 and is_reported = 1
345 345
             </if>
346 346
             <if test="ManageStatus == 2">
347
-                (read_status IS NULL or read_status = 2)
347
+                (read_status IS NULL or read_status = 0)
348 348
             </if>
349 349
             <if test="ManageStatus == 3">
350 350
                 and  read_status= 1

+ 17
- 9
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReportMapper.xml View File

@@ -8,6 +8,9 @@
8 8
     <result column="report_reason_id" property="reportReasonId" jdbcType="VARCHAR" />
9 9
     <result column="reporter_id" property="reporterId" jdbcType="INTEGER" />
10 10
     <result column="reportName" property="reportName" jdbcType="VARCHAR" />
11
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
12
+    <result column="reportStringName" property="reportStringName" jdbcType="VARCHAR" />
13
+
11 14
   </resultMap>
12 15
   <sql id="Base_Column_List" >
13 16
     id, community_id, transaction_id, report_reason_id, reporter_id
@@ -109,15 +112,20 @@
109 112
   </select>
110 113
 
111 114
   <select id="transactionReplyList" resultMap="BaseResultMap">
112
-    SELECT
113
-    tr.id,
114
-	tr.community_id,
115
-	tr.transaction_id,
116
-	tr.report_reason_id,
117
-	tr.reporter_id,
118
-	rr.reason as reportName
119
-	from tp_transaction_report tr
120
-    left join sys_report_reason rr on tr.report_reason_id = rr.id
115
+      SELECT
116
+          tr.id,
117
+          tr.community_id,
118
+          tr.transaction_id,
119
+          tr.report_reason_id,
120
+          tr.reporter_id,
121
+          rr.reason AS reportName,
122
+          tr.create_date,
123
+          u.user_name AS reportStringName
124
+      FROM
125
+          tp_transaction_report tr
126
+      LEFT JOIN sys_report_reason rr ON tr.report_reason_id = rr.id
127
+      LEFT JOIN ta_user_verify uv on tr.reporter_id = uv.id
128
+      LEFT JOIN ta_user u on uv.user_id = u.id
121 129
     WHERE tr.transaction_id = #{id}
122 130
     and tr.community_id = #{communityId,jdbcType=INTEGER}
123 131
   </select>