dingxin 6 年前
父节点
当前提交
c81dc400fe

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransaction.java 查看文件

@@ -120,6 +120,20 @@ public class TpTransaction {
120 120
      */
121 121
     private List<TpTransactionReport> TpTransactionReport;
122 122
 
123
+    /**
124
+     * 判断前端举报标记是否展示
125
+     * @return
126
+     */
127
+    private  Integer reportButton;
128
+
129
+    public Integer getReportButton() {
130
+        return reportButton;
131
+    }
132
+
133
+    public void setReportButton(Integer reportButton) {
134
+        this.reportButton = reportButton;
135
+    }
136
+
123 137
     public List<com.community.huiju.model.TpTransactionReport> getTpTransactionReport() {
124 138
         return TpTransactionReport;
125 139
     }

+ 5
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransactionReport.java 查看文件

@@ -25,14 +25,14 @@ public class TpTransactionReport {
25 25
      * 举报人姓名
26 26
      * @return
27 27
      */
28
-    private String reportStringName;
28
+    private String reportUserName;
29 29
 
30
-    public String getReportStringName() {
31
-        return reportStringName;
30
+    public String getReportUserName() {
31
+        return reportUserName;
32 32
     }
33 33
 
34
-    public void setReportStringName(String reportStringName) {
35
-        this.reportStringName = reportStringName;
34
+    public void setReportUserName(String reportUserName) {
35
+        this.reportUserName = reportUserName;
36 36
     }
37 37
 
38 38
     public String getReportName() {

+ 9
- 5
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java 查看文件

@@ -638,11 +638,10 @@ public class SocialServiceImpl implements SocialServiceI {
638 638
                 tdImagesMapper.insert(tdImages);
639 639
             }
640 640
         }
641
-        // 推消息
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(),
644
-                                          "1",null,null,"0",userElement.getUserVerifyId(),new Date(),null,null,null,null,null,tpTransactionReplyBack.getTransactionId());
645
-        tpMessageMapper.insert(tpMessage);
641
+        // 推消
642
+        TpMessage  tpMessage = new TpMessage(null,userElement.getCommunityId(),"6","1","1", tpTransactionReply.getUuid(),"1","2",  userElement.getUserName()+":"+tpTransactionReply.getReplyContent(),
643
+                                          "1",null,null,"0",userElement.getUserVerifyId(),new Date(),null,null,null,null,null,tpTransactionReply.getTransactionId());
644
+        tpMessageMapper.insertSelective(tpMessage);
646 645
         response.addSuccess("成功");
647 646
         return response;
648 647
     }
@@ -1038,6 +1037,11 @@ public class SocialServiceImpl implements SocialServiceI {
1038 1037
         List<TpTransaction> tpTransactionManageList= tpTransactionMapper.tpTransactionManageList(tpUser.getCommunityId(),status,transactionTitle);
1039 1038
 
1040 1039
         for (TpTransaction tpTransaction:tpTransactionManageList){
1040
+            // 判断前台举报按钮是否展示
1041
+            int isReported = Integer.parseInt(tpTransaction.getIsReported()); int isStatus = status.intValue();
1042
+            if (1 == isReported && 1 == isStatus){
1043
+                tpTransaction.setReportButton(1);
1044
+            }
1041 1045
             // 统计举报整数
1042 1046
             int transactionReplyCount= tpTransactionReportMapper.selectCount(tpTransaction.getId(),tpTransaction.getCommunityId());
1043 1047
             tpTransaction.setTransactionReplyCount(transactionReplyCount);

+ 2
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml 查看文件

@@ -52,14 +52,14 @@
52 52
       uuid_type, source, message_content,
53 53
       status, result, meaasge_type_id,
54 54
       read_status, create_user, create_date,
55
-      update_user, update_date, bill_id, activity_id, announcement_id)
55
+      update_user, update_date, bill_id, activity_id, announcement_id,transaction_id)
56 56
     values (#{id,jdbcType=INTEGER}, #{ticketId,jdbcType=INTEGER},#{communityId,jdbcType=INTEGER}, #{messageType,jdbcType=CHAR},
57 57
       #{adviceType,jdbcType=CHAR}, #{modelType,jdbcType=CHAR}, #{uuid,jdbcType=INTEGER},
58 58
       #{uuidType,jdbcType=CHAR}, #{source,jdbcType=CHAR}, #{messageContent,jdbcType=VARCHAR},
59 59
       #{status,jdbcType=CHAR}, #{result,jdbcType=VARCHAR}, #{meaasgeTypeId,jdbcType=VARCHAR},
60 60
       #{readStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
61 61
       #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}, #{billId,jdbcType=INTEGER},
62
-      #{activityId,jdbcType=INTEGER}, #{announcementId,jdbcType=INTEGER})
62
+      #{activityId,jdbcType=INTEGER}, #{announcementId,jdbcType=INTEGER},#{transactionId,jdbcType=VARCHAR})
63 63
   </insert>
64 64
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpMessage" useGeneratedKeys="true" keyProperty="id" >
65 65
     insert into tp_message

+ 2
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml 查看文件

@@ -22,11 +22,12 @@
22 22
         <result column="role_name" property="roleName" jdbcType="VARCHAR"/>
23 23
         <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR"/>
24 24
         <result column="room_no_name" property="roomNoName" jdbcType="VARCHAR"/>
25
+        <result column="is_reported" property="isReported" jdbcType="VARCHAR"/>
25 26
 
26 27
     </resultMap>
27 28
     <sql id="Base_Column_List">
28 29
     id, community_id, transaction_title, transaction_content, sort,uuid,uuid_type,uuid_name,
29
-    view_count, status, type, create_user, create_date, update_user, update_date, release_identity,room_no_name,read_status
30
+    view_count, status, type, create_user, create_date, update_user, update_date, release_identity,room_no_name,read_status,is_reported
30 31
   </sql>
31 32
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpTransaction">
32 33
     select

+ 2
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReportMapper.xml 查看文件

@@ -9,7 +9,7 @@
9 9
     <result column="reporter_id" property="reporterId" jdbcType="INTEGER" />
10 10
     <result column="reportName" property="reportName" jdbcType="VARCHAR" />
11 11
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
12
-    <result column="reportStringName" property="reportStringName" jdbcType="VARCHAR" />
12
+    <result column="reportStringName" property="reportUserName" jdbcType="VARCHAR" />
13 13
 
14 14
   </resultMap>
15 15
   <sql id="Base_Column_List" >
@@ -120,7 +120,7 @@
120 120
           tr.reporter_id,
121 121
           rr.reason AS reportName,
122 122
           tr.create_date,
123
-          u.user_name AS reportStringName
123
+          u.user_name AS reportUserName
124 124
       FROM
125 125
           tp_transaction_report tr
126 126
       LEFT JOIN sys_report_reason rr ON tr.report_reason_id = rr.id