Ver código fonte

Merge branch '2.0.0' of http://git.ycjcjy.com/fuxingfan/smartCommunity into 2.0.0

魏熙美 6 anos atrás
pai
commit
da57c0ecb5

+ 9
- 0
CODE/smart-community/app-api/pom.xml Ver arquivo

@@ -249,6 +249,15 @@
249 249
 					</execution>
250 250
 				</executions>
251 251
 			</plugin>
252
+
253
+			<plugin>
254
+				<groupId>org.apache.maven.plugins</groupId>
255
+				<artifactId>maven-surefire-plugin</artifactId>
256
+				<version>2.4.2</version>
257
+				<configuration>
258
+					<skipTests>true</skipTests>
259
+				</configuration>
260
+			</plugin>
252 261
 		</plugins>
253 262
 	</build>
254 263
 

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Ver arquivo

@@ -333,7 +333,7 @@ public class SocialController extends BaseController {
333 333
         ResponseBean responseBean = new ResponseBean();
334 334
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
335 335
         Integer userId = userElement.getId();
336
-        ResponseBean response = socialServiceI.addAllTransaction(userId, paramets);
336
+        ResponseBean response = socialServiceI.addAllTransaction(userId, paramets,userElement.getUserVerifyId());
337 337
         return response;
338 338
     }
339 339
     

+ 25
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransaction.java Ver arquivo

@@ -53,11 +53,36 @@ public class TpTransaction {
53 53
      */
54 54
     private Integer noLikeCount;
55 55
 
56
+    /**
57
+     * 对应app端的角色表,物业端发帖时不维护
58
+     */
59
+    private Integer taUserVerifyId;
60
+
61
+    /**
62
+     * 0为app端,1为物业
63
+     */
64
+    private String releaseIdentity;
65
+
66
+    public void setReleaseIdentity(String releaseIdentity) {
67
+        this.releaseIdentity = releaseIdentity;
68
+    }
69
+
70
+    public String getReleaseIdentity() {
71
+        return releaseIdentity;
72
+    }
73
+
56 74
     /**
57 75
      * 是否已点赞或者踩
58 76
      */
59 77
     private String bel;
60 78
 
79
+    public Integer getTaUserVerifyId() {
80
+        return taUserVerifyId;
81
+    }
82
+
83
+    public void setTaUserVerifyId(Integer taUserVerifyId) {
84
+        this.taUserVerifyId = taUserVerifyId;
85
+    }
61 86
 
62 87
     public String getRoleName() {
63 88
         return roleName;

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransactionReply.java Ver arquivo

@@ -45,6 +45,20 @@ public class TpTransactionReply {
45 45
      */
46 46
     private String releaseIdentity;
47 47
 
48
+    /**
49
+     * 用于查询app端角色,物业端不维护
50
+     * @param releaseIdentity
51
+     */
52
+    private  Integer taUserVerifyId;
53
+
54
+    public void setTaUserVerifyId(Integer taUserVerifyId) {
55
+        this.taUserVerifyId = taUserVerifyId;
56
+    }
57
+
58
+    public Integer getTaUserVerifyId() {
59
+        return taUserVerifyId;
60
+    }
61
+
48 62
     public void setReleaseIdentity(String releaseIdentity) {
49 63
         this.releaseIdentity = releaseIdentity;
50 64
     }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java Ver arquivo

@@ -108,7 +108,7 @@ public interface SocialServiceI {
108 108
 	/**
109 109
 	 * 添加二手租赁帖子
110 110
 	 */
111
-    ResponseBean addAllTransaction(Integer userId, String paramets)throws IOException;
111
+    ResponseBean addAllTransaction(Integer userId, String paramets, Integer userVerifyId)throws IOException;
112 112
 
113 113
 
114 114
 	/**

+ 9
- 6
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Ver arquivo

@@ -316,11 +316,12 @@ public class SocialServiceImpl implements SocialServiceI {
316 316
         List<TpTransaction> tpTransactions= tpTransactionMapper.findAllTransaction(communityId, transactionTitle,type);
317 317
 
318 318
         tpTransactions.stream().forEach(e->{
319
-            // 角色
320
-//            taUserVerifyMapper.selectByPrimaryKey()
321
-            TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(e.getTaUserId());
322
-            e.setRoleId(taSysRole.getId());
323
-            e.setRoleName(taSysRole.getRoleName());
319
+
320
+            if (null != e.getTaUserVerifyId()){
321
+                TaSysRole taSysRole = taSysRoleMapper.findRoleByUserId(e.getTaUserVerifyId());
322
+                e.setRoleId(taSysRole.getId());
323
+                e.setRoleName(taSysRole.getRoleName());
324
+            }
324 325
             TaUser taUser = taUserMapper.selectByPrimaryKey(e.getTaUserId());
325 326
             e.setCreateUserName(taUser.getUserName());
326 327
         });
@@ -335,7 +336,7 @@ public class SocialServiceImpl implements SocialServiceI {
335 336
 
336 337
     @Transactional
337 338
     @Override
338
-    public ResponseBean addAllTransaction(Integer userId, String paramets) throws IOException {
339
+    public ResponseBean addAllTransaction(Integer userId, String paramets,Integer userVerifyId) throws IOException {
339 340
         ResponseBean response = new ResponseBean();
340 341
         JSONObject jsonObject = JSONObject.parseObject(paramets);
341 342
         String transactionTitle = (String) jsonObject.get("title");
@@ -355,6 +356,7 @@ public class SocialServiceImpl implements SocialServiceI {
355 356
         tpTransaction.setCreateDate(new Date());
356 357
         tpTransaction.setUpdateUser(userId);
357 358
         tpTransaction.setUpdateDate(new Date());
359
+        tpTransaction.setTaUserVerifyId(userVerifyId);
358 360
         tpTransaction.setIsReported("0");
359 361
 
360 362
         //判断身份是否为业主且状态为已停用
@@ -625,6 +627,7 @@ public class SocialServiceImpl implements SocialServiceI {
625 627
             tpTransactionReply.setReplyTaUserName(taUserMapper.selectByPrimaryKey(tpTransactionReply.getReplyTaUserId()).getUserName());
626 628
         }
627 629
         tpTransactionReply.setReleaseIdentity("0");
630
+        tpTransactionReply.setTaUserVerifyId(userElement.getUserVerifyId());
628 631
         tpTransactionReply.setCreateDate(new Date());
629 632
         tpTransactionReplyMapper.insert(tpTransactionReply);
630 633
 

+ 23
- 4
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml Ver arquivo

@@ -16,10 +16,13 @@
16 16
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
17 17
     <result column="role_id" property="roleId" jdbcType="INTEGER" />
18 18
     <result column="role_name" property="roleName" jdbcType="VARCHAR" />
19
+    <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
20
+    <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR" />
21
+
19 22
   </resultMap>
20 23
   <sql id="Base_Column_List" >
21 24
     id, community_id, ta_user_id, transaction_title, transaction_content,
22
-    view_count, status, type, create_user, create_date, update_user, update_date
25
+    view_count, status, type, create_user, create_date, update_user, update_date, ta_user_verify_id, release_identity
23 26
   </sql>
24 27
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpTransaction"  >
25 28
     SELECT
@@ -36,7 +39,9 @@
36 39
 	ttr.update_user,
37 40
 	ttr.update_date,
38 41
 	sr.id AS role_id,
39
-	sr.role_name AS role_name
42
+	sr.role_name AS role_name,
43
+	ttr.release_identity,
44
+	ttr.ta_user_verify_id
40 45
 FROM
41 46
 	tp_transaction ttr
42 47
 LEFT JOIN ta_sys_user_role tsur ON ttr.ta_user_id = tsur.user_id
@@ -48,12 +53,14 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
48 53
     where id = #{id,jdbcType=INTEGER}
49 54
   </delete>
50 55
   <insert id="insert" parameterType="com.community.huiju.model.TpTransaction" >
51
-    insert into tp_transaction (id, community_id, ta_user_id, 
56
+    insert into tp_transaction (id, community_id,release_identity,
57
+      ta_user_verify_id,
58
+      ta_user_id,
52 59
       transaction_title, transaction_content,
53 60
       view_count, status,
54 61
       type, create_user, create_date, 
55 62
       update_user, update_date)
56
-    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER}, 
63
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},#{releaseIdentity,jdbcType=VARCHAR},#{taUserVerifyId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER},
57 64
       #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR},
58 65
        #{viewCount,jdbcType=INTEGER}, #{status,jdbcType=CHAR},
59 66
       #{type,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
@@ -101,6 +108,12 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
101 108
       <if test="updateDate != null" >
102 109
         update_date,
103 110
       </if>
111
+      <if test="taUserVerifyId != null" >
112
+        ta_user_verify_id,
113
+      </if>
114
+      <if test="releaseIdentity != null" >
115
+        release_identity
116
+      </if>
104 117
     </trim>
105 118
     <trim prefix="values (" suffix=")" suffixOverrides="," >
106 119
       <if test="id != null" >
@@ -142,6 +155,12 @@ LEFT JOIN ta_sys_role sr ON sr.id = tsur.role_id
142 155
       <if test="updateDate != null" >
143 156
         #{updateDate,jdbcType=TIMESTAMP},
144 157
       </if>
158
+      <if test="taUserVerifyId != null" >
159
+        #{taUserVerifyId,jdbcType=INTEGER},
160
+      </if>
161
+      <if test="releaseIdentity != null" >
162
+        #{releaseIdentity,jdbcType=VARCHAR},
163
+      </if>
145 164
     </trim>
146 165
   </insert>
147 166
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransaction" >

+ 21
- 6
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReplyMapper.xml Ver arquivo

@@ -11,9 +11,12 @@
11 11
     <result column="reply_ta_user_id" property="replyTaUserId" jdbcType="INTEGER" />
12 12
     <result column="reply_ta_user_name" property="replyTaUserName" jdbcType="VARCHAR" />
13 13
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
14
+    <result column="release_identity" property="releaseIdentity" jdbcType="VARCHAR" />
15
+    <result column="ta_user_verify_id" property="taUserVerifyId" jdbcType="INTEGER" />
16
+
14 17
   </resultMap>
15 18
   <sql id="Base_Column_List" >
16
-    id, community_id, transaction_id, ta_user_id, ta_user_name, reply_content, reply_ta_user_id, 
19
+    id, community_id, transaction_id, ta_user_id, ta_user_name, reply_content, reply_ta_user_id,ta_user_verify_id
17 20
     reply_ta_user_name, create_date
18 21
   </sql>
19 22
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -27,12 +30,12 @@
27 30
     where id = #{id,jdbcType=INTEGER}
28 31
   </delete>
29 32
   <insert id="insert" parameterType="com.community.huiju.model.TpTransactionReply" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
30
-    insert into tp_transaction_reply (id, community_id, transaction_id, 
33
+    insert into tp_transaction_reply (id, community_id, transaction_id,ta_user_verify_id,release_identity,
31 34
       ta_user_id, ta_user_name, reply_content, 
32 35
       reply_ta_user_id, reply_ta_user_name, create_date
33 36
       )
34
-    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{transactionId,jdbcType=INTEGER}, 
35
-      #{taUserId,jdbcType=INTEGER}, #{taUserName,jdbcType=VARCHAR}, #{replyContent,jdbcType=VARCHAR}, 
37
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{transactionId,jdbcType=INTEGER},#{taUserVerifyId},#{releaseIdentity},
38
+      #{taUserId,jdbcType=INTEGER}, #{taUserName,jdbcType=VARCHAR}, #{replyContent,jdbcType=VARCHAR},
36 39
       #{replyTaUserId,jdbcType=INTEGER}, #{replyTaUserName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}
37 40
       )
38 41
   </insert>
@@ -66,6 +69,12 @@
66 69
       <if test="createDate != null" >
67 70
         create_date,
68 71
       </if>
72
+      <if test="releaseIdentity != null" >
73
+        release_identity,
74
+      </if>
75
+      <if test="taUserVerifyId != null" >
76
+        ta_user_verify_id
77
+      </if>
69 78
     </trim>
70 79
     <trim prefix="values (" suffix=")" suffixOverrides="," >
71 80
       <if test="id != null" >
@@ -95,6 +104,12 @@
95 104
       <if test="createDate != null" >
96 105
         #{createDate,jdbcType=TIMESTAMP},
97 106
       </if>
107
+      <if test="releaseIdentity != null" >
108
+        #{releaseIdentity},
109
+      </if>
110
+      <if test="taUserVerifyId != null" >
111
+        #{ taUserVerifyId}
112
+      </if>
98 113
     </trim>
99 114
   </insert>
100 115
   <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransactionReply" >
@@ -141,12 +156,12 @@
141 156
   </update>
142 157
   <select id="getCommunityIdAndTransactionId" resultMap="BaseResultMap">
143 158
     SELECT
144
-	tr.*, (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.ta_user_id) AS taRoleName,
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,
145 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
146 161
     FROM
147 162
         tp_transaction_reply tr
148 163
     WHERE
149
-	tr.community_id = 45
164
+	tr.community_id = #{communityId}
150 165
       <if test="type != null and type != '' and type == 2" >
151 166
       AND (tr.reply_ta_user_id = (SELECT r.id from tp_user r WHERE tr.ta_user_id = r.id )) OR (ta_user_id = (SELECT r.id from tp_user r WHERE tr.ta_user_id = r.id ))
152 167
       </if>

+ 1
- 0
CODE/smart-community/community-common/pom.xml Ver arquivo

@@ -124,5 +124,6 @@
124 124
             <version>2.6</version>
125 125
         </dependency>
126 126
 
127
+
127 128
     </dependencies>
128 129
 </project>

+ 3
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java Ver arquivo

@@ -312,7 +312,7 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
312 312
 		 Integer id= object.getInteger("id");
313 313
 		 String replyContent= object.getString("replyContent");
314 314
 		 JSONArray array= object.getJSONArray("contentImg");
315
-		// 根据此状态判断是回复帖子,还是回复人
315
+		// 根据此状态判断是回复帖子,还是回复人(共用一个接口)
316 316
 		Integer replyType= object.getInteger("replyType")==null?0:1;
317 317
 
318 318
 		 // 查询帖子信息
@@ -328,6 +328,7 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
328 328
 					.setTaUserName(userElement.getUserName())
329 329
 					.setReplyContent(replyContent)
330 330
 					.setReplyTaUserId(tpTransaction.getCreateUser())
331
+					.setReleaseIdentity("1")
331 332
 					.setReplyTaUserName(taUserMapper.selectById(tpTransaction.getTaUserId()).getUserName())
332 333
 					.setCreateDate(LocalDateTime.now());
333 334
 		}
@@ -338,6 +339,7 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
338 339
 					.setTaUserName(userElement.getUserName())
339 340
 					.setReplyContent(replyContent)
340 341
 					.setReplyTaUserId(Reply.getTaUserId())
342
+					.setReleaseIdentity("1")
341 343
 					.setReplyTaUserName(Reply.getTaUserName())
342 344
 					.setCreateDate(LocalDateTime.now());
343 345
 		}