Browse Source

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

魏熙美 6 years ago
parent
commit
e0de4e4275

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

@@ -431,7 +431,7 @@ public class SocialController extends BaseController {
431 431
     @ApiOperation(value = "二手帖子对话", notes = "二手帖子对话")
432 432
     @ApiImplicitParams({
433 433
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =
434
-                    "transactionId:当前帖子ID,replyContent:回复内容,replyTaUserId:被回复的用户ID,imgArr:可多张[]"),
434
+                    "transactionId:当前帖子ID,replyContent:回复内容,replyId:被回复的评论ID,imgArr:可多张[]"),
435 435
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
436 436
     })
437 437
     @RequestMapping(value = "/addTransactionReply", method = RequestMethod.POST)

+ 14
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransactionReply.java View File

@@ -87,7 +87,12 @@ public class TpTransactionReply {
87 87
     private String replyRoleName;
88 88
     
89 89
     private String createUserName;
90
-
90
+    
91
+    /**
92
+     * 被回复的评论ID
93
+     */
94
+    private Integer replyId;
95
+    
91 96
     /**
92 97
      * 回复的图片
93 98
      * @return
@@ -254,6 +259,14 @@ public class TpTransactionReply {
254 259
         return createUserName;
255 260
     }
256 261
     
262
+    public Integer getReplyId() {
263
+        return replyId;
264
+    }
265
+    
266
+    public void setReplyId(Integer replyId) {
267
+        this.replyId = replyId;
268
+    }
269
+    
257 270
     public void setCreateUserName(String createUserName) {
258 271
         this.createUserName = createUserName;
259 272
     }

+ 4
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java View File

@@ -572,12 +572,12 @@ public class SocialServiceImpl implements SocialServiceI {
572 572
         tpTransactionReply.setUuidName(userElement.getUserName());
573 573
 
574 574
             // 由于评论帖子和评论对话是同一个接口,当tpTransactionReply.getReplyTaUserId()为空时查询Ta_user里面的名字
575
-        TpTransaction tpTransaction= tpTransactionMapper.getById(tpTransactionReply.getTransactionId());
575
+        TpTransactionReply tpTransactionReplyBack = tpTransactionReplyMapper.selectByPrimaryKey(tpTransactionReply.getReplyId());
576 576
         
577 577
         //  评论帖子取 TpTransaction 的创建人,回复对话取传过来的值
578
-        tpTransactionReply.setReplyUuid(tpTransaction.getUuid());
579
-        tpTransactionReply.setReplyUuidType(tpTransaction.getUuidType());
580
-        tpTransactionReply.setReplyUuidName(tpTransaction.getUuidName());
578
+        tpTransactionReply.setReplyUuid(tpTransactionReplyBack.getUuid());
579
+        tpTransactionReply.setReplyUuidType(tpTransactionReplyBack.getUuidType());
580
+        tpTransactionReply.setReplyUuidName(tpTransactionReplyBack.getUuidName());
581 581
         tpTransactionReply.setReleaseIdentity("0");
582 582
         TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
583 583
         tpTransactionReply.setCreateDate(new Date());

+ 10
- 8
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java View File

@@ -1218,7 +1218,6 @@ public class TaUserServiceImpl implements ITaUserService {
1218 1218
     public ResponseBean addFeedback(UserElement userElement, String parameter) {
1219 1219
        ResponseBean response= new ResponseBean<>();
1220 1220
        TaFeedback taFeedback= JSONObject.parseObject(parameter,TaFeedback.class);
1221
-       String[] feedbackImgArr= JSONObject.parseObject(parameter).getJSONArray("feedbackImg").toArray(new String[]{});
1222 1221
 
1223 1222
         if (!AccountValidatorUtil.isPhone(taFeedback.getTaUserTel())) {
1224 1223
             response.addError("请输入正确的手机号!");
@@ -1232,13 +1231,16 @@ public class TaUserServiceImpl implements ITaUserService {
1232 1231
        taFeedback.setCreateDate(new Date());
1233 1232
        taFeedback.setCreateUser(userElement.getUserVerifyId());
1234 1233
        taFeedbackMapper.insert(taFeedback);
1235
-
1236
-       for (String imgUrl:feedbackImgArr){
1237
-           TaFeedbackImg taFeedbackImg = new TaFeedbackImg();
1238
-           taFeedbackImg.setImgUrl(imgUrl);
1239
-           taFeedbackImg.setCreateDate(new Date());
1240
-           taFeedbackImg.setFeedbackId(taFeedback.getId());
1241
-           taFeedbackImgMapper.insert(taFeedbackImg);
1234
+        JSONArray jSONArray= JSONObject.parseObject(parameter).getJSONArray("feedbackImg");
1235
+       if(null!=jSONArray) {
1236
+           String[] feedbackImgArr = jSONArray.toArray(new String[]{});
1237
+           for (String imgUrl : feedbackImgArr) {
1238
+               TaFeedbackImg taFeedbackImg = new TaFeedbackImg();
1239
+               taFeedbackImg.setImgUrl(imgUrl);
1240
+               taFeedbackImg.setCreateDate(new Date());
1241
+               taFeedbackImg.setFeedbackId(taFeedback.getId());
1242
+               taFeedbackImgMapper.insert(taFeedbackImg);
1243
+           }
1242 1244
        }
1243 1245
         response.addSuccess("成功");
1244 1246
         return response;

+ 3
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReplyMapper.xml View File

@@ -17,8 +17,9 @@
17 17
     <result column="room_no_name" property="roomNoName" jdbcType="INTEGER" />
18 18
   </resultMap>
19 19
   <sql id="Base_Column_List" >
20
-    id, community_id, transaction_id, ta_user_id, ta_user_name, reply_content, reply_ta_user_id,ta_user_verify_id
21
-    reply_ta_user_name, create_date,room_no_name
20
+    id, community_id, transaction_id,uuid,uuid_type,
21
+      uuid_name, reply_content,
22
+      reply_uuid, reply_uuid_type,reply_uuid_name, create_date,release_identity
22 23
   </sql>
23 24
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
24 25
     select