dingxin před 6 roky
rodič
revize
7430dee4f1

+ 1
- 0
.gitignore Zobrazit soubor

@@ -1 +1,2 @@
1 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 Zobrazit soubor

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

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionReplyMapper.java Zobrazit soubor

@@ -28,7 +28,7 @@ public interface TpTransactionReplyMapper {
28 28
      * @param founderUserID
29 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 Zobrazit soubor

@@ -34,7 +34,12 @@ public class TpTransaction {
34 34
     private String telephone;
35 35
 
36 36
     private List<String> imgList;
37
-    
37
+
38
+    /**
39
+     * 房间号
40
+     */
41
+    private  String roomNoName;
42
+
38 43
     /**
39 44
      * 是否被举报 1是被举报 0或null是没被举报
40 45
      */
@@ -261,4 +266,12 @@ public class TpTransaction {
261 266
     public void setSort(String sort) {
262 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 Zobrazit soubor

@@ -51,6 +51,16 @@ public class TpTransactionReply {
51 51
      */
52 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 64
     public void setTaUserVerifyId(Integer taUserVerifyId) {
55 65
         this.taUserVerifyId = taUserVerifyId;
56 66
     }

+ 10
- 7
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Zobrazit soubor

@@ -301,8 +301,7 @@ public class SocialServiceImpl implements SocialServiceI {
301 301
 
302 302
         tpTransactions.stream().forEach(e -> {
303 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 305
                 e.setRoleId(taSysRole.getId());
307 306
                 e.setRoleName(taSysRole.getRoleName());
308 307
             }
@@ -340,7 +339,9 @@ public class SocialServiceImpl implements SocialServiceI {
340 339
         tpTransaction.setCreateDate(new Date());
341 340
         tpTransaction.setUpdateUser(userElement.getId());
342 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 345
         tpTransaction.setIsReported("0");
345 346
         // 发布者身份  0 APP  1 物业
346 347
         tpTransaction.setReleaseIdentity("0");
@@ -574,7 +575,9 @@ public class SocialServiceImpl implements SocialServiceI {
574 575
         //  评论帖子取 TpTransaction 的创建人,回复对话取传过来的值
575 576
         tpTransactionReply.setReplyTaUserId(tpTransactionReply.getReplyTaUserId()==null?tpTransaction.getCreateUser():tpTransactionReply.getReplyTaUserId());
576 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 581
         tpTransactionReply.setCreateDate(new Date());
579 582
         tpTransactionReplyMapper.insert(tpTransactionReply);
580 583
 
@@ -904,7 +907,9 @@ public class SocialServiceImpl implements SocialServiceI {
904 907
         TpTransaction tpTransaction= tpTransactionMapper.getById(transactionId);
905 908
 
906 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 913
         for (TpTransactionReply tpTransactionReply : replies) {
909 914
             List<TdImages> tdImagesList = tdImagesMapper.selectImages(tpTransactionReply.getId(), "reply");
910 915
             List<String> list = new ArrayList<>();
@@ -912,8 +917,6 @@ public class SocialServiceImpl implements SocialServiceI {
912 917
                 list.add(imageUrl.getImageUrl());
913 918
                 tpTransactionReply.setImgList(list);
914 919
             }
915
-
916
-
917 920
         }
918 921
 
919 922
         responseBean.addSuccess(replies);

+ 17
- 5
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml Zobrazit soubor

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

+ 15
- 8
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReplyMapper.xml Zobrazit soubor

@@ -13,11 +13,11 @@
13 13
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
14 14
     <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR" />
15 15
     <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
16
-
16
+    <result column="room_no_name" property="roomNoName" jdbcType="INTEGER" />
17 17
   </resultMap>
18 18
   <sql id="Base_Column_List" >
19 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 21
   </sql>
22 22
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
23 23
     select 
@@ -32,11 +32,11 @@
32 32
   <insert id="insert" parameterType="com.community.huiju.model.TpTransactionReply" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
33 33
     insert into tp_transaction_reply (id, community_id, transaction_id,ta_user_verify_id,release_identity,
34 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 37
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{transactionId,jdbcType=INTEGER},#{taUserVerifyId},#{releaseIdentity},
38 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 41
   </insert>
42 42
   <insert id="insertSelective" parameterType="com.community.huiju.model.TpTransactionReply" >
@@ -73,7 +73,10 @@
73 73
         release_identity,
74 74
       </if>
75 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 80
       </if>
78 81
     </trim>
79 82
     <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -108,8 +111,12 @@
108 111
         #{releaseIdentity},
109 112
       </if>
110 113
       <if test="taUserVerifyId != null" >
111
-        #{ taUserVerifyId}
114
+        #{taUserVerifyId},
115
+      </if>
116
+      <if test="roomNoName != null" >
117
+        #{roomNoName}
112 118
       </if>
119
+
113 120
     </trim>
114 121
   </insert>
115 122
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransactionReply" >
@@ -123,7 +130,7 @@
123 130
       </if>
124 131
       <if test="taUserId != null" >
125 132
         ta_user_id = #{taUserId,jdbcType=INTEGER},
126
-      </if>
133
+      </if>``
127 134
       <if test="taUserName != null" >
128 135
         ta_user_name = #{taUserName,jdbcType=VARCHAR},
129 136
       </if>
@@ -156,7 +163,7 @@
156 163
   </update>
157 164
   <select id="getCommunityIdAndTransactionId" resultMap="BaseResultMap">
158 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 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 168
     FROM
162 169
         tp_transaction_reply tr
@@ -165,14 +172,12 @@
165 172
     and tr.transaction_id=#{transactionId}
166 173
       <if test="type != null and type != '' and type == 2" >
167 174
         AND release_identity=1
168 175
       </if>
169 176
       <if test="type != null and type != '' and type == 1" >
170 177
         AND  tr.ta_user_id = #{founderUserID}
171 178
       </if>
172 179
       <if test="type != null and type != '' and type == 0" >
173 180
         AND (tr.ta_user_id = #{founderUserID}) OR (tr.reply_ta_user_id = #{founderUserID})
174 181
       </if>
175 182
    </select>
176 183
    <select id="selectUserTransactionReply" resultMap="BaseResultMap">

+ 1
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingTreeServiceImpl.java Zobrazit soubor

@@ -351,6 +351,7 @@ public class BuildingTreeServiceImpl implements BuildingTreeServiceI {
351 351
 		 TpUnit tpUnit= new TpUnit();
352 352
 				tpUnit.setCommunityId(selectTpBuilding.getCommunityId())
353 353
 						.setPhaseId(selectTpBuilding.getPhaseId())
354
+						.setPhaseName(selectTpBuilding.getPhaseName())
354 355
 						.setBuildingName(selectTpBuilding.getName())
355 356
 						.setBuildingId(selectTpBuilding.getId())
356 357
 						.setName(nodeNumber)