浏览代码

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

魏熙美 6 年前
父节点
当前提交
6a4a6d71f5

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

248
 
248
 
249
     @ApiOperation(value = "二手租赁详情", notes = "二手租赁详情")
249
     @ApiOperation(value = "二手租赁详情", notes = "二手租赁详情")
250
     @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
250
     @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
251
-            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动帖子id"),
251
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "帖子id"),
252
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")})
252
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")})
253
     @RequestMapping(value = "/getTransaction/{communityId}", method = RequestMethod.GET)
253
     @RequestMapping(value = "/getTransaction/{communityId}", method = RequestMethod.GET)
254
     public ResponseBean findUsedDetails(@PathVariable(value = "communityId") Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session) {
254
     public ResponseBean findUsedDetails(@PathVariable(value = "communityId") Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session) {
269
 
269
 
270
     @ApiOperation(value = "查询二手租赁回复", notes = "查询二手租赁回复")
270
     @ApiOperation(value = "查询二手租赁回复", notes = "查询二手租赁回复")
271
     @ApiImplicitParams({
271
     @ApiImplicitParams({
272
-            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "transactionId", value = "活动帖子id"),
272
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "transactionId", value = "帖子id"),
273
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "type", value = "0:和我相关,1:楼主,2:物业"),
273
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
274
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
274
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "pageNum", value = "第几页"),
275
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "pageNum", value = "第几页"),
275
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "pageSize", value = "一页多少行"),
276
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "pageSize", value = "一页多少行"),
278
     @RequestMapping(value = "/getTransactionReply", method = RequestMethod.GET)
279
     @RequestMapping(value = "/getTransactionReply", method = RequestMethod.GET)
279
     public ResponseBean findUsedDetailsReply(@RequestParam("transactionId") Integer transactionId,
280
     public ResponseBean findUsedDetailsReply(@RequestParam("transactionId") Integer transactionId,
280
                                              @RequestParam(value = "order", defaultValue = "asc") String order,
281
                                              @RequestParam(value = "order", defaultValue = "asc") String order,
282
+                                             @RequestParam(value = "type",required = false) Integer type,
281
                                              @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
283
                                              @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
282
                                              @RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize,
284
                                              @RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize,
283
                                              HttpSession session) {
285
                                              HttpSession session) {
289
             return responseBean;
291
             return responseBean;
290
         }
292
         }
291
 
293
 
292
-        responseBean = socialServiceI.findUsedDetailsReply(transactionId, userElement, order, pageNum, pageSize);
294
+        responseBean = socialServiceI.findUsedDetailsReply(transactionId, userElement, order, pageNum, pageSize,type);
293
         return responseBean;
295
         return responseBean;
294
     }
296
     }
295
 
297
 
321
 
323
 
322
     @ApiOperation(value = "添加二手租赁帖子", notes = "添加二手租赁帖子")
324
     @ApiOperation(value = "添加二手租赁帖子", notes = "添加二手租赁帖子")
323
     @ApiImplicitParams({
325
     @ApiImplicitParams({
324
-            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="title:小区标题, imageUrl:图片URL地址, content:小区内容, type:0二手,1求购,2租赁"),
326
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="title:小区标题, imageUrl:图片URL地址, content:小区内容, type:0议事大厅,1是邻里互助 ,2是二手/租赁,3其它话题"),
325
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
327
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
326
     })
328
     })
327
     @RequestMapping(value = "/addTransaction", method = RequestMethod.POST)
329
     @RequestMapping(value = "/addTransaction", method = RequestMethod.POST)
434
     @ApiOperation(value = "二手帖子对话", notes = "二手帖子对话")
436
     @ApiOperation(value = "二手帖子对话", notes = "二手帖子对话")
435
     @ApiImplicitParams({
437
     @ApiImplicitParams({
436
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =
438
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =
437
-                    "transactionId:当前帖子ID,replyContent:回复内容,replyTaUserId:被回复的用户ID"),
439
+                    "transactionId:当前帖子ID,replyContent:回复内容,replyTaUserId:被回复的用户ID,imgArr:可多张[]"),
438
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
440
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
439
     })
441
     })
440
     @RequestMapping(value = "/addTransactionReply", method = RequestMethod.POST)
442
     @RequestMapping(value = "/addTransactionReply", method = RequestMethod.POST)
490
     @ApiOperation(value = "签到扫码", notes = "签到扫码")
492
     @ApiOperation(value = "签到扫码", notes = "签到扫码")
491
     @ApiImplicitParams({
493
     @ApiImplicitParams({
492
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
494
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
493
-            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =
494
-                    "activityId:活动id"),
495
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value = "activityId:活动id"),
495
     })
496
     })
496
 
497
 
497
-    @RequestMapping(value = "/tpactivitysignin/add", method = RequestMethod.GET)
498
-    public ResponseBean  TpActivitySignInAdd(HttpSession session,@RequestBody String paramets) {
498
+    @RequestMapping(value = "/tpactivitysignin/add", method = RequestMethod.POST)
499
+    public ResponseBean  tpActivitySignInAdd(HttpSession session,@RequestBody String paramets) {
499
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
500
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
500
-        ResponseBean response = socialServiceI.TpActivitySignInAdd(paramets,userElement);
501
+        ResponseBean response = socialServiceI.tpActivitySignInAdd(paramets,userElement);
501
         return response;
502
         return response;
502
     }
503
     }
503
 
504
 
505
+    @ApiOperation(value = "回复对话", notes = "回复对话")
506
+    @ApiImplicitParams({
507
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =
508
+                    "transactionId:帖子ID,replyContent:回复内容,replyUserId:被回复的用户ID,imgArr:可多张[]"),
509
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
510
+    })
511
+    @RequestMapping(value = "/replyAdd", method = RequestMethod.POST)
512
+    public ResponseBean replyAdd(HttpSession session, @RequestBody String paramets) {
513
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
514
+        ResponseBean replyAdd = socialServiceI.replyAdd(paramets,userElement);
515
+        return replyAdd;
516
+    }
517
+
504
 }
518
 }

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TdImagesMapper.java 查看文件

44
      * @param type
44
      * @param type
45
      */
45
      */
46
     void deleteTdImages(@Param("uuid") Integer uuid, @Param("type") String type);
46
     void deleteTdImages(@Param("uuid") Integer uuid, @Param("type") String type);
47
+
48
+    /**
49
+     *
50
+     * @param uuid
51
+     * @param object
52
+     * @return
53
+     */
54
+    List<TdImages> selectImages(@Param("uuid") Integer uuid, @Param("object") String object);
47
 }
55
 }

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

21
     int updateByPrimaryKey(TpTransactionReply record);
21
     int updateByPrimaryKey(TpTransactionReply record);
22
 
22
 
23
     /**
23
     /**
24
-     * 根据 小区id 和 帖子id
24
+     * 当前帖子评论列表
25
      * @param communityId
25
      * @param communityId
26
      * @param transactionId
26
      * @param transactionId
27
+     * @param userID
28
+     * @param founderUserID
27
      * @return
29
      * @return
28
      */
30
      */
29
-    List<TpTransactionReply> getCommunityIdAndTransactionId(@Param("communityId") Integer communityId, @Param("transactionId") Integer transactionId);
31
+    List<TpTransactionReply> getCommunityIdAndTransactionId(@Param("communityId") Integer communityId, @Param("transactionId") Integer transactionId,@Param("userID") Integer userID,@Param("founderUserID") Integer founderUserID,@Param("type")Integer type);
30
 
32
 
31
     /**
33
     /**
32
      * 查询我回复别人的帖子
34
      * 查询我回复别人的帖子

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

1
 package com.community.huiju.model;
1
 package com.community.huiju.model;
2
 
2
 
3
 import java.util.Date;
3
 import java.util.Date;
4
+import java.util.List;
4
 
5
 
5
 public class TpTransactionReply {
6
 public class TpTransactionReply {
7
+
6
     private Integer id;
8
     private Integer id;
7
 
9
 
8
     private Integer communityId;
10
     private Integer communityId;
31
      */
33
      */
32
     private String replyRoleName;
34
     private String replyRoleName;
33
 
35
 
36
+    /**
37
+     * 回复的图片
38
+     * @return
39
+     */
40
+    private List<String> imgList;
41
+
42
+    /**
43
+     *0代表app端用户,1代表物业端用户
44
+     * @return
45
+     */
46
+    private String releaseIdentity;
47
+
48
+    public void setReleaseIdentity(String releaseIdentity) {
49
+        this.releaseIdentity = releaseIdentity;
50
+    }
51
+
52
+    public String getReleaseIdentity() {
53
+        return releaseIdentity;
54
+    }
55
+
56
+    public List<String> getImgList() {
57
+        return imgList;
58
+    }
59
+
60
+    public void setImgList(List<String> imgList) {
61
+        this.imgList = imgList;
62
+    }
63
+
34
     public Integer getId() {
64
     public Integer getId() {
35
         return id;
65
         return id;
36
     }
66
     }

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

178
 	 * @param pageSize
178
 	 * @param pageSize
179
 	 * @return
179
 	 * @return
180
 	 */
180
 	 */
181
-	ResponseBean findUsedDetailsReply(Integer transactionId, UserElement userElement, String order, Integer pageNum, Integer pageSize);
181
+	ResponseBean findUsedDetailsReply(Integer transactionId, UserElement userElement, String order, Integer pageNum, Integer pageSize,Integer type);
182
 	/**
182
 	/**
183
 	 * 二帖子回复
183
 	 * 二帖子回复
184
 	 *@param paramets
184
 	 *@param paramets
213
 	 * @param userElement
213
 	 * @param userElement
214
 	 * @return
214
 	 * @return
215
 	 */
215
 	 */
216
-    ResponseBean TpActivitySignInAdd(String paramets, UserElement userElement);
216
+    ResponseBean tpActivitySignInAdd(String paramets, UserElement userElement);
217
+
218
+	/**
219
+	 * 回复对话
220
+	 * @param paramets
221
+	 * @param userElement
222
+	 * @return
223
+	 */
224
+	ResponseBean replyAdd(String paramets, UserElement userElement);
217
 }
225
 }

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

1
 package com.community.huiju.service.impl;
1
 package com.community.huiju.service.impl;
2
 
2
 
3
+import com.alibaba.fastjson.JSONArray;
3
 import com.alibaba.fastjson.JSONObject;
4
 import com.alibaba.fastjson.JSONObject;
4
 import com.community.commom.constant.Constant;
5
 import com.community.commom.constant.Constant;
5
 import com.community.commom.mode.ResponseBean;
6
 import com.community.commom.mode.ResponseBean;
602
     @Override
603
     @Override
603
     public ResponseBean addTransactionReply(String paramets, UserElement userElement) {
604
     public ResponseBean addTransactionReply(String paramets, UserElement userElement) {
604
         ResponseBean response= new ResponseBean();
605
         ResponseBean response= new ResponseBean();
606
+        JSONObject object= JSONObject.parseObject(paramets);
607
+        JSONArray array= object.getJSONArray("imgArr");
608
+        String[]	reply= array.toArray(new String[]{});
609
+
605
         TpTransactionReply tpTransactionReply= JSONObject.parseObject(paramets,TpTransactionReply.class);
610
         TpTransactionReply tpTransactionReply= JSONObject.parseObject(paramets,TpTransactionReply.class);
606
         tpTransactionReply.setCommunityId(userElement.getCommunityId());
611
         tpTransactionReply.setCommunityId(userElement.getCommunityId());
607
         tpTransactionReply.setTaUserId(userElement.getId());
612
         tpTransactionReply.setTaUserId(userElement.getId());
613
         if(null!=tpTransactionReply.getReplyTaUserId()&!"".equals(tpTransactionReply.getReplyTaUserId())) {
618
         if(null!=tpTransactionReply.getReplyTaUserId()&!"".equals(tpTransactionReply.getReplyTaUserId())) {
614
             tpTransactionReply.setReplyTaUserName(taUserMapper.selectByPrimaryKey(tpTransactionReply.getReplyTaUserId()).getUserName());
619
             tpTransactionReply.setReplyTaUserName(taUserMapper.selectByPrimaryKey(tpTransactionReply.getReplyTaUserId()).getUserName());
615
         }
620
         }
621
+        tpTransactionReply.setReleaseIdentity("0");
616
         tpTransactionReply.setCreateDate(new Date());
622
         tpTransactionReply.setCreateDate(new Date());
617
         tpTransactionReplyMapper.insert(tpTransactionReply);
623
         tpTransactionReplyMapper.insert(tpTransactionReply);
624
+
625
+        for (String img:reply){
626
+            TdImages tdImages= new TdImages();
627
+            tdImages.setImageUrl(img);
628
+            tdImages.setType("reply");
629
+            tdImages.setUuid(tpTransactionReply.getId());
630
+            tdImages.setCreateTime(new Date());
631
+            tdImages.setCreateUser(userElement.getId());
632
+            tdImagesMapper.insert(tdImages);
633
+        }
618
         response.addSuccess("成功");
634
         response.addSuccess("成功");
619
         return response;
635
         return response;
620
     }
636
     }
663
     }
679
     }
664
 
680
 
665
     @Override
681
     @Override
666
-    public ResponseBean TpActivitySignInAdd(String paramets, UserElement userElement) {
682
+    public ResponseBean tpActivitySignInAdd(String paramets, UserElement userElement) {
667
         ResponseBean responseBean= new ResponseBean();
683
         ResponseBean responseBean= new ResponseBean();
668
         Integer activityId= JSONObject.parseObject(paramets).getInteger("activityId");
684
         Integer activityId= JSONObject.parseObject(paramets).getInteger("activityId");
669
         TpActivitySignIn tpActivitySignIn= new TpActivitySignIn();
685
         TpActivitySignIn tpActivitySignIn= new TpActivitySignIn();
670
-        tpActivitySignIn.setId(activityId);
686
+        tpActivitySignIn.setActivityId(activityId);
671
         tpActivitySignIn.setCommunityId(userElement.getCommunityId());
687
         tpActivitySignIn.setCommunityId(userElement.getCommunityId());
672
 
688
 
673
         TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
689
         TaUserVerify taUserVerify= taUserVerifyMapper.selectByPrimaryKey(userElement.getUserVerifyId());
676
         tpActivitySignIn.setUserRole(description);
692
         tpActivitySignIn.setUserRole(description);
677
         tpActivitySignIn.setUserName(userElement.getUserName());
693
         tpActivitySignIn.setUserName(userElement.getUserName());
678
         //期/栋/单/层/户
694
         //期/栋/单/层/户
679
-        String bu=taUserVerify.getPhaseName()+taUserVerify.getBuildingName()+taUserVerify.getUnitName()+taUserVerify.getLevelName()+taUserVerify.getRoomNoName();
695
+        String bu=taUserVerify.getPhaseName()+"期"+taUserVerify.getBuildingName()+"栋"+taUserVerify.getUnitName()+"单"+taUserVerify.getLevelName()+"层"+taUserVerify.getRoomNoName()+"户";
680
         tpActivitySignIn.setBuildingInfo(bu);
696
         tpActivitySignIn.setBuildingInfo(bu);
681
         tpActivitySignIn.setTaUserId(userElement.getId());
697
         tpActivitySignIn.setTaUserId(userElement.getId());
682
         tpActivitySignIn.setUserTel(userElement.getLoginName());
698
         tpActivitySignIn.setUserTel(userElement.getLoginName());
683
         tpActivitySignIn.setCreateDate(new Date());
699
         tpActivitySignIn.setCreateDate(new Date());
684
         tpActivitySignInMapper.insert(tpActivitySignIn);
700
         tpActivitySignInMapper.insert(tpActivitySignIn);
685
 
701
 
702
+        responseBean.addSuccess("成功");
686
 
703
 
687
-        return null;
704
+        return responseBean;
705
+    }
706
+
707
+    @Override
708
+    public ResponseBean replyAdd(String paramets, UserElement userElement) {
709
+        ResponseBean response= new ResponseBean();
710
+
711
+        JSONObject object= JSONObject.parseObject(paramets);
712
+        Integer transactionId= object.getInteger("transactionId");
713
+        String replyContent= object.getString("replyContent");
714
+        Integer replyUserId= object.getInteger("replyUserId");
715
+        String[] imgArr= object.getJSONArray("imgArr").toArray(new String[]{});
716
+
717
+        String userName= taUserMapper.selectByPrimaryKey(replyUserId).getUserName();
718
+      TpTransactionReply tpTransactionReply=  new TpTransactionReply();
719
+        tpTransactionReply.setCommunityId(userElement.getCommunityId());
720
+        tpTransactionReply.setTransactionId(transactionId);
721
+        tpTransactionReply.setTaUserId(userElement.getId());
722
+        tpTransactionReply.setTaUserName(userElement.getUserName());
723
+        tpTransactionReply.setReleaseIdentity("0");
724
+        tpTransactionReply.setReplyContent(replyContent);
725
+        tpTransactionReply.setReplyTaUserId(replyUserId);
726
+        tpTransactionReply.setReplyTaUserName(userName);
727
+        tpTransactionReply.setCreateDate(new Date());
728
+        response.addSuccess("成功");
729
+        tpTransactionReplyMapper.insert(tpTransactionReply);
730
+        //添加评论图片
731
+        for(String img:imgArr){
732
+            TdImages tdImages= new TdImages();
733
+            tdImages.setImageUrl(img);
734
+            tdImages.setType("reply");
735
+            tdImages.setUuid(tpTransactionReply.getId());
736
+            tdImages.setCreateTime(new Date());
737
+            tdImages.setCreateUser(userElement.getId());
738
+            tdImagesMapper.insert(tdImages);
739
+        }
740
+        return response;
688
     }
741
     }
689
 
742
 
690
 
743
 
886
     }
939
     }
887
 
940
 
888
     @Override
941
     @Override
889
-    public ResponseBean findUsedDetailsReply(Integer transactionId, UserElement userElement, String order, Integer pageNum, Integer pageSize) {
942
+    public ResponseBean findUsedDetailsReply(Integer transactionId, UserElement userElement, String order, Integer pageNum, Integer pageSize,Integer type) {
890
         ResponseBean responseBean = new ResponseBean();
943
         ResponseBean responseBean = new ResponseBean();
944
+        //拿到当前帖子的创建人
945
+        Integer CreateUser= tpTransactionMapper.getById(transactionId).getCreateUser();
891
 
946
 
892
         PageHelper.startPage(pageNum, pageSize, "create_date " + order);
947
         PageHelper.startPage(pageNum, pageSize, "create_date " + order);
893
-        List<TpTransactionReply> replies = tpTransactionReplyMapper.getCommunityIdAndTransactionId(userElement.getCommunityId(), transactionId);
948
+        List<TpTransactionReply> replies = tpTransactionReplyMapper.getCommunityIdAndTransactionId(userElement.getCommunityId(), transactionId,userElement.getUnitId(),CreateUser,type);
949
+        for (TpTransactionReply tpTransactionReply:replies){
950
+            List<TdImages> tdImagesList= tdImagesMapper.selectImages(tpTransactionReply.getId(),"reply");
951
+            List<String> list= new ArrayList<>();
952
+            for (TdImages imageUrl:tdImagesList){
953
+                list.add(imageUrl.getImageUrl());
954
+                tpTransactionReply.setImgList(list);
955
+            }
956
+
957
+
958
+        }
894
 
959
 
895
         responseBean.addSuccess(replies);
960
         responseBean.addSuccess(replies);
896
         return responseBean;
961
         return responseBean;

+ 9
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TdImagesMapper.xml 查看文件

135
     where uuid = #{uuid,jdbcType=INTEGER} and type = #{type,jdbcType=CHAR}
135
     where uuid = #{uuid,jdbcType=INTEGER} and type = #{type,jdbcType=CHAR}
136
   </delete>
136
   </delete>
137
 
137
 
138
+
139
+  <select id="selectImages" resultMap="BaseResultMap" >
140
+    SELECT
141
+    *
142
+    FROM
143
+    td_images
144
+    where uuid = #{uuid,jdbcType=INTEGER} and type = #{object,jdbcType=CHAR}
145
+  </select>
146
+
138
 </mapper>
147
 </mapper>

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

26
     delete from tp_transaction_reply
26
     delete from tp_transaction_reply
27
     where id = #{id,jdbcType=INTEGER}
27
     where id = #{id,jdbcType=INTEGER}
28
   </delete>
28
   </delete>
29
-  <insert id="insert" parameterType="com.community.huiju.model.TpTransactionReply" >
29
+  <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, 
30
     insert into tp_transaction_reply (id, community_id, transaction_id, 
31
       ta_user_id, ta_user_name, reply_content, 
31
       ta_user_id, ta_user_name, reply_content, 
32
       reply_ta_user_id, reply_ta_user_name, create_date
32
       reply_ta_user_id, reply_ta_user_name, create_date
140
     where id = #{id,jdbcType=INTEGER}
140
     where id = #{id,jdbcType=INTEGER}
141
   </update>
141
   </update>
142
   <select id="getCommunityIdAndTransactionId" resultMap="BaseResultMap">
142
   <select id="getCommunityIdAndTransactionId" resultMap="BaseResultMap">
143
-    select
144
-      tr.*,
145
-      (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,
146
-      (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
147
-    from tp_transaction_reply tr
148
-    where tr.community_id = #{communityId,jdbcType=INTEGER} and tr.transaction_id = #{transactionId,jdbcType=INTEGER}
149
-  </select>
143
+    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,
145
+	      (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
+    FROM
147
+        tp_transaction_reply tr
148
+    WHERE
149
+	tr.community_id = 45
150
+      <if test="type != null and type != '' and type == 2" >
151
+      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
+      </if>
153
+      <if test="type != null and type != '' and type == 1" >
154
+      AND (tr.ta_user_id =#{userID}) OR (tr.reply_ta_user_id = #{userID})
155
+      </if>
156
+      <if test="type != null and type != '' and type == 0" >
157
+      AND (tr.ta_user_id =#{founderUserID}) OR (tr.reply_ta_user_id = #{founderUserID})
158
+      </if>
159
+   </select>
150
    <select id="selectUserTransactionReply" resultMap="BaseResultMap">
160
    <select id="selectUserTransactionReply" resultMap="BaseResultMap">
151
      select
161
      select
152
      <include refid="Base_Column_List" />
162
      <include refid="Base_Column_List" />

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

212
 
212
 
213
             }
213
             }
214
                 // 发布时消息为无效
214
                 // 发布时消息为无效
215
-                if ("1".equals(tpActivity.getStatus())) {
216
-                    QueryWrapper<Message> queryWrapper = new QueryWrapper<>();
217
-                    queryWrapper.eq("community_id", userElement.getCommunityId());
218
-                    queryWrapper.eq("message_type", "8");
219
-                    queryWrapper.eq("model_type", "2");
220
-                    queryWrapper.eq("source", "2");
221
-                    queryWrapper.eq("status", "1");
222
-                    Message message = messageMapper.selectOne(queryWrapper);
223
-                    if (null != message) {
224
-                        message.setStatus("0");
225
-                        message.setUpdateDate(LocalDateTime.now());
226
-                        message.setUpdateUser(userElement.getId());
227
-                        messageMapper.updateById(message);
228
-                    }
229
-
230
-                }
215
+//                if ("1".equals(tpActivity.getStatus())) {
216
+//                    QueryWrapper<Message> queryWrapper = new QueryWrapper<>();
217
+//                    queryWrapper.eq("community_id", userElement.getCommunityId());
218
+//                    queryWrapper.eq("message_type", "8");
219
+//                    queryWrapper.eq("model_type", "2");
220
+//                    queryWrapper.eq("source", "2");
221
+//                    queryWrapper.eq("status", "1");
222
+//                    Message message = messageMapper.selectOne(queryWrapper);
223
+//                    if (null != message) {
224
+//                        message.setStatus("0");
225
+//                        message.setUpdateDate(LocalDateTime.now());
226
+//                        message.setUpdateUser(userElement.getId());
227
+//                        messageMapper.updateById(message);
228
+//                    }
229
+//
230
+//                }
231
                 // 扫码签到
231
                 // 扫码签到
232
 
232
 
233
                 if (radio==1){
233
                 if (radio==1){

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

313
 		 String replyContent= object.getString("replyContent");
313
 		 String replyContent= object.getString("replyContent");
314
 		 JSONArray array= object.getJSONArray("contentImg");
314
 		 JSONArray array= object.getJSONArray("contentImg");
315
 		// 根据此状态判断是回复帖子,还是回复人
315
 		// 根据此状态判断是回复帖子,还是回复人
316
-		Integer replyType= object.getInteger("replyType");
316
+		Integer replyType= object.getInteger("replyType")==null?0:1;
317
+
317
 		 // 查询帖子信息
318
 		 // 查询帖子信息
318
 		TpTransaction tpTransaction= tpTransactionMapper.selectById(id);
319
 		TpTransaction tpTransaction= tpTransactionMapper.selectById(id);
319
 		// 查询评论信息
320
 		// 查询评论信息

+ 1
- 0
VUECODE/smart-property-manage/src/views/social/transaction/reply/transactionreply.vue 查看文件

239
     },
239
     },
240
     // 取消
240
     // 取消
241
     TransactionReplyOff(){
241
     TransactionReplyOff(){
242
+       this.listQuery.replyContent = ''
242
        this.listQuery.dialogFormVisible = false
243
        this.listQuery.dialogFormVisible = false
243
        this.contentImgList = []
244
        this.contentImgList = []
244
        this.listQuery.contentImg = []
245
        this.listQuery.contentImg = []