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
      */
21
      */
22
     private String reportName;
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
     public String getReportName() {
38
     public String getReportName() {
25
         return reportName;
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
         tpTransactionReply.setUuidRole(taSysRoleMapper.selectByPrimaryKey(taUserVerify.getRoleId()).getDescription());
597
         tpTransactionReply.setUuidRole(taSysRoleMapper.selectByPrimaryKey(taUserVerify.getRoleId()).getDescription());
598
 
598
 
599
         TpTransactionReply tpTransactionReplyBack = new TpTransactionReply();
599
         TpTransactionReply tpTransactionReplyBack = new TpTransactionReply();
600
+        TpTransaction tpTransaction = new TpTransaction();
600
         //replyId为空的情况下被回复人就是帖子的创建人
601
         //replyId为空的情况下被回复人就是帖子的创建人
601
         if (StringUtils.isEmpty(tpTransactionReply.getReplyId())) {
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
             tpTransactionReply.setReplyUuid(tpTransaction.getUuid());
605
             tpTransactionReply.setReplyUuid(tpTransaction.getUuid());
605
             tpTransactionReply.setReplyUuidType(tpTransaction.getUuidType());
606
             tpTransactionReply.setReplyUuidType(tpTransaction.getUuidType());
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
                                           "1",null,null,"0",userElement.getUserVerifyId(),new Date(),null,null,null,null,null,tpTransactionReplyBack.getTransactionId());
644
                                           "1",null,null,"0",userElement.getUserVerifyId(),new Date(),null,null,null,null,null,tpTransactionReplyBack.getTransactionId());
643
         tpMessageMapper.insert(tpMessage);
645
         tpMessageMapper.insert(tpMessage);
644
         response.addSuccess("成功");
646
         response.addSuccess("成功");

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

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

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

8
     <result column="report_reason_id" property="reportReasonId" jdbcType="VARCHAR" />
8
     <result column="report_reason_id" property="reportReasonId" jdbcType="VARCHAR" />
9
     <result column="reporter_id" property="reporterId" jdbcType="INTEGER" />
9
     <result column="reporter_id" property="reporterId" jdbcType="INTEGER" />
10
     <result column="reportName" property="reportName" jdbcType="VARCHAR" />
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
   </resultMap>
14
   </resultMap>
12
   <sql id="Base_Column_List" >
15
   <sql id="Base_Column_List" >
13
     id, community_id, transaction_id, report_reason_id, reporter_id
16
     id, community_id, transaction_id, report_reason_id, reporter_id
109
   </select>
112
   </select>
110
 
113
 
111
   <select id="transactionReplyList" resultMap="BaseResultMap">
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
     WHERE tr.transaction_id = #{id}
129
     WHERE tr.transaction_id = #{id}
122
     and tr.community_id = #{communityId,jdbcType=INTEGER}
130
     and tr.community_id = #{communityId,jdbcType=INTEGER}
123
   </select>
131
   </select>