dingxin 6 年前
父节点
当前提交
7430dee4f1

+ 1
- 0
.gitignore 查看文件

1
 *.class
1
 *.class
2
+CODE/smart-community-word/.idea/workspace.xml

+ 0
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java 查看文件

309
                                     @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
309
                                     @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
310
                                     @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
310
                                     @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
311
         ResponseBean responseBean = new ResponseBean();
311
         ResponseBean responseBean = new ResponseBean();
312
-
313
         if (!check(communityId)) {
312
         if (!check(communityId)) {
314
             responseBean.addError("小区不存在");
313
             responseBean.addError("小区不存在");
315
             return responseBean;
314
             return responseBean;

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionReplyMapper.java 查看文件

28
      * @param founderUserID
28
      * @param founderUserID
29
      * @return
29
      * @return
30
      */
30
      */
31
-    List<TpTransactionReply> getCommunityIdAndTransactionId(@Param("communityId") Integer communityId, @Param("transactionId") Integer transactionId,@Param("userID") Integer userID,@Param("founderUserID") Integer founderUserID,@Param("type")Integer type);
31
+    List<TpTransactionReply> getCommunityIdAndTransactionId(@Param("communityId") Integer communityId, @Param("transactionId") Integer transactionId,@Param("userID") Integer userID,@Param("founderUserID") Integer founderUserID,@Param("type")Integer type, @Param("roomNoName")String roomNoName);
32
 
32
 
33
     /**
33
     /**
34
      * 查询我回复别人的帖子
34
      * 查询我回复别人的帖子

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

34
     private String telephone;
34
     private String telephone;
35
 
35
 
36
     private List<String> imgList;
36
     private List<String> imgList;
37
-    
37
+
38
+    /**
39
+     * 房间号
40
+     */
41
+    private  String roomNoName;
42
+
38
     /**
43
     /**
39
      * 是否被举报 1是被举报 0或null是没被举报
44
      * 是否被举报 1是被举报 0或null是没被举报
40
      */
45
      */
261
     public void setSort(String sort) {
266
     public void setSort(String sort) {
262
         this.sort = sort;
267
         this.sort = sort;
263
     }
268
     }
269
+
270
+    public String getRoomNoName() {
271
+        return roomNoName;
272
+    }
273
+
274
+    public void setRoomNoName(String roomNoName) {
275
+        this.roomNoName = roomNoName;
276
+    }
264
 }
277
 }

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

51
      */
51
      */
52
     private  Integer taUserVerifyId;
52
     private  Integer taUserVerifyId;
53
 
53
 
54
+    private String roomNoName;
55
+
56
+    public String getRoomNoName() {
57
+        return roomNoName;
58
+    }
59
+
60
+    public void setRoomNoName(String roomNoName) {
61
+        this.roomNoName = roomNoName;
62
+    }
63
+
54
     public void setTaUserVerifyId(Integer taUserVerifyId) {
64
     public void setTaUserVerifyId(Integer taUserVerifyId) {
55
         this.taUserVerifyId = taUserVerifyId;
65
         this.taUserVerifyId = taUserVerifyId;
56
     }
66
     }

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

301
 
301
 
302
         tpTransactions.stream().forEach(e -> {
302
         tpTransactions.stream().forEach(e -> {
303
             if (null != e.getTaUserVerifyId()) {
303
             if (null != e.getTaUserVerifyId()) {
304
-                TaUserVerify userVerify = taUserVerifyMapper.selectByPrimaryKey(e.getTaUserVerifyId());
305
-                TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(userVerify.getRoleId());
304
+                TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(e.getTaUserVerifyId());
306
                 e.setRoleId(taSysRole.getId());
305
                 e.setRoleId(taSysRole.getId());
307
                 e.setRoleName(taSysRole.getRoleName());
306
                 e.setRoleName(taSysRole.getRoleName());
308
             }
307
             }
340
         tpTransaction.setCreateDate(new Date());
339
         tpTransaction.setCreateDate(new Date());
341
         tpTransaction.setUpdateUser(userElement.getId());
340
         tpTransaction.setUpdateUser(userElement.getId());
342
         tpTransaction.setUpdateDate(new Date());
341
         tpTransaction.setUpdateDate(new Date());
343
-        tpTransaction.setTaUserVerifyId(userElement.getUserVerifyId());
342
+        TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
343
+        tpTransaction.setTaUserVerifyId(taUserVerify.getRoleId());
344
+        tpTransaction.setRoomNoName(taUserVerify.getRoomNoName());
344
         tpTransaction.setIsReported("0");
345
         tpTransaction.setIsReported("0");
345
         // 发布者身份  0 APP  1 物业
346
         // 发布者身份  0 APP  1 物业
346
         tpTransaction.setReleaseIdentity("0");
347
         tpTransaction.setReleaseIdentity("0");
574
         //  评论帖子取 TpTransaction 的创建人,回复对话取传过来的值
575
         //  评论帖子取 TpTransaction 的创建人,回复对话取传过来的值
575
         tpTransactionReply.setReplyTaUserId(tpTransactionReply.getReplyTaUserId()==null?tpTransaction.getCreateUser():tpTransactionReply.getReplyTaUserId());
576
         tpTransactionReply.setReplyTaUserId(tpTransactionReply.getReplyTaUserId()==null?tpTransaction.getCreateUser():tpTransactionReply.getReplyTaUserId());
576
         tpTransactionReply.setReleaseIdentity("0");
577
         tpTransactionReply.setReleaseIdentity("0");
577
-        tpTransactionReply.setTaUserVerifyId(userElement.getUserVerifyId());
578
+        TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
579
+        tpTransactionReply.setTaUserVerifyId(taUserVerify.getRoleId());
580
+        tpTransactionReply.setRoomNoName(taUserVerify.getRoomNoName());
578
         tpTransactionReply.setCreateDate(new Date());
581
         tpTransactionReply.setCreateDate(new Date());
579
         tpTransactionReplyMapper.insert(tpTransactionReply);
582
         tpTransactionReplyMapper.insert(tpTransactionReply);
580
 
583
 
904
         TpTransaction tpTransaction= tpTransactionMapper.getById(transactionId);
907
         TpTransaction tpTransaction= tpTransactionMapper.getById(transactionId);
905
 
908
 
906
         PageHelper.startPage(pageNum, pageSize, "create_date " + order);
909
         PageHelper.startPage(pageNum, pageSize, "create_date " + order);
907
-        List<TpTransactionReply> replies = tpTransactionReplyMapper.getCommunityIdAndTransactionId(userElement.getCommunityId(), transactionId, userElement.getUnitId(), tpTransaction.getCreateUser(), type);
910
+        //房间号
911
+         TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
912
+        List<TpTransactionReply> replies = tpTransactionReplyMapper.getCommunityIdAndTransactionId(userElement.getCommunityId(), transactionId, userElement.getId(), tpTransaction.getCreateUser(),type,taUserVerify.getRoomNoName());
908
         for (TpTransactionReply tpTransactionReply : replies) {
913
         for (TpTransactionReply tpTransactionReply : replies) {
909
             List<TdImages> tdImagesList = tdImagesMapper.selectImages(tpTransactionReply.getId(), "reply");
914
             List<TdImages> tdImagesList = tdImagesMapper.selectImages(tpTransactionReply.getId(), "reply");
910
             List<String> list = new ArrayList<>();
915
             List<String> list = new ArrayList<>();
912
                 list.add(imageUrl.getImageUrl());
917
                 list.add(imageUrl.getImageUrl());
913
                 tpTransactionReply.setImgList(list);
918
                 tpTransactionReply.setImgList(list);
914
             }
919
             }
915
-
916
-
917
         }
920
         }
918
 
921
 
919
         responseBean.addSuccess(replies);
922
         responseBean.addSuccess(replies);

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

19
         <result column="role_name" property="roleName" jdbcType="VARCHAR"/>
19
         <result column="role_name" property="roleName" jdbcType="VARCHAR"/>
20
         <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER"/>
20
         <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER"/>
21
         <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR"/>
21
         <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR"/>
22
+        <result column="room_no_name" property="roomNoName" jdbcType="VARCHAR"/>
22
 
23
 
23
     </resultMap>
24
     </resultMap>
24
     <sql id="Base_Column_List">
25
     <sql id="Base_Column_List">
25
     id, community_id, ta_user_id, transaction_title, transaction_content, sort,
26
     id, community_id, ta_user_id, transaction_title, transaction_content, sort,
26
-    view_count, status, type, create_user, create_date, update_user, update_date, ta_user_verify_id, release_identity
27
+    view_count, status, type, create_user, create_date, update_user, update_date, ta_user_verify_id, release_identity,room_no_name
27
   </sql>
28
   </sql>
28
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpTransaction">
29
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpTransaction">
29
     SELECT
30
     SELECT
62
       sort,
63
       sort,
63
       view_count, status,
64
       view_count, status,
64
       type, create_user, create_date, 
65
       type, create_user, create_date, 
65
-      update_user, update_date)
66
+      update_user, update_date,room_no_name)
66
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},#{releaseIdentity,jdbcType=VARCHAR},#{taUserVerifyId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER},
67
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},#{releaseIdentity,jdbcType=VARCHAR},#{taUserVerifyId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER},
67
       #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR},
68
       #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR},
68
        #{viewCount,jdbcType=INTEGER}, #{status,jdbcType=CHAR},
69
        #{viewCount,jdbcType=INTEGER}, #{status,jdbcType=CHAR},
69
       #{type,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
70
       #{type,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
70
-      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
71
+      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP},#{roomNoName,jdbcType=VARCHAR})
71
   </insert>
72
   </insert>
72
     <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id"
73
     <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id"
73
             parameterType="com.community.huiju.model.TpTransaction">
74
             parameterType="com.community.huiju.model.TpTransaction">
119
                 ta_user_verify_id,
120
                 ta_user_verify_id,
120
             </if>
121
             </if>
121
             <if test="releaseIdentity != null">
122
             <if test="releaseIdentity != null">
122
-                release_identity
123
+                release_identity,
124
+            </if>
125
+            <if test="roomNoName != null">
126
+                room_no_name
123
             </if>
127
             </if>
124
         </trim>
128
         </trim>
125
         <trim prefix="values (" suffix=")" suffixOverrides=",">
129
         <trim prefix="values (" suffix=")" suffixOverrides=",">
171
             <if test="releaseIdentity != null">
175
             <if test="releaseIdentity != null">
172
                 #{releaseIdentity,jdbcType=VARCHAR},
176
                 #{releaseIdentity,jdbcType=VARCHAR},
173
             </if>
177
             </if>
178
+            <if test="roomNoName != null">
179
+                #{roomNoName,jdbcType=VARCHAR}
180
+            </if>
174
         </trim>
181
         </trim>
175
     </insert>
182
     </insert>
176
     <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransaction">
183
     <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransaction">
215
             <if test="updateDate != null">
222
             <if test="updateDate != null">
216
                 update_date = #{updateDate,jdbcType=TIMESTAMP},
223
                 update_date = #{updateDate,jdbcType=TIMESTAMP},
217
             </if>
224
             </if>
225
+            <if test="roomNoName != null">
226
+                room_no_name = #{roomNoName,jdbcType=VARCHAR},
227
+            </if>
228
+
218
         </set>
229
         </set>
219
         where id = #{id,jdbcType=INTEGER}
230
         where id = #{id,jdbcType=INTEGER}
220
     </update>
231
     </update>
231
       create_user = #{createUser,jdbcType=INTEGER},
242
       create_user = #{createUser,jdbcType=INTEGER},
232
       create_date = #{createDate,jdbcType=TIMESTAMP},
243
       create_date = #{createDate,jdbcType=TIMESTAMP},
233
       update_user = #{updateUser,jdbcType=INTEGER},
244
       update_user = #{updateUser,jdbcType=INTEGER},
234
-      update_date = #{updateDate,jdbcType=TIMESTAMP}
245
+      update_date = #{updateDate,jdbcType=TIMESTAMP},
246
+      room_no_name = #{roomNoName,jdbcType=VARCHAR}
235
     where id = #{id,jdbcType=INTEGER}
247
     where id = #{id,jdbcType=INTEGER}
236
   </update>
248
   </update>
237
 
249
 

+ 15
- 8
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReplyMapper.xml 查看文件

13
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
13
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
14
     <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR" />
14
     <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR" />
15
     <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
15
     <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
16
-
16
+    <result column="room_no_name" property="roomNoName" jdbcType="INTEGER" />
17
   </resultMap>
17
   </resultMap>
18
   <sql id="Base_Column_List" >
18
   <sql id="Base_Column_List" >
19
     id, community_id, transaction_id, ta_user_id, ta_user_name, reply_content, reply_ta_user_id,ta_user_verify_id
19
     id, community_id, transaction_id, ta_user_id, ta_user_name, reply_content, reply_ta_user_id,ta_user_verify_id
20
-    reply_ta_user_name, create_date
20
+    reply_ta_user_name, create_date,room_no_name
21
   </sql>
21
   </sql>
22
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
22
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
23
     select 
23
     select 
32
   <insert id="insert" parameterType="com.community.huiju.model.TpTransactionReply" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
32
   <insert id="insert" parameterType="com.community.huiju.model.TpTransactionReply" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
33
     insert into tp_transaction_reply (id, community_id, transaction_id,ta_user_verify_id,release_identity,
33
     insert into tp_transaction_reply (id, community_id, transaction_id,ta_user_verify_id,release_identity,
34
       ta_user_id, ta_user_name, reply_content, 
34
       ta_user_id, ta_user_name, reply_content, 
35
-      reply_ta_user_id, reply_ta_user_name, create_date
35
+      reply_ta_user_id, reply_ta_user_name, create_date,room_no_name
36
       )
36
       )
37
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{transactionId,jdbcType=INTEGER},#{taUserVerifyId},#{releaseIdentity},
37
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{transactionId,jdbcType=INTEGER},#{taUserVerifyId},#{releaseIdentity},
38
       #{taUserId,jdbcType=INTEGER}, #{taUserName,jdbcType=VARCHAR}, #{replyContent,jdbcType=VARCHAR},
38
       #{taUserId,jdbcType=INTEGER}, #{taUserName,jdbcType=VARCHAR}, #{replyContent,jdbcType=VARCHAR},
39
-      #{replyTaUserId,jdbcType=INTEGER}, #{replyTaUserName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}
39
+      #{replyTaUserId,jdbcType=INTEGER}, #{replyTaUserName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP},#{roomNoName,jdbcType=VARCHAR}
40
       )
40
       )
41
   </insert>
41
   </insert>
42
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpTransactionReply" >
42
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpTransactionReply" >
73
         release_identity,
73
         release_identity,
74
       </if>
74
       </if>
75
       <if test="taUserVerifyId != null" >
75
       <if test="taUserVerifyId != null" >
76
-        ta_user_verify_id
76
+        ta_user_verify_id,
77
+      </if>
78
+      <if test="roomNoName != null" >
79
+        room_no_name
77
       </if>
80
       </if>
78
     </trim>
81
     </trim>
79
     <trim prefix="values (" suffix=")" suffixOverrides="," >
82
     <trim prefix="values (" suffix=")" suffixOverrides="," >
108
         #{releaseIdentity},
111
         #{releaseIdentity},
109
       </if>
112
       </if>
110
       <if test="taUserVerifyId != null" >
113
       <if test="taUserVerifyId != null" >
111
-        #{ taUserVerifyId}
114
+        #{taUserVerifyId},
115
+      </if>
116
+      <if test="roomNoName != null" >
117
+        #{roomNoName}
112
       </if>
118
       </if>
119
+
113
     </trim>
120
     </trim>
114
   </insert>
121
   </insert>
115
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransactionReply" >
122
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransactionReply" >
123
       </if>
130
       </if>
124
       <if test="taUserId != null" >
131
       <if test="taUserId != null" >
125
         ta_user_id = #{taUserId,jdbcType=INTEGER},
132
         ta_user_id = #{taUserId,jdbcType=INTEGER},
126
-      </if>
133
+      </if>``
127
       <if test="taUserName != null" >
134
       <if test="taUserName != null" >
128
         ta_user_name = #{taUserName,jdbcType=VARCHAR},
135
         ta_user_name = #{taUserName,jdbcType=VARCHAR},
129
       </if>
136
       </if>
156
   </update>
163
   </update>
157
   <select id="getCommunityIdAndTransactionId" resultMap="BaseResultMap">
164
   <select id="getCommunityIdAndTransactionId" resultMap="BaseResultMap">
158
     SELECT
165
     SELECT
159
-	tr.*, (SELECT r.description FROM ta_user_verify uv LEFT JOIN ta_sys_role r ON uv.role_id = r.id WHERE uv.id = tr.ta_user_verify_id) AS taRoleName,
166
+	tr.*, (SELECT r.description FROM ta_sys_role r  where r.id = tr.ta_user_verify_id) AS taRoleName,
160
 	      (SELECT tsr.role_name FROM ta_sys_user_role tsur LEFT JOIN ta_sys_role tsr ON tsur.role_id = tsr.id WHERE tsur.user_id = tr.reply_ta_user_id) AS replyRoleName
167
 	      (SELECT tsr.role_name FROM ta_sys_user_role tsur LEFT JOIN ta_sys_role tsr ON tsur.role_id = tsr.id WHERE tsur.user_id = tr.reply_ta_user_id) AS replyRoleName
161
     FROM
168
     FROM
162
         tp_transaction_reply tr
169
         tp_transaction_reply tr
165
     and tr.transaction_id=#{transactionId}
172
     and tr.transaction_id=#{transactionId}
166
       <if test="type != null and type != '' and type == 2" >
173
       <if test="type != null and type != '' and type == 2" >
167
         AND release_identity=1
174
         AND release_identity=1
168
       </if>
175
       </if>
169
       <if test="type != null and type != '' and type == 1" >
176
       <if test="type != null and type != '' and type == 1" >
170
         AND  tr.ta_user_id = #{founderUserID}
177
         AND  tr.ta_user_id = #{founderUserID}
171
       </if>
178
       </if>
172
       <if test="type != null and type != '' and type == 0" >
179
       <if test="type != null and type != '' and type == 0" >
173
         AND (tr.ta_user_id = #{founderUserID}) OR (tr.reply_ta_user_id = #{founderUserID})
180
         AND (tr.ta_user_id = #{founderUserID}) OR (tr.reply_ta_user_id = #{founderUserID})
174
       </if>
181
       </if>
175
    </select>
182
    </select>
176
    <select id="selectUserTransactionReply" resultMap="BaseResultMap">
183
    <select id="selectUserTransactionReply" resultMap="BaseResultMap">

+ 1
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingTreeServiceImpl.java 查看文件

351
 		 TpUnit tpUnit= new TpUnit();
351
 		 TpUnit tpUnit= new TpUnit();
352
 				tpUnit.setCommunityId(selectTpBuilding.getCommunityId())
352
 				tpUnit.setCommunityId(selectTpBuilding.getCommunityId())
353
 						.setPhaseId(selectTpBuilding.getPhaseId())
353
 						.setPhaseId(selectTpBuilding.getPhaseId())
354
+						.setPhaseName(selectTpBuilding.getPhaseName())
354
 						.setBuildingName(selectTpBuilding.getName())
355
 						.setBuildingName(selectTpBuilding.getName())
355
 						.setBuildingId(selectTpBuilding.getId())
356
 						.setBuildingId(selectTpBuilding.getId())
356
 						.setName(nodeNumber)
357
 						.setName(nodeNumber)