Browse Source

app的物业管理功能

dingxin 6 years ago
parent
commit
7b95baf24e
30 changed files with 1505 additions and 23 deletions
  1. 0
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpRentalHouseController.java
  2. 31
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpShopController.java
  3. 116
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpTicketAndTransactionController.java
  4. 2
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TdImagesMapper.java
  5. 45
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpShopAppraisalMapper.java
  6. 35
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpShopAppraisalReplayMapper.java
  7. 16
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java
  8. 3
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordCommentMapper.java
  9. 10
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordMapper.java
  10. 10
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java
  11. 23
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionReportMapper.java
  12. 25
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpUserMapper.java
  13. 138
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpShopAppraisal.java
  14. 95
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpShopAppraisalReplay.java
  15. 13
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecord.java
  16. 42
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransaction.java
  17. 13
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransactionReport.java
  18. 56
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java
  19. 15
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TpShopServicel.java
  20. 227
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java
  21. 54
    11
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpShopServicelmpl.java
  22. 40
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketVO.java
  23. 189
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpShopAppraisalMapper.xml
  24. 145
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpShopAppraisalReplayMapper.xml
  25. 51
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml
  26. 4
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordCommentMapper.xml
  27. 13
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml
  28. 40
    3
      CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml
  29. 26
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReportMapper.xml
  30. 28
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpUserMapper.xml

+ 0
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpRentalHouseController.java View File

@@ -76,7 +76,4 @@ public class TpRentalHouseController extends BaseController{
76 76
         return responseBean;
77 77
     }
78 78
 
79
-
80
-
81
-
82 79
 }

+ 31
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpShopController.java View File

@@ -73,6 +73,37 @@ public class TpShopController extends BaseController{
73 73
         return responseBean;
74 74
     }
75 75
 
76
+    @ApiOperation(value = "线下商铺评论列表", notes = "线下商铺评论列表")
77
+    @ApiImplicitParams({
78
+            @ApiImplicitParam(paramType = "path", dataType = "integer", name = "shopID", value ="shopID:商铺ID"),
79
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
80
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
81
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")
82
+    })
83
+    @RequestMapping(value = "/shopEvaluate/{shopID}", method = RequestMethod.GET)
84
+    @ResponseBody
85
+    public ResponseBean shopEvaluate(HttpSession session,
86
+                                     @PathVariable("shopID") Integer shopID,
87
+                                     @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
88
+                                     @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize){
89
+        UserElement userElement = getUserElement(session);
90
+        ResponseBean responseBean = new ResponseBean();
91
+        ResponseBean response = tpShopServicel.shopEvaluate(shopID,userElement,pageNum,pageSize);
92
+        return response;
93
+    }
94
+
95
+    @ApiOperation(value = "线下商铺评论", notes = "线下商铺评论")
96
+    @ApiImplicitParams({
97
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="shopID:商铺ID,score:评分0-5,content:评价内容"),
98
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
99
+    })
100
+    @RequestMapping(value = "/shopEvaluateAdd", method = RequestMethod.POST)
101
+    @ResponseBody
102
+    public ResponseBean shopEvaluateAdd(@RequestBody String paramets,HttpSession session){
103
+        UserElement userElement = getUserElement(session);
104
+        ResponseBean response = tpShopServicel.shopEvaluateAdd(paramets,userElement);
105
+        return response;
106
+    }
76 107
 
77 108
 
78 109
 }

+ 116
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TpTicketAndTransactionController.java View File

@@ -0,0 +1,116 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import com.community.commom.mode.ResponseBean;
5
+import com.community.commom.session.UserElement;
6
+import com.community.huiju.dao.TpTransactionMapper;
7
+import com.community.huiju.model.TpTransaction;
8
+import com.community.huiju.service.SocialServiceI;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiImplicitParam;
11
+import io.swagger.annotations.ApiImplicitParams;
12
+import io.swagger.annotations.ApiOperation;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.cloud.context.config.annotation.RefreshScope;
15
+import org.springframework.web.bind.annotation.*;
16
+
17
+import javax.servlet.http.HttpSession;
18
+
19
+@RestController
20
+@RefreshScope
21
+@RequestMapping("/")
22
+@Api(value = "物业端的帖子和工单", description = "物业端的帖子和工单")
23
+public class TpTicketAndTransactionController {
24
+    @Autowired
25
+    private SocialServiceI socialServiceI;
26
+
27
+    @ApiOperation(value = "app端话题管理", notes = "app端话题管理")
28
+    @ApiImplicitParams({
29
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "loginName",value = "电话号码"),
30
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "status",value = "1:被举报话题,2:未读话题,3:已读话题"),
31
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "transactionTitle",value = "话题搜索"),
32
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "communityId",value = "小区"),
33
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum",value = "第几页"),
34
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize",value = "一页多少数据"),
35
+    })
36
+    @RequestMapping(value = "/transactionsManageList/{loginName}",method = RequestMethod.GET)
37
+    public ResponseBean tpTransactionManageList(@PathVariable(value = "loginName") String loginName,
38
+                                   @RequestParam(value = "status") Integer status,
39
+                                   @RequestParam(value = "transactionTitle", required = false) String transactionTitle,
40
+                                   @RequestParam(value = "communityId", required = false) Integer communityId,
41
+                                   @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
42
+                                   @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
43
+       ResponseBean tpTransactionManageList= socialServiceI.tpTransactionManageList(loginName,status,pageNum,pageSize,transactionTitle,communityId);
44
+       return tpTransactionManageList;
45
+    }
46
+
47
+    @ApiOperation(value = "app端话题管理批量作废话题",nickname ="app端话题管理批量作废话题")
48
+    @ApiImplicitParams({
49
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id(多个),loginName:电话号码,communityId:小区")})
50
+    @RequestMapping(value="/transactions/delete",method = RequestMethod.POST)
51
+    public ResponseBean transactionsDelete(@RequestBody String paramets){
52
+        ResponseBean  transactionsUpdata= socialServiceI.transactionsDelete(paramets);
53
+        return transactionsUpdata;
54
+    }
55
+
56
+    @ApiOperation(value = "app端话题管理清除不实举报",nickname ="app端话题管理清除不实举报")
57
+    @ApiImplicitParams({
58
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id(多个),loginName:电话号码,communityId:小区")})
59
+    @RequestMapping(value="/tpTransactionReport/delete",method = RequestMethod.POST)
60
+    public ResponseBean tpTransactionReportDelete(@RequestBody String paramets){
61
+        ResponseBean  transactionsUpdata= socialServiceI.tpTransactionReportDelete(paramets);
62
+        return transactionsUpdata;
63
+    }
64
+
65
+    @ApiOperation(value = "app端话题管理添加话题",nickname ="app端话题管理添加话题")
66
+    @ApiImplicitParams({
67
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="loginName:电话,communityId:小区ID,transactionTitle:话题标题," +
68
+                    "type:0 代表 二手(卖二手物品)  1 是代表 求购 (买二手物品) 2 是代表 租赁(租二手物品)3其他话题,contentImg:图片,sort:权重值,status:'0 是已作废 1 是已发布  2 是草稿 ")})
69
+    @RequestMapping(value="/transactions/add",method = RequestMethod.POST)
70
+    public ResponseBean transactionsAdd(@RequestBody String paramets){
71
+        ResponseBean  addAnnouncement= socialServiceI.transactionsAdd(paramets);
72
+        return addAnnouncement;
73
+    }
74
+
75
+    @ApiOperation(value = "app端话题管理批量已读话题",nickname ="app端话题管理批量已读话题")
76
+    @ApiImplicitParams({
77
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id(多个),loginName:电话号码,communityId:小区")})
78
+    @RequestMapping(value="/transactions/read",method = RequestMethod.POST)
79
+    public ResponseBean transactionsRead(@RequestBody String paramets){
80
+        ResponseBean  transactionsUpdata= socialServiceI.transactionsRead(paramets);
81
+        return transactionsUpdata;
82
+    }
83
+
84
+    @ApiOperation(value = "app端工单管理列表", notes = "app端工单管理列表")
85
+    @ApiImplicitParams({
86
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "loginName",value = "电话号码"),
87
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "status",value = "0:待分配,3正在处理,9:其他状态"),
88
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "communityId",value = "小区"),
89
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum",value = "第几页"),
90
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize",value = "一页多少数据"),
91
+    })
92
+    @RequestMapping(value = "/tpTicketManageList/{loginName}",method = RequestMethod.GET)
93
+    public ResponseBean tpTicketManageList(@PathVariable(value = "loginName") String loginName,
94
+                                                @RequestParam(value = "status") Integer status,
95
+                                                @RequestParam(value = "communityId") Integer communityId,
96
+                                                @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
97
+                                                @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
98
+        ResponseBean tpTicketManageList= socialServiceI.tpTicketManageList(loginName,status,pageNum,pageSize,communityId);
99
+        return tpTicketManageList;
100
+    }
101
+
102
+    @ApiOperation(value = "app端工单管理详情", notes = "app端工单管理列表详情")
103
+    @ApiImplicitParams({
104
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "tickedID",value = "工单ID"),
105
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "loginName",value = "电话号码"),
106
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "communityId",value = "小区")
107
+    })
108
+    @RequestMapping(value = "/tpTicketManage/{tickedID}",method = RequestMethod.GET)
109
+    public ResponseBean tpTicketManageDetails(@PathVariable(value = "tickedID") Integer tickedID,
110
+                                              @RequestParam(value = "communityId") Integer communityId,
111
+                                              @RequestParam(value = "loginName") String loginName) {
112
+        ResponseBean tpTicketManageDetails= socialServiceI.tpTicketManageDetails(tickedID,communityId,loginName);
113
+        return tpTicketManageDetails;
114
+    }
115
+
116
+}

+ 2
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TdImagesMapper.java View File

@@ -46,10 +46,11 @@ public interface TdImagesMapper {
46 46
     void deleteTdImages(@Param("uuid") Integer uuid, @Param("type") String type);
47 47
 
48 48
     /**
49
-     *
49
+     *查询图片
50 50
      * @param uuid
51 51
      * @param object
52 52
      * @return
53 53
      */
54 54
     List<TdImages> selectImages(@Param("uuid") Integer uuid, @Param("object") String object);
55
+
55 56
 }

+ 45
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpShopAppraisalMapper.java View File

@@ -0,0 +1,45 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpShopAppraisal;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
8
+
9
+/**
10
+ * version V1.0
11
+ * class_name: $METHOD_NAME$
12
+ * param: $METHOD_PARAM$
13
+ * describe: TODO
14
+ * creat_user:fannaixi
15
+ * creat_time: 2019/7/2
16
+ **/
17
+@Mapper
18
+public interface TpShopAppraisalMapper {
19
+    int deleteByPrimaryKey(Integer id);
20
+
21
+    int insert(TpShopAppraisal record);
22
+
23
+    int insertSelective(TpShopAppraisal record);
24
+
25
+    TpShopAppraisal selectByPrimaryKey(Integer id);
26
+
27
+    int updateByPrimaryKeySelective(TpShopAppraisal record);
28
+
29
+    int updateByPrimaryKey(TpShopAppraisal record);
30
+
31
+    /**
32
+     * 查询当前业主评论信息
33
+     * @param shopID
34
+     * @return
35
+     */
36
+    List<TpShopAppraisal> shopEvaluateList(@Param("shopID") Integer shopID, @Param("communityId") Integer communityId);
37
+
38
+    /**
39
+     * 统计业主评论总数
40
+     * @param shopID
41
+     * @param communityId
42
+     * @return
43
+     */
44
+    int evaluateCount(@Param("shopID") Integer shopID, @Param("communityId") Integer communityId);
45
+}

+ 35
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpShopAppraisalReplayMapper.java View File

@@ -0,0 +1,35 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpShopAppraisalReplay;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+/**
7
+ * version V1.0
8
+ * class_name: $METHOD_NAME$
9
+ * param: $METHOD_PARAM$
10
+ * describe: TODO
11
+ * creat_user:fannaixi
12
+ * creat_time: 2019/7/2
13
+ **/
14
+@Mapper
15
+public interface TpShopAppraisalReplayMapper {
16
+    int deleteByPrimaryKey(Integer id);
17
+
18
+    int insert(TpShopAppraisalReplay record);
19
+
20
+    int insertSelective(TpShopAppraisalReplay record);
21
+
22
+    TpShopAppraisalReplay selectByPrimaryKey(Integer id);
23
+
24
+    int updateByPrimaryKeySelective(TpShopAppraisalReplay record);
25
+
26
+    int updateByPrimaryKey(TpShopAppraisalReplay record);
27
+
28
+    /**
29
+     * 查询当前商家回复有且只有一条
30
+     * @param id
31
+     * @param communityId
32
+     * @return
33
+     */
34
+    TpShopAppraisalReplay selectShopAppraisalReplay(Integer id, Integer communityId);
35
+}

+ 16
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java View File

@@ -1,6 +1,7 @@
1 1
 package com.community.huiju.dao;
2 2
 
3 3
 import com.community.huiju.model.TpTicket;
4
+import com.community.huiju.vo.TpTicketVO;
4 5
 import org.apache.ibatis.annotations.Mapper;
5 6
 import org.apache.ibatis.annotations.Param;
6 7
 
@@ -49,4 +50,19 @@ public interface TpTicketMapper {
49 50
     Integer selectRecordStatus(@Param("communityId") Integer communityId, @Param("ticketId")Integer ticketId);
50 51
 
51 52
     TpTicket selectTpTicketName(@Param("communityId")Integer communityId, @Param("type")String type, @Param("ticketTitle")String ticketTitle);
53
+
54
+    /**
55
+     * app端工单管理列表
56
+     * @param status
57
+     * @param communityId
58
+     * @return
59
+     */
60
+    List<TpTicket> ticketList(@Param("status") Integer status, @Param("communityId") Integer communityId);
61
+
62
+    /**
63
+     * 查询工单信息
64
+     * @param tickedID
65
+     * @return
66
+     */
67
+    TpTicketVO ticketDetails(Integer tickedID);
52 68
 }

+ 3
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordCommentMapper.java View File

@@ -47,4 +47,7 @@ public interface TpTicketRecordCommentMapper {
47 47
      * @return
48 48
      */
49 49
     TpTicketRecordComment getUuID(@Param("communityId") Integer communityId, @Param("ticketId") Integer ticketId);
50
+
51
+    /*对话详情*/
52
+    List<TpTicketRecordComment> selectList(@Param("tickedID") Integer tickedID, @Param("recordId") Integer recordId);
50 53
 }

+ 10
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordMapper.java View File

@@ -1,6 +1,7 @@
1 1
 package com.community.huiju.dao;
2 2
 
3 3
 import com.community.huiju.model.TpTicketRecord;
4
+import lombok.Data;
4 5
 import org.apache.ibatis.annotations.Mapper;
5 6
 import org.apache.ibatis.annotations.Param;
6 7
 
@@ -26,4 +27,13 @@ public interface TpTicketRecordMapper {
26 27
 	List<TpTicketRecord> getTicketRecordByTicketId(@Param("communityId") String communityId,@Param("ticketId") Integer ticketId);
27 28
 
28 29
     TpTicketRecord selectTpTicketRecord(@Param("ticketId") Integer ticketId, @Param("status") Integer status);
30
+
31
+    /**
32
+     * 查询当前工单流程
33
+     * @param tickedID
34
+     * @return
35
+     */
36
+    List<TpTicketRecord> selectListTicketStatus(@Param("tickedID") Integer tickedID);
37
+
38
+    String statusName(@Param("status") String status);
29 39
 }

+ 10
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java View File

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.dao;
2 2
 
3
+import com.community.commom.mode.ResponseBean;
3 4
 import com.community.huiju.model.TpTransaction;
4 5
 import org.apache.ibatis.annotations.Mapper;
5 6
 import org.apache.ibatis.annotations.Param;
@@ -41,4 +42,13 @@ public interface TpTransactionMapper {
41 42
      * @return
42 43
      */
43 44
     List<TpTransaction> getUserTransactionList(@Param("id") Integer id, @Param("communityId")Integer communityId);
45
+
46
+    /**
47
+     *app端话题管理帖子列表
48
+     * @param communityId
49
+     * @param status
50
+     * @param transactionTitle
51
+     * @return
52
+     */
53
+    List<TpTransaction> tpTransactionManageList(@Param("communityId") Integer communityId, @Param("ManageStatus") Integer status, @Param("transactionTitle") String transactionTitle);
44 54
 }

+ 23
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionReportMapper.java View File

@@ -1,9 +1,12 @@
1 1
 package com.community.huiju.dao;
2 2
 
3
+import com.community.huiju.model.TpTransactionReply;
3 4
 import com.community.huiju.model.TpTransactionReport;
4 5
 import org.apache.ibatis.annotations.Mapper;
5 6
 import org.apache.ibatis.annotations.Param;
6 7
 
8
+import java.util.List;
9
+
7 10
 @Mapper
8 11
 public interface TpTransactionReportMapper {
9 12
     int deleteByPrimaryKey(Integer id);
@@ -25,4 +28,24 @@ public interface TpTransactionReportMapper {
25 28
      * @return
26 29
      */
27 30
     TpTransactionReport selectByCommunityIdAndTransactionId(@Param("userId") Integer userId, @Param("communityId") Integer communityId, @Param("transactionId") Integer transactionId);
31
+
32
+    /**
33
+     * 统计帖子总数
34
+     * @param id
35
+     * @return
36
+     */
37
+    int selectCount(@Param("id") Integer id,@Param("communityId") Integer communityId);
38
+
39
+    /**
40
+     * 统计帖子举报列表
41
+     * @param id
42
+     * @return
43
+     */
44
+    List<TpTransactionReport> transactionReplyList(@Param("id")Integer id,@Param("communityId") Integer communityId);
45
+
46
+    /**
47
+     * app端话题管理清除不实举报
48
+     * @param tpTransactionReport
49
+     */
50
+    void deleteTransactionReport(@Param("tpTransactionReportID") Integer tpTransactionReport,@Param("communityId") Integer communityId);
28 51
 }

+ 25
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpUserMapper.java View File

@@ -2,6 +2,9 @@ package com.community.huiju.dao;
2 2
 
3 3
 import com.community.huiju.model.TpUser;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
5 8
 
6 9
 @Mapper
7 10
 public interface TpUserMapper {
@@ -16,4 +19,26 @@ public interface TpUserMapper {
16 19
     int updateByPrimaryKeySelective(TpUser record);
17 20
 
18 21
     int updateByPrimaryKey(TpUser record);
22
+
23
+    /**
24
+     * 当前用户在物业端的信息
25
+     * @param loginName
26
+     * @return
27
+     */
28
+    TpUser selectLoginName(@Param("loginName") String loginName,@Param("communityId") Integer communityId);
29
+
30
+    /**
31
+     *
32
+     * @param tpUserId
33
+     * @return
34
+     */
35
+    String selectByIdUserName(@Param("id") Integer tpUserId);
36
+
37
+    /**
38
+     *查询所有物业的人员,并排除自身
39
+     * @param id
40
+     * @param communityId
41
+     * @return
42
+     */
43
+    List<TpUser> getUser(@Param("id") Integer id, @Param("communityId") Integer communityId);
19 44
 }

+ 138
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpShopAppraisal.java View File

@@ -0,0 +1,138 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpShopAppraisal {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer shopId;
11
+
12
+    private String score;
13
+
14
+    private String content;
15
+
16
+    private String appraisalPeople;
17
+
18
+    private String appraisalTel;
19
+
20
+    private String appraisalAvatar;
21
+
22
+    private Integer sort;
23
+
24
+    private String status;
25
+
26
+    private Integer createUser;
27
+
28
+    private Date createDate;
29
+    /**
30
+     * 当前回复信息有且只有一条商家回复
31
+     */
32
+    private TpShopAppraisalReplay tpShopAppraisalReplay;
33
+
34
+    public void setTpShopAppraisalReplay(TpShopAppraisalReplay tpShopAppraisalReplay) {
35
+        this.tpShopAppraisalReplay = tpShopAppraisalReplay;
36
+    }
37
+
38
+    public TpShopAppraisalReplay getTpShopAppraisalReplay() {
39
+        return tpShopAppraisalReplay;
40
+    }
41
+
42
+    public Integer getId() {
43
+        return id;
44
+    }
45
+
46
+    public void setId(Integer id) {
47
+        this.id = id;
48
+    }
49
+
50
+    public Integer getCommunityId() {
51
+        return communityId;
52
+    }
53
+
54
+    public void setCommunityId(Integer communityId) {
55
+        this.communityId = communityId;
56
+    }
57
+
58
+    public Integer getShopId() {
59
+        return shopId;
60
+    }
61
+
62
+    public void setShopId(Integer shopId) {
63
+        this.shopId = shopId;
64
+    }
65
+
66
+    public String getScore() {
67
+        return score;
68
+    }
69
+
70
+    public void setScore(String score) {
71
+        this.score = score == null ? null : score.trim();
72
+    }
73
+
74
+    public String getContent() {
75
+        return content;
76
+    }
77
+
78
+    public void setContent(String content) {
79
+        this.content = content == null ? null : content.trim();
80
+    }
81
+
82
+    public String getAppraisalPeople() {
83
+        return appraisalPeople;
84
+    }
85
+
86
+    public void setAppraisalPeople(String appraisalPeople) {
87
+        this.appraisalPeople = appraisalPeople == null ? null : appraisalPeople.trim();
88
+    }
89
+
90
+    public String getAppraisalTel() {
91
+        return appraisalTel;
92
+    }
93
+
94
+    public void setAppraisalTel(String appraisalTel) {
95
+        this.appraisalTel = appraisalTel == null ? null : appraisalTel.trim();
96
+    }
97
+
98
+    public String getAppraisalAvatar() {
99
+        return appraisalAvatar;
100
+    }
101
+
102
+    public void setAppraisalAvatar(String appraisalAvatar) {
103
+        this.appraisalAvatar = appraisalAvatar == null ? null : appraisalAvatar.trim();
104
+    }
105
+
106
+    public Integer getSort() {
107
+        return sort;
108
+    }
109
+
110
+    public void setSort(Integer sort) {
111
+        this.sort = sort;
112
+    }
113
+
114
+    public String getStatus() {
115
+        return status;
116
+    }
117
+
118
+    public void setStatus(String status) {
119
+        this.status = status == null ? null : status.trim();
120
+    }
121
+
122
+    public Integer getCreateUser() {
123
+        return createUser;
124
+    }
125
+
126
+    public void setCreateUser(Integer createUser) {
127
+        this.createUser = createUser;
128
+    }
129
+
130
+    public Date getCreateDate() {
131
+        return createDate;
132
+    }
133
+
134
+    public void setCreateDate(Date createDate) {
135
+        this.createDate = createDate;
136
+    }
137
+
138
+}

+ 95
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpShopAppraisalReplay.java View File

@@ -0,0 +1,95 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpShopAppraisalReplay {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer shopAppraisalId;
11
+
12
+    private String replayContent;
13
+
14
+    private String replayPeople;
15
+
16
+    private Integer createUser;
17
+
18
+    private Date createDate;
19
+
20
+    private Integer updateUser;
21
+
22
+    private Date updateDate;
23
+
24
+    public Integer getId() {
25
+        return id;
26
+    }
27
+
28
+    public void setId(Integer id) {
29
+        this.id = id;
30
+    }
31
+
32
+    public Integer getCommunityId() {
33
+        return communityId;
34
+    }
35
+
36
+    public void setCommunityId(Integer communityId) {
37
+        this.communityId = communityId;
38
+    }
39
+
40
+    public Integer getShopAppraisalId() {
41
+        return shopAppraisalId;
42
+    }
43
+
44
+    public void setShopAppraisalId(Integer shopAppraisalId) {
45
+        this.shopAppraisalId = shopAppraisalId;
46
+    }
47
+
48
+    public String getReplayContent() {
49
+        return replayContent;
50
+    }
51
+
52
+    public void setReplayContent(String replayContent) {
53
+        this.replayContent = replayContent == null ? null : replayContent.trim();
54
+    }
55
+
56
+    public String getReplayPeople() {
57
+        return replayPeople;
58
+    }
59
+
60
+    public void setReplayPeople(String replayPeople) {
61
+        this.replayPeople = replayPeople == null ? null : replayPeople.trim();
62
+    }
63
+
64
+    public Integer getCreateUser() {
65
+        return createUser;
66
+    }
67
+
68
+    public void setCreateUser(Integer createUser) {
69
+        this.createUser = createUser;
70
+    }
71
+
72
+    public Date getCreateDate() {
73
+        return createDate;
74
+    }
75
+
76
+    public void setCreateDate(Date createDate) {
77
+        this.createDate = createDate;
78
+    }
79
+
80
+    public Integer getUpdateUser() {
81
+        return updateUser;
82
+    }
83
+
84
+    public void setUpdateUser(Integer updateUser) {
85
+        this.updateUser = updateUser;
86
+    }
87
+
88
+    public Date getUpdateDate() {
89
+        return updateDate;
90
+    }
91
+
92
+    public void setUpdateDate(Date updateDate) {
93
+        this.updateDate = updateDate;
94
+    }
95
+}

+ 13
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecord.java View File

@@ -1,8 +1,10 @@
1 1
 package com.community.huiju.model;
2 2
 
3
+import lombok.Data;
4
+
3 5
 import java.util.Date;
4 6
 import java.util.List;
5
-
7
+@Data
6 8
 public class TpTicketRecord {
7 9
     private Integer id;
8 10
 
@@ -22,7 +24,16 @@ public class TpTicketRecord {
22 24
     private Integer createUser;
23 25
 
24 26
     private Date createDate;
25
-    
27
+    /**
28
+     * 对话详情列表
29
+     */
30
+    private  List<TpTicketRecordComment> statusContent;
31
+
32
+    /**
33
+     * 根据状态得到相应的步骤名称
34
+     */
35
+    private String statusName;
36
+
26 37
     private List<TpTicketRecordComment> ticketRecordCommentList;
27 38
 
28 39
     public Integer getId() {

+ 42
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransaction.java View File

@@ -81,6 +81,20 @@ public class TpTransaction {
81 81
      */
82 82
     private String sort;
83 83
 
84
+    /**
85
+     *是否已读
86
+     * @param releaseIdentity
87
+     */
88
+    private String readStatus;
89
+
90
+    public String getReadStatus() {
91
+        return readStatus;
92
+    }
93
+
94
+    public void setReadStatus(String readStatus) {
95
+        this.readStatus = readStatus;
96
+    }
97
+
84 98
     public void setReleaseIdentity(String releaseIdentity) {
85 99
         this.releaseIdentity = releaseIdentity;
86 100
     }
@@ -94,6 +108,34 @@ public class TpTransaction {
94 108
      */
95 109
     private String bel;
96 110
 
111
+    /**
112
+     * 举报总数
113
+     * @return
114
+     */
115
+    private int transactionReplyCount;
116
+
117
+    /**
118
+     * 举报列表
119
+     * @return
120
+     */
121
+    private List<TpTransactionReport> TpTransactionReport;
122
+
123
+    public List<com.community.huiju.model.TpTransactionReport> getTpTransactionReport() {
124
+        return TpTransactionReport;
125
+    }
126
+
127
+    public void setTpTransactionReport(List<com.community.huiju.model.TpTransactionReport> tpTransactionReport) {
128
+        TpTransactionReport = tpTransactionReport;
129
+    }
130
+
131
+    public int getTransactionReplyCount() {
132
+        return transactionReplyCount;
133
+    }
134
+
135
+    public void setTransactionReplyCount(int transactionReplyCount) {
136
+        this.transactionReplyCount = transactionReplyCount;
137
+    }
138
+
97 139
     public String getRoleName() {
98 140
         return roleName;
99 141
     }

+ 13
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransactionReport.java View File

@@ -16,6 +16,19 @@ public class TpTransactionReport {
16 16
 
17 17
     private Date createDate;
18 18
 
19
+    /**
20
+     * 举报内容
21
+     */
22
+    private String reportName;
23
+
24
+    public String getReportName() {
25
+        return reportName;
26
+    }
27
+
28
+    public void setReportName(String reportName) {
29
+        this.reportName = reportName;
30
+    }
31
+
19 32
     public Date getCreateDate() {
20 33
         return createDate;
21 34
     }

+ 56
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java View File

@@ -225,4 +225,60 @@ public interface SocialServiceI {
225 225
 	 * @return
226 226
 	 */
227 227
 	ResponseBean replyAdd(String paramets, UserElement userElement);
228
+
229
+	/**
230
+	 * 个人中心话题管理列表
231
+	 * @param loginName
232
+	 * @param status
233
+	 * @param pageNum
234
+	 * @param pageSize
235
+	 * @return
236
+	 */
237
+    ResponseBean tpTransactionManageList(String loginName, Integer status, Integer pageNum, Integer pageSize,String transactionTitle,Integer communityId);
238
+
239
+	/**
240
+	 * 人中心话题管批量作废
241
+	 * @param paramets
242
+	 * @return
243
+	 */
244
+    ResponseBean transactionsDelete(String paramets);
245
+
246
+	/**
247
+	 * app端话题管理清除不实举报
248
+	 * @param paramets
249
+	 * @return
250
+	 */
251
+	ResponseBean tpTransactionReportDelete(String paramets);
252
+
253
+	/**
254
+	 * app端话题管理添加话题
255
+	 * @param paramets
256
+	 * @return
257
+	 */
258
+    ResponseBean transactionsAdd(String paramets);
259
+
260
+	/**
261
+	 * app端话题管理批量已读话题
262
+	 * @param paramets
263
+	 * @return
264
+	 */
265
+	ResponseBean transactionsRead(String paramets);
266
+
267
+	/**
268
+	 * app端工单管理列表
269
+	 * @param loginName
270
+	 * @param status
271
+	 * @param pageNum
272
+	 * @param pageSize
273
+	 * @param communityId
274
+	 * @return
275
+	 */
276
+    ResponseBean tpTicketManageList(String loginName, Integer status, Integer pageNum, Integer pageSize, Integer communityId);
277
+
278
+	/**
279
+	 * app端工单管理详情
280
+	 * @param tickedID
281
+	 * @return
282
+	 */
283
+	ResponseBean tpTicketManageDetails(Integer tickedID,Integer communityId,String loginName);
228 284
 }

+ 15
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/TpShopServicel.java View File

@@ -33,4 +33,19 @@ public interface TpShopServicel {
33 33
      * @return
34 34
      */
35 35
     ResponseBean getShopCommunity(UserElement userElement);
36
+
37
+    /**
38
+     * 查询当前商铺评价列表
39
+     * @param shopID
40
+     * @return
41
+     */
42
+    ResponseBean shopEvaluate(Integer shopID,UserElement userElement,Integer pageNum,Integer pageSize);
43
+
44
+    /**
45
+     * 添加线下商铺评论
46
+     * @param paramets
47
+     * @param userElement
48
+     * @return
49
+     */
50
+    ResponseBean shopEvaluateAdd(String paramets, UserElement userElement);
36 51
 }

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

@@ -10,6 +10,7 @@ import com.community.huiju.model.*;
10 10
 import com.community.huiju.service.ITaUserService;
11 11
 import com.community.huiju.service.ImageServiceI;
12 12
 import com.community.huiju.service.SocialServiceI;
13
+import com.community.huiju.vo.TpTicketVO;
13 14
 import com.github.pagehelper.Page;
14 15
 import com.github.pagehelper.PageHelper;
15 16
 import com.google.common.collect.Maps;
@@ -106,6 +107,12 @@ public class SocialServiceImpl implements SocialServiceI {
106 107
     @Autowired
107 108
     private ITaUserService iTaUserService;
108 109
 
110
+    @Autowired
111
+    private TpUserMapper tpUserMapperr;
112
+
113
+    @Autowired
114
+    private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
115
+
109 116
     @Override
110 117
     @Transactional
111 118
     public TpAnnouncement findAnnouncementDetail(Integer id, Integer communityId, Integer userId) {
@@ -775,7 +782,6 @@ public class SocialServiceImpl implements SocialServiceI {
775 782
         return response;
776 783
     }
777 784
 
778
-
779 785
     @Override
780 786
     public void accessTicket(Integer communityId, TpTicket tpTicket, String ticketId, Integer userId) {
781 787
         //修改工单内容和评分
@@ -1009,4 +1015,223 @@ public class SocialServiceImpl implements SocialServiceI {
1009 1015
         responseBean.addSuccess(replies);
1010 1016
         return responseBean;
1011 1017
     }
1012
-}
1018
+
1019
+    @Override
1020
+    public ResponseBean tpTransactionManageList(String loginName, Integer status, Integer pageNum, Integer pageSize,String transactionTitle,Integer communityId) {
1021
+        ResponseBean responseBean= new  ResponseBean();
1022
+        // 拿到当前用户在物业端的信息
1023
+        TpUser tpUser= tpUserMapperr.selectLoginName(loginName,communityId);
1024
+        if( null == tpUser ){
1025
+            responseBean.addError("号码在物业端不存在");
1026
+            return responseBean;
1027
+        }
1028
+        // 查出当前小区小下的所有帖子
1029
+        Map<String, Object> parameter = Maps.newHashMap();
1030
+        Page<TpTransaction> pageList = PageHelper.startPage(pageNum, pageSize);
1031
+        List<TpTransaction> tpTransactionManageList= tpTransactionMapper.tpTransactionManageList(tpUser.getCommunityId(),status,transactionTitle);
1032
+
1033
+        for (TpTransaction tpTransaction:tpTransactionManageList){
1034
+            // 统计举报整数
1035
+            int transactionReplyCount= tpTransactionReportMapper.selectCount(tpTransaction.getId(),tpTransaction.getCommunityId());
1036
+            tpTransaction.setTransactionReplyCount(transactionReplyCount);
1037
+            // 统计举报列表
1038
+            List<TpTransactionReport> transactionReplyList= tpTransactionReportMapper.transactionReplyList(tpTransaction.getId(),tpTransaction.getCommunityId());
1039
+            tpTransaction.setTpTransactionReport(transactionReplyList);
1040
+               // 发帖人身份
1041
+            if (tpTransaction.getUuidType().equals("app")) {
1042
+                TaUser taUser = taUserMapper.selectByPrimaryKey(taUserVerifyMapper.selectByPrimaryKey(tpTransaction.getUuid()).getUserId());
1043
+                tpTransaction.setTelephone(taUser.getLoginName());
1044
+                TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(taUserVerifyMapper.selectByPrimaryKey(tpTransaction.getUuid()).getRoleId());
1045
+                tpTransaction.setRoleId(taSysRole.getId());
1046
+                tpTransaction.setRoleName(taSysRole.getRoleName());
1047
+            }
1048
+            if (tpTransaction.getUuidType().equals("prop")) {
1049
+                TpUser user = tpUserMapper.selectByPrimaryKey(tpTransaction.getUuid());
1050
+                tpTransaction.setTelephone(user.getLoginName());
1051
+                tpTransaction.setRoleName("物业");
1052
+            }
1053
+
1054
+        }
1055
+        parameter.put("list", tpTransactionManageList);
1056
+        parameter.put("total", pageList.getTotal());
1057
+        responseBean.addSuccess(parameter);
1058
+        return responseBean;
1059
+    }
1060
+
1061
+    @Override
1062
+    public ResponseBean transactionsDelete(String paramets) {
1063
+        ResponseBean response = new ResponseBean();
1064
+        JSONObject parseObject = JSONObject.parseObject(paramets);
1065
+        // 根据电话号码查出物业端信息
1066
+        String loginName = parseObject.getString("loginName");
1067
+        Integer communityId = parseObject.getInteger("communityId");
1068
+        TpUser tpUser= tpUserMapper.selectLoginName(loginName,communityId);
1069
+
1070
+        JSONArray tpTransactionIdId = parseObject.getJSONArray("id");
1071
+        Integer[] tpTransactionIdArray = tpTransactionIdId.toArray(new Integer[]{});
1072
+        for (Integer id : tpTransactionIdArray) {
1073
+            TpTransaction tpTransaction = new TpTransaction();
1074
+            tpTransaction.setId(id);
1075
+            tpTransaction.setStatus("0");
1076
+            tpTransaction.setUpdateDate(new Date());
1077
+            tpTransaction.setUpdateUser(tpUser.getId());
1078
+            tpTransactionMapper.updateByPrimaryKeySelective(tpTransaction);
1079
+        }
1080
+        response.addSuccess("成功");
1081
+        return response;
1082
+    }
1083
+
1084
+    @Override
1085
+    public ResponseBean tpTransactionReportDelete(String paramets) {
1086
+        ResponseBean response = new ResponseBean();
1087
+        JSONObject parseObject = JSONObject.parseObject(paramets);
1088
+        // 根据电话号码查出物业端信息
1089
+        Integer communityId = parseObject.getInteger("communityId");
1090
+        String loginName = parseObject.getString("loginName");
1091
+        TpUser tpUser = tpUserMapper.selectLoginName(loginName,communityId);
1092
+
1093
+        JSONArray tpTransactionIdId = parseObject.getJSONArray("id");
1094
+        Integer[] tpTransactionReportArray = tpTransactionIdId.toArray(new Integer[]{});
1095
+        for (Integer TpTransactionReport:tpTransactionReportArray){
1096
+            tpTransactionReportMapper.deleteTransactionReport(TpTransactionReport,tpUser.getCommunityId());
1097
+        }
1098
+        response.addSuccess("成功");
1099
+        return response;
1100
+    }
1101
+
1102
+    @Override
1103
+    public ResponseBean transactionsAdd(String paramets) {
1104
+        JSONObject object= JSONObject.parseObject(paramets);
1105
+        Integer communityId = object.getInteger("communityId");
1106
+        String loginName =  object.getString("loginName");
1107
+        TpUser tpUser= tpUserMapper.selectLoginName(loginName,Integer.valueOf(communityId));
1108
+
1109
+        Integer id = tpUser.getId();
1110
+        ResponseBean response = new ResponseBean();
1111
+
1112
+        JSONObject jsonobject = JSONObject.parseObject(paramets);
1113
+
1114
+        TpTransaction tpTransaction = JSONObject.parseObject(paramets, TpTransaction.class);
1115
+        tpTransaction.setCommunityId(communityId);
1116
+        tpTransaction.setUuid(id);
1117
+        tpTransaction.setUuidType("prop");
1118
+        tpTransaction.setUuidName(tpUser.getUserName());
1119
+        tpTransaction.setCreateDate(new Date());
1120
+        tpTransaction.setCreateUser(id);
1121
+        tpTransaction.setViewCount(0);
1122
+        tpTransaction.setIsReported("0");
1123
+        tpTransaction.setReleaseIdentity("1");
1124
+        tpTransactionMapper.insertSelective(tpTransaction);
1125
+        JSONArray contentImg = jsonobject.getJSONArray("contentImg");
1126
+
1127
+        String[] contentImgArray = contentImg.toArray(new String[]{});
1128
+        if (tpTransaction.getTransactionTitle() == null) {
1129
+            response.addError("标题不能为空");
1130
+            return response;
1131
+        }
1132
+        if (null == tpTransaction.getTransactionContent() && null == contentImg) {
1133
+            response.addError("内容和图片必须填一个");
1134
+            return response;
1135
+        }
1136
+        for (String img : contentImgArray) {
1137
+            TdImages tdImages = new TdImages();
1138
+            tdImages.setImageUrl(img);
1139
+            tdImages.setType("transaction");
1140
+            tdImages.setUuid(tpTransaction.getId());
1141
+            tdImages.setCreateTime(new Date());
1142
+            tdImages.setCreateUser(id);
1143
+            tdImagesMapper.insert(tdImages);
1144
+        }
1145
+        return response;
1146
+    }
1147
+
1148
+    @Override
1149
+    public ResponseBean transactionsRead(String paramets) {
1150
+        ResponseBean response = new ResponseBean();
1151
+        JSONObject parseObject = JSONObject.parseObject(paramets);
1152
+        // 根据电话号码查出物业端信息
1153
+        String loginName = parseObject.getString("loginName");
1154
+        Integer communityId = parseObject.getInteger("communityId");
1155
+        TpUser tpUser = tpUserMapper.selectLoginName(loginName, communityId);
1156
+
1157
+        JSONArray tpTransactionIdId = parseObject.getJSONArray("id");
1158
+        Integer[] tpTransactionIdArray = tpTransactionIdId.toArray(new Integer[]{});
1159
+        for (Integer id : tpTransactionIdArray) {
1160
+            TpTransaction tpTransaction = new TpTransaction();
1161
+            tpTransaction.setId(id);
1162
+            tpTransaction.setReadStatus("1");
1163
+            tpTransaction.setUpdateDate(new Date());
1164
+            tpTransaction.setUpdateUser(tpUser.getId());
1165
+            tpTransactionMapper.updateByPrimaryKeySelective(tpTransaction);
1166
+        }
1167
+        response.addSuccess("成功");
1168
+        return response;
1169
+    }
1170
+
1171
+    @Override
1172
+    public ResponseBean tpTicketManageList(String loginName, Integer status, Integer pageNum, Integer pageSize, Integer communityId) {
1173
+        ResponseBean response = new ResponseBean<>();
1174
+
1175
+        TpUser tpUser = tpUserMapperr.selectLoginName(loginName, communityId);
1176
+        Page<TpTransaction> pageList = PageHelper.startPage(pageNum, pageSize);
1177
+        List<TpTicket> tpTicketList = tpTicketMapper.ticketList(status, tpUser.getCommunityId());
1178
+        HashMap map = new HashMap<>();
1179
+        map.put("list", tpTicketList);
1180
+        map.put("total", pageList.getTotal());
1181
+        response.addSuccess(map);
1182
+        return response;
1183
+    }
1184
+
1185
+    @Override
1186
+    public ResponseBean tpTicketManageDetails(Integer tickedID,Integer communityId,String loginName) {
1187
+        // 获取物业端的用户信息
1188
+        TpUser tpUser= tpUserMapper.selectLoginName(loginName,communityId);
1189
+        ResponseBean response = new ResponseBean();
1190
+        TpTicketVO ticketVO = tpTicketMapper.ticketDetails(tickedID);
1191
+        // 从taUserVerify里面获取userID
1192
+        TaUserVerify taUserVerify = taUserVerifyMapper.selectByPrimaryKey(ticketVO.getCreateUser());
1193
+        TaUser taUser = taUserMapper.selectByPrimaryKey(taUserVerify.getUserId());
1194
+        /*发起人*/
1195
+        ticketVO.setCreateUserNmae(taUser.getUserName());
1196
+        /*发起人手机号码*/
1197
+        ticketVO.setLoginName(taUser.getLoginName());
1198
+        /*查询当前受理人*/
1199
+        ticketVO.setTpUserNmae(tpUserMapper.selectByIdUserName(ticketVO.getTpUserId()));
1200
+        /*查询所有物业的人员,并排除自身*/
1201
+        ticketVO.setTpUsersList(tpUserMapper.getUser(tpUser.getId(), communityId));
1202
+        /*本人*/
1203
+        ticketVO.setCurrentUserName(tpUser.getId()+"");
1204
+
1205
+
1206
+        /*查询工单类容的图片*/
1207
+        List<TdImages> tdImages = tdImagesMapper.selectImages(tickedID,Constant.SERVICE);
1208
+        List<String> contentImg = new ArrayList<String>();
1209
+        for (TdImages images : tdImages) {
1210
+            contentImg.add(images.getImageUrl());
1211
+        }
1212
+        ticketVO.setContentImageUrl(contentImg);
1213
+
1214
+        /*工单状态*/
1215
+        List<TpTicketRecord> ticketRecordList = tpTicketRecordMapper.selectListTicketStatus(tickedID);
1216
+        ticketVO.setRecordList(ticketRecordList);
1217
+
1218
+        for (TpTicketRecord ticketRecord : ticketRecordList) {
1219
+            /*对话详情*/
1220
+            List<TpTicketRecordComment> tpTicketRecordCommentList = tpTicketRecordCommentMapper.selectList(tickedID,ticketRecord.getId());
1221
+            ticketRecord.setStatusContent(tpTicketRecordCommentList);
1222
+            /* 遍历当前对话信息组装图片*/
1223
+            for (TpTicketRecordComment tpTicketRecordComment : tpTicketRecordCommentList) {
1224
+                /*注意reply用于标记工单回复类的图片*/
1225
+                List<TdImages> ticketRecordCommentImages = tdImagesMapper.selectImages(tpTicketRecordComment.getId(),"reply");
1226
+                tpTicketRecordComment.setImgURL(ticketRecordCommentImages);
1227
+            }
1228
+        }
1229
+        /*根据状态得到相应的步骤名称*/
1230
+        for (TpTicketRecord tpTicketRecord : ticketRecordList) {
1231
+            String statusName = tpTicketRecordMapper.statusName(tpTicketRecord.getStatus());
1232
+            tpTicketRecord.setStatusName(statusName);
1233
+        }
1234
+        response.addSuccess(ticketVO);
1235
+        return response;
1236
+    }
1237
+}

+ 54
- 11
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TpShopServicelmpl.java View File

@@ -1,14 +1,10 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.mode.ResponseBean;
4 5
 import com.community.commom.session.UserElement;
5
-import com.community.huiju.dao.TpShopImgMapper;
6
-import com.community.huiju.dao.TpShopMapper;
7
-import com.community.huiju.dao.TpShopTypeMapper;
8
-import com.community.huiju.model.TpAnnouncement;
9
-import com.community.huiju.model.TpShop;
10
-import com.community.huiju.model.TpShopImg;
11
-import com.community.huiju.model.TpShopType;
6
+import com.community.huiju.dao.*;
7
+import com.community.huiju.model.*;
12 8
 import com.community.huiju.service.TpShopServicel;
13 9
 import com.github.pagehelper.Page;
14 10
 import com.github.pagehelper.PageHelper;
@@ -16,10 +12,7 @@ import com.google.common.collect.Maps;
16 12
 import org.springframework.beans.factory.annotation.Autowired;
17 13
 import org.springframework.stereotype.Service;
18 14
 
19
-import java.util.ArrayList;
20
-import java.util.HashMap;
21
-import java.util.List;
22
-import java.util.Map;
15
+import java.util.*;
23 16
 
24 17
 /**
25 18
  * version V1.0
@@ -39,6 +32,18 @@ public class TpShopServicelmpl implements TpShopServicel {
39 32
 
40 33
     @Autowired
41 34
     private TpShopImgMapper tpShopImgMapper;
35
+
36
+    @Autowired
37
+    private TpShopAppraisalMapper tpShopAppraisalMapper;
38
+
39
+    @Autowired
40
+    private TpShopAppraisalReplayMapper tpShopAppraisalReplayMapper;
41
+
42
+    @Autowired
43
+    private  TaUserMapper taUserMapper;
44
+
45
+    @Autowired
46
+    private  TaUserVerifyMapper taUserVerifyMapper;
42 47
     @Override
43 48
     public ResponseBean getShop(UserElement userElement,String houseName,Integer tpShopTypeId,Integer pageNum,Integer pageSize) {
44 49
         ResponseBean responseBean= new ResponseBean<>();
@@ -145,4 +150,42 @@ public class TpShopServicelmpl implements TpShopServicel {
145 150
         return response;
146 151
 
147 152
     }
153
+
154
+    @Override
155
+    public ResponseBean shopEvaluate(Integer shopID,UserElement userElement,Integer pageNum,Integer pageSize) {
156
+        ResponseBean responseBean= new ResponseBean();
157
+        Map<String, Object> parameter = Maps.newHashMap();
158
+        Page<TpShopAppraisal> pagetpShopAppraisal = PageHelper.startPage(pageNum, pageSize);
159
+        List<TpShopAppraisal> tpShopAppraisalList= tpShopAppraisalMapper.shopEvaluateList(Integer.valueOf(shopID),userElement.getCommunityId());
160
+        for (TpShopAppraisal tpShopAppraisal:tpShopAppraisalList){
161
+            // 查商家回复,有且只有一条
162
+            TpShopAppraisalReplay tpShopAppraisalReplay = tpShopAppraisalReplayMapper.selectShopAppraisalReplay(tpShopAppraisal.getId(),userElement.getCommunityId());
163
+            tpShopAppraisal.setTpShopAppraisalReplay(tpShopAppraisalReplay);
164
+        }
165
+        int evaluateCount= tpShopAppraisalMapper.evaluateCount(Integer.valueOf(shopID),userElement.getCommunityId());
166
+        parameter.put("total", pagetpShopAppraisal.getTotal());
167
+        parameter.put("list", pagetpShopAppraisal);
168
+        parameter.put("evaluate", evaluateCount);
169
+        responseBean.addSuccess(parameter);
170
+        return responseBean;
171
+    }
172
+
173
+    @Override
174
+    public ResponseBean shopEvaluateAdd(String paramets, UserElement userElement) {
175
+        ResponseBean responseBean= new ResponseBean();
176
+        TpShopAppraisal tpShopAppraisal= JSONObject.parseObject(paramets,TpShopAppraisal.class);
177
+
178
+        tpShopAppraisal.setCommunityId(userElement.getCommunityId());
179
+        tpShopAppraisal.setAppraisalPeople(userElement.getId()+"");
180
+        tpShopAppraisal.setAppraisalTel(userElement.getLoginName());
181
+        String photo = taUserMapper.selectByPrimaryKey(userElement.getId()).getHeadPortrait();
182
+        tpShopAppraisal.setAppraisalAvatar(photo);
183
+        tpShopAppraisal.setScore("1");
184
+        tpShopAppraisal.setStatus("1");
185
+        tpShopAppraisal.setCreateUser(userElement.getUserVerifyId());
186
+        tpShopAppraisal.setCreateDate(new Date());
187
+        responseBean.addSuccess("成功");
188
+        tpShopAppraisalMapper.insert(tpShopAppraisal);
189
+        return responseBean;
190
+    }
148 191
 }

+ 40
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketVO.java View File

@@ -1,9 +1,13 @@
1 1
 package com.community.huiju.vo;
2 2
 
3
+import com.community.huiju.model.TpTicket;
4
+import com.community.huiju.model.TpTicketRecord;
5
+import com.community.huiju.model.TpUser;
3 6
 import com.community.huiju.model.TpannouncementTel;
4 7
 import lombok.AllArgsConstructor;
5 8
 import lombok.Data;
6 9
 import lombok.NoArgsConstructor;
10
+import sun.security.krb5.internal.Ticket;
7 11
 
8 12
 import java.util.Date;
9 13
 import java.util.List;
@@ -16,7 +20,7 @@ import java.util.Map;
16 20
 @Data
17 21
 @AllArgsConstructor
18 22
 @NoArgsConstructor
19
-public class TpTicketVO {
23
+public class TpTicketVO extends TpTicket {
20 24
 
21 25
     /** 编号 **/
22 26
     private Integer id;
@@ -77,4 +81,39 @@ public class TpTicketVO {
77 81
 
78 82
     /**投诉流程状态**/
79 83
     private String statusList;
84
+
85
+    /**
86
+     * 工单发起人
87
+     */
88
+    private String createUserNmae;
89
+
90
+    /**
91
+     * 发起人手机号码
92
+     */
93
+    private String loginName;
94
+
95
+    /**
96
+     * 当前受理人
97
+     */
98
+    private String tpUserNmae;
99
+
100
+    /**
101
+     * 物业端所有小区人员
102
+     */
103
+    private List<TpUser> tpUsersList;
104
+
105
+    /**
106
+     * 本人
107
+     */
108
+    private  String currentUserName;
109
+
110
+    /**
111
+     * 工单内容图片
112
+     */
113
+    private  List<String> contentImageUrl;
114
+
115
+    /**
116
+     * 工单流程
117
+     */
118
+    private List<TpTicketRecord> recordList;
80 119
 }

+ 189
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpShopAppraisalMapper.xml View File

@@ -0,0 +1,189 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpShopAppraisalMapper">
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpShopAppraisal">
5
+    <id column="id" jdbcType="INTEGER" property="id" />
6
+    <result column="community_id" jdbcType="INTEGER" property="communityId" />
7
+    <result column="shop_id" jdbcType="INTEGER" property="shopId" />
8
+    <result column="score" jdbcType="VARCHAR" property="score" />
9
+    <result column="content" jdbcType="VARCHAR" property="content" />
10
+    <result column="appraisal_people" jdbcType="VARCHAR" property="appraisalPeople" />
11
+    <result column="appraisal_tel" jdbcType="VARCHAR" property="appraisalTel" />
12
+    <result column="appraisal_avatar" jdbcType="VARCHAR" property="appraisalAvatar" />
13
+    <result column="sort" jdbcType="INTEGER" property="sort" />
14
+    <result column="status" jdbcType="VARCHAR" property="status" />
15
+    <result column="create_user" jdbcType="INTEGER" property="createUser" />
16
+    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
17
+  </resultMap>
18
+  <sql id="Base_Column_List">
19
+    id, community_id, shop_id, score, content, appraisal_people, appraisal_tel, appraisal_avatar, 
20
+    sort, status, create_user, create_date
21
+  </sql>
22
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
23
+    select 
24
+    <include refid="Base_Column_List" />
25
+    from tp_shop_appraisal
26
+    where id = #{id,jdbcType=INTEGER}
27
+  </select>
28
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
29
+    delete from tp_shop_appraisal
30
+    where id = #{id,jdbcType=INTEGER}
31
+  </delete>
32
+  <insert id="insert" parameterType="com.community.huiju.model.TpShopAppraisal">
33
+    insert into tp_shop_appraisal (id, community_id, shop_id, 
34
+      score, content, appraisal_people, 
35
+      appraisal_tel, appraisal_avatar, sort, 
36
+      status, create_user, create_date
37
+      )
38
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{shopId,jdbcType=INTEGER}, 
39
+      #{score,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{appraisalPeople,jdbcType=VARCHAR}, 
40
+      #{appraisalTel,jdbcType=VARCHAR}, #{appraisalAvatar,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, 
41
+      #{status,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}
42
+      )
43
+  </insert>
44
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpShopAppraisal">
45
+    insert into tp_shop_appraisal
46
+    <trim prefix="(" suffix=")" suffixOverrides=",">
47
+      <if test="id != null">
48
+        id,
49
+      </if>
50
+      <if test="communityId != null">
51
+        community_id,
52
+      </if>
53
+      <if test="shopId != null">
54
+        shop_id,
55
+      </if>
56
+      <if test="score != null">
57
+        score,
58
+      </if>
59
+      <if test="content != null">
60
+        content,
61
+      </if>
62
+      <if test="appraisalPeople != null">
63
+        appraisal_people,
64
+      </if>
65
+      <if test="appraisalTel != null">
66
+        appraisal_tel,
67
+      </if>
68
+      <if test="appraisalAvatar != null">
69
+        appraisal_avatar,
70
+      </if>
71
+      <if test="sort != null">
72
+        sort,
73
+      </if>
74
+      <if test="status != null">
75
+        status,
76
+      </if>
77
+      <if test="createUser != null">
78
+        create_user,
79
+      </if>
80
+      <if test="createDate != null">
81
+        create_date,
82
+      </if>
83
+    </trim>
84
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
85
+      <if test="id != null">
86
+        #{id,jdbcType=INTEGER},
87
+      </if>
88
+      <if test="communityId != null">
89
+        #{communityId,jdbcType=INTEGER},
90
+      </if>
91
+      <if test="shopId != null">
92
+        #{shopId,jdbcType=INTEGER},
93
+      </if>
94
+      <if test="score != null">
95
+        #{score,jdbcType=VARCHAR},
96
+      </if>
97
+      <if test="content != null">
98
+        #{content,jdbcType=VARCHAR},
99
+      </if>
100
+      <if test="appraisalPeople != null">
101
+        #{appraisalPeople,jdbcType=VARCHAR},
102
+      </if>
103
+      <if test="appraisalTel != null">
104
+        #{appraisalTel,jdbcType=VARCHAR},
105
+      </if>
106
+      <if test="appraisalAvatar != null">
107
+        #{appraisalAvatar,jdbcType=VARCHAR},
108
+      </if>
109
+      <if test="sort != null">
110
+        #{sort,jdbcType=INTEGER},
111
+      </if>
112
+      <if test="status != null">
113
+        #{status,jdbcType=VARCHAR},
114
+      </if>
115
+      <if test="createUser != null">
116
+        #{createUser,jdbcType=INTEGER},
117
+      </if>
118
+      <if test="createDate != null">
119
+        #{createDate,jdbcType=TIMESTAMP},
120
+      </if>
121
+    </trim>
122
+  </insert>
123
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpShopAppraisal">
124
+    update tp_shop_appraisal
125
+    <set>
126
+      <if test="communityId != null">
127
+        community_id = #{communityId,jdbcType=INTEGER},
128
+      </if>
129
+      <if test="shopId != null">
130
+        shop_id = #{shopId,jdbcType=INTEGER},
131
+      </if>
132
+      <if test="score != null">
133
+        score = #{score,jdbcType=VARCHAR},
134
+      </if>
135
+      <if test="content != null">
136
+        content = #{content,jdbcType=VARCHAR},
137
+      </if>
138
+      <if test="appraisalPeople != null">
139
+        appraisal_people = #{appraisalPeople,jdbcType=VARCHAR},
140
+      </if>
141
+      <if test="appraisalTel != null">
142
+        appraisal_tel = #{appraisalTel,jdbcType=VARCHAR},
143
+      </if>
144
+      <if test="appraisalAvatar != null">
145
+        appraisal_avatar = #{appraisalAvatar,jdbcType=VARCHAR},
146
+      </if>
147
+      <if test="sort != null">
148
+        sort = #{sort,jdbcType=INTEGER},
149
+      </if>
150
+      <if test="status != null">
151
+        status = #{status,jdbcType=VARCHAR},
152
+      </if>
153
+      <if test="createUser != null">
154
+        create_user = #{createUser,jdbcType=INTEGER},
155
+      </if>
156
+      <if test="createDate != null">
157
+        create_date = #{createDate,jdbcType=TIMESTAMP},
158
+      </if>
159
+    </set>
160
+    where id = #{id,jdbcType=INTEGER}
161
+  </update>
162
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpShopAppraisal">
163
+    update tp_shop_appraisal
164
+    set community_id = #{communityId,jdbcType=INTEGER},
165
+      shop_id = #{shopId,jdbcType=INTEGER},
166
+      score = #{score,jdbcType=VARCHAR},
167
+      content = #{content,jdbcType=VARCHAR},
168
+      appraisal_people = #{appraisalPeople,jdbcType=VARCHAR},
169
+      appraisal_tel = #{appraisalTel,jdbcType=VARCHAR},
170
+      appraisal_avatar = #{appraisalAvatar,jdbcType=VARCHAR},
171
+      sort = #{sort,jdbcType=INTEGER},
172
+      status = #{status,jdbcType=VARCHAR},
173
+      create_user = #{createUser,jdbcType=INTEGER},
174
+      create_date = #{createDate,jdbcType=TIMESTAMP}
175
+    where id = #{id,jdbcType=INTEGER}
176
+  </update>
177
+
178
+  <select id="shopEvaluateList" resultMap="BaseResultMap">
179
+    select
180
+    <include refid="Base_Column_List" />
181
+    from tp_shop_appraisal where shop_id = #{shopID,jdbcType=INTEGER} and community_id = #{communityId,jdbcType=INTEGER} and status = 1
182
+  </select>
183
+
184
+  <select id="evaluateCount" resultType="int">
185
+    select
186
+    count(id)
187
+    from tp_shop_appraisal where shop_id = #{shopID,jdbcType=INTEGER} and community_id = #{communityId,jdbcType=INTEGER} and status = 1
188
+  </select>
189
+</mapper>

+ 145
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpShopAppraisalReplayMapper.xml View File

@@ -0,0 +1,145 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.community.huiju.dao.TpShopAppraisalReplayMapper">
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpShopAppraisalReplay">
5
+    <id column="id" jdbcType="INTEGER" property="id" />
6
+    <result column="community_id" jdbcType="INTEGER" property="communityId" />
7
+    <result column="shop_appraisal_id" jdbcType="INTEGER" property="shopAppraisalId" />
8
+    <result column="replay_content" jdbcType="VARCHAR" property="replayContent" />
9
+    <result column="replay_people" jdbcType="VARCHAR" property="replayPeople" />
10
+    <result column="create_user" jdbcType="INTEGER" property="createUser" />
11
+    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
12
+    <result column="update_user" jdbcType="INTEGER" property="updateUser" />
13
+    <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
14
+  </resultMap>
15
+  <sql id="Base_Column_List">
16
+    id, community_id, shop_appraisal_id, replay_content, replay_people, create_user, 
17
+    create_date, update_user, update_date
18
+  </sql>
19
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
20
+    select 
21
+    <include refid="Base_Column_List" />
22
+    from tp_shop_appraisal_replay
23
+    where id = #{id,jdbcType=INTEGER}
24
+  </select>
25
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
26
+    delete from tp_shop_appraisal_replay
27
+    where id = #{id,jdbcType=INTEGER}
28
+  </delete>
29
+  <insert id="insert" parameterType="com.community.huiju.model.TpShopAppraisalReplay">
30
+    insert into tp_shop_appraisal_replay (id, community_id, shop_appraisal_id, 
31
+      replay_content, replay_people, create_user, 
32
+      create_date, update_user, update_date
33
+      )
34
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{shopAppraisalId,jdbcType=INTEGER}, 
35
+      #{replayContent,jdbcType=VARCHAR}, #{replayPeople,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, 
36
+      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
37
+      )
38
+  </insert>
39
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpShopAppraisalReplay">
40
+    insert into tp_shop_appraisal_replay
41
+    <trim prefix="(" suffix=")" suffixOverrides=",">
42
+      <if test="id != null">
43
+        id,
44
+      </if>
45
+      <if test="communityId != null">
46
+        community_id,
47
+      </if>
48
+      <if test="shopAppraisalId != null">
49
+        shop_appraisal_id,
50
+      </if>
51
+      <if test="replayContent != null">
52
+        replay_content,
53
+      </if>
54
+      <if test="replayPeople != null">
55
+        replay_people,
56
+      </if>
57
+      <if test="createUser != null">
58
+        create_user,
59
+      </if>
60
+      <if test="createDate != null">
61
+        create_date,
62
+      </if>
63
+      <if test="updateUser != null">
64
+        update_user,
65
+      </if>
66
+      <if test="updateDate != null">
67
+        update_date,
68
+      </if>
69
+    </trim>
70
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
71
+      <if test="id != null">
72
+        #{id,jdbcType=INTEGER},
73
+      </if>
74
+      <if test="communityId != null">
75
+        #{communityId,jdbcType=INTEGER},
76
+      </if>
77
+      <if test="shopAppraisalId != null">
78
+        #{shopAppraisalId,jdbcType=INTEGER},
79
+      </if>
80
+      <if test="replayContent != null">
81
+        #{replayContent,jdbcType=VARCHAR},
82
+      </if>
83
+      <if test="replayPeople != null">
84
+        #{replayPeople,jdbcType=VARCHAR},
85
+      </if>
86
+      <if test="createUser != null">
87
+        #{createUser,jdbcType=INTEGER},
88
+      </if>
89
+      <if test="createDate != null">
90
+        #{createDate,jdbcType=TIMESTAMP},
91
+      </if>
92
+      <if test="updateUser != null">
93
+        #{updateUser,jdbcType=INTEGER},
94
+      </if>
95
+      <if test="updateDate != null">
96
+        #{updateDate,jdbcType=TIMESTAMP},
97
+      </if>
98
+    </trim>
99
+  </insert>
100
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpShopAppraisalReplay">
101
+    update tp_shop_appraisal_replay
102
+    <set>
103
+      <if test="communityId != null">
104
+        community_id = #{communityId,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="shopAppraisalId != null">
107
+        shop_appraisal_id = #{shopAppraisalId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="replayContent != null">
110
+        replay_content = #{replayContent,jdbcType=VARCHAR},
111
+      </if>
112
+      <if test="replayPeople != null">
113
+        replay_people = #{replayPeople,jdbcType=VARCHAR},
114
+      </if>
115
+      <if test="createUser != null">
116
+        create_user = #{createUser,jdbcType=INTEGER},
117
+      </if>
118
+      <if test="createDate != null">
119
+        create_date = #{createDate,jdbcType=TIMESTAMP},
120
+      </if>
121
+      <if test="updateUser != null">
122
+        update_user = #{updateUser,jdbcType=INTEGER},
123
+      </if>
124
+      <if test="updateDate != null">
125
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
126
+      </if>
127
+    </set>
128
+    where id = #{id,jdbcType=INTEGER}
129
+  </update>
130
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpShopAppraisalReplay">
131
+    update tp_shop_appraisal_replay
132
+    set community_id = #{communityId,jdbcType=INTEGER},
133
+      shop_appraisal_id = #{shopAppraisalId,jdbcType=INTEGER},
134
+      replay_content = #{replayContent,jdbcType=VARCHAR},
135
+      replay_people = #{replayPeople,jdbcType=VARCHAR},
136
+      create_user = #{createUser,jdbcType=INTEGER},
137
+      create_date = #{createDate,jdbcType=TIMESTAMP},
138
+      update_user = #{updateUser,jdbcType=INTEGER},
139
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
140
+    where id = #{id,jdbcType=INTEGER}
141
+  </update>
142
+  <select id="selectShopAppraisalReplay" resultMap="BaseResultMap">
143
+    select * from tp_shop_appraisal_replay WHERE community_id = #{communityId,jdbcType=INTEGER} and shop_appraisal_id = #{id,jdbcType=INTEGER}
144
+  </select>
145
+</mapper>

+ 51
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml View File

@@ -276,4 +276,55 @@
276 276
      and ticket_title= #{ticketTitle,jdbcType=INTEGER}
277 277
      and type = #{type,jdbcType=VARCHAR}
278 278
   </select>
279
+
280
+  <select id="ticketList" resultMap="BaseResultMap">
281
+    select
282
+    id,
283
+    community_id,
284
+    ta_user_id,
285
+    ticket_title,
286
+    ticket_content,
287
+    STATUS,
288
+    repair_type,
289
+    tp_user_id,
290
+    score,
291
+    COMMENT,
292
+    create_user,
293
+    create_date,
294
+    update_user,
295
+    update_date,
296
+    (CASE type WHEN 1 THEN '投诉' WHEN 2 THEN '报修' WHEN 3 THEN '联系物业' ELSE	'未知' END) as type
297
+    from tp_ticket
298
+    <where>
299
+      <if test="status == 0 or status == 3 ">
300
+            status = #{status}
301
+      </if>
302
+      <if test="status == 9 ">
303
+        and  `status` NOT in(0,3)
304
+      </if>
305
+      and community_id = #{communityId,jdbcType=INTEGER}
306
+    </where>
307
+  </select>
308
+
309
+  <select id="ticketDetails" resultType="com.community.huiju.vo.TpTicketVO">
310
+        SELECT
311
+        p.id as id,
312
+        p.community_id as communityId,
313
+        p.ta_user_id as taUserId,
314
+        p.ticket_title as  ticketTitle,
315
+        p.ticket_content as ticketContent,
316
+        p.STATUS as STATUS,
317
+        p.type,
318
+        p.repair_type as repairType,
319
+        p.tp_user_id as tpUserId,
320
+        p.score,
321
+        p.COMMENT,
322
+        p.create_user as createUser,
323
+        p.create_date as createDate,
324
+        p.update_user as updateUser,
325
+        p.update_date as updateDate
326
+        FROM
327
+        tp_ticket p
328
+        WHERE p.id=#{id,jdbcType=INTEGER}
329
+    </select>
279 330
 </mapper>

+ 4
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordCommentMapper.xml View File

@@ -180,4 +180,8 @@
180 180
 	create_date DESC
181 181
     LIMIT 1
182 182
   </select>
183
+  <select id="selectList" resultMap="BaseResultMap">
184
+    select * from  tp_ticket_record_comment WHERE ticket_id =#{tickedID} and ticket_record_id = #{recordId}  ;
185
+  </select>
186
+
183 187
 </mapper>

+ 13
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml View File

@@ -141,4 +141,17 @@
141 141
     WHERE ticket_id = #{ticketId,jdbcType=INTEGER}
142 142
           and status = #{status,jdbcType=INTEGER}
143 143
 </select>
144
+
145
+  <select id="selectListTicketStatus" resultMap="BaseResultMap">
146
+    select * from tp_ticket_record
147
+    where ticket_id = #{tickedID,jdbcType=INTEGER}
148
+  </select>
149
+
150
+  <select id="statusName" resultType="string">
151
+        SELECT
152
+       name
153
+        FROM sys_dictionary
154
+        WHERE code= #{status,jdbcType=INTEGER}
155
+          and group_id = 1
156
+    </select>
144 157
 </mapper>

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

@@ -10,6 +10,7 @@
10 10
         <result column="transaction_title" property="transactionTitle" jdbcType="VARCHAR"/>
11 11
         <result column="transaction_content" property="transactionContent" jdbcType="VARCHAR"/>
12 12
         <result column="sort" property="sort" jdbcType="VARCHAR"/>
13
+        <result column="read_status" property="readStatus" jdbcType="VARCHAR"/>
13 14
         <result column="view_count" property="viewCount" jdbcType="INTEGER"/>
14 15
         <result column="status" property="status" jdbcType="CHAR"/>
15 16
         <result column="type" property="type" jdbcType="CHAR"/>
@@ -25,7 +26,7 @@
25 26
     </resultMap>
26 27
     <sql id="Base_Column_List">
27 28
     id, community_id, transaction_title, transaction_content, sort,uuid,uuid_type,uuid_name,
28
-    view_count, status, type, create_user, create_date, update_user, update_date, release_identity,room_no_name
29
+    view_count, status, type, create_user, create_date, update_user, update_date, release_identity,room_no_name,read_status
29 30
   </sql>
30 31
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.community.huiju.model.TpTransaction">
31 32
     select
@@ -45,12 +46,12 @@
45 46
       sort,
46 47
       view_count, status,
47 48
       type, create_user, create_date, 
48
-      update_user, update_date,room_no_name)
49
+      update_user, update_date,room_no_name,read_status)
49 50
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER},#{releaseIdentity,jdbcType=VARCHAR},#{taUserVerifyId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER},
50 51
       #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR},
51 52
        #{viewCount,jdbcType=INTEGER}, #{status,jdbcType=CHAR},
52 53
       #{type,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
53
-      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP},#{roomNoName,jdbcType=VARCHAR})
54
+      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP},#{roomNoName,jdbcType=VARCHAR},#{readStatus,jdbcType=VARCHAR})
54 55
   </insert>
55 56
     <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id"
56 57
             parameterType="com.community.huiju.model.TpTransaction">
@@ -110,6 +111,10 @@
110 111
             <if test="roomNoName != null">
111 112
                 room_no_name
112 113
             </if>
114
+            <if test="readStatus != null">
115
+                read_status
116
+            </if>
117
+
113 118
         </trim>
114 119
         <trim prefix="values (" suffix=")" suffixOverrides=",">
115 120
             <if test="id != null">
@@ -166,6 +171,10 @@
166 171
             <if test="roomNoName != null">
167 172
                 #{roomNoName,jdbcType=VARCHAR}
168 173
             </if>
174
+            <if test="readStatus != null">
175
+                #{readStatus,jdbcType=VARCHAR}
176
+            </if>
177
+
169 178
         </trim>
170 179
     </insert>
171 180
     <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpTransaction">
@@ -210,6 +219,9 @@
210 219
             <if test="roomNoName != null">
211 220
                 room_no_name = #{roomNoName,jdbcType=VARCHAR},
212 221
             </if>
222
+            <if test="readStatus != null">
223
+                read_status = #{readStatus,jdbcType=VARCHAR},
224
+            </if>
213 225
 
214 226
         </set>
215 227
         where id = #{id,jdbcType=INTEGER}
@@ -229,6 +241,7 @@
229 241
       update_user = #{updateUser,jdbcType=INTEGER},
230 242
       update_date = #{updateDate,jdbcType=TIMESTAMP},
231 243
       room_no_name = #{roomNoName,jdbcType=VARCHAR}
244
+      read_status = #{readStatus,jdbcType=VARCHAR}
232 245
     where id = #{id,jdbcType=INTEGER}
233 246
   </update>
234 247
 
@@ -317,4 +330,28 @@
317 330
         ORDER BY
318 331
         create_date DESC
319 332
     </select>
333
+
334
+    <select id="tpTransactionManageList" resultMap="BaseResultMap">
335
+        SELECT
336
+        <include refid="Base_Column_List"/>
337
+        FROM tp_transaction
338
+        <where>
339
+            <if test="transactionTitle != null and transactionTitle !=''">
340
+                transaction_title like concat('%',#{ transactionTitle,jdbcType=VARCHAR},'%')
341
+            </if>
342
+
343
+            <if test="ManageStatus == 1">
344
+                and is_reported = 1
345
+            </if>
346
+            <if test="ManageStatus == 2">
347
+                (read_status IS NULL or read_status = 2)
348
+            </if>
349
+            <if test="ManageStatus == 3">
350
+                and  read_status= 1
351
+            </if>
352
+            and community_id=#{communityId,jdbcType=INTEGER}
353
+            and status = 1
354
+        </where>
355
+
356
+    </select>
320 357
 </mapper>

+ 26
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionReportMapper.xml View File

@@ -7,6 +7,7 @@
7 7
     <result column="transaction_id" property="transactionId" jdbcType="INTEGER" />
8 8
     <result column="report_reason_id" property="reportReasonId" jdbcType="VARCHAR" />
9 9
     <result column="reporter_id" property="reporterId" jdbcType="INTEGER" />
10
+    <result column="reportName" property="reportName" jdbcType="VARCHAR" />
10 11
   </resultMap>
11 12
   <sql id="Base_Column_List" >
12 13
     id, community_id, transaction_id, report_reason_id, reporter_id
@@ -100,4 +101,29 @@
100 101
       and community_id = #{communityId,jdbcType=INTEGER}
101 102
       and transaction_id = #{transactionId,jdbcType=INTEGER}
102 103
   </select>
104
+
105
+  <select id="selectCount" resultType="int">
106
+    SELECT COUNT(id) from tp_transaction_report
107
+    WHERE transaction_id = #{id}
108
+    and community_id = #{communityId,jdbcType=INTEGER}
109
+  </select>
110
+
111
+  <select id="transactionReplyList" resultMap="BaseResultMap">
112
+    SELECT
113
+    tr.id,
114
+	tr.community_id,
115
+	tr.transaction_id,
116
+	tr.report_reason_id,
117
+	tr.reporter_id,
118
+	rr.reason as reportName
119
+	from tp_transaction_report tr
120
+    left join sys_report_reason rr on tr.report_reason_id = rr.id
121
+    WHERE tr.transaction_id = #{id}
122
+    and tr.community_id = #{communityId,jdbcType=INTEGER}
123
+  </select>
124
+
125
+  <select id="deleteTransactionReport" parameterType="java.lang.Integer">
126
+    delete from tp_transaction_report
127
+    where transaction_id = #{tpTransactionReportID,jdbcType=INTEGER} and community_id = #{communityId,jdbcType=INTEGER}
128
+  </select>
103 129
 </mapper>

+ 28
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpUserMapper.xml View File

@@ -185,4 +185,32 @@
185 185
       update_date = #{updateDate,jdbcType=TIMESTAMP}
186 186
     where id = #{id,jdbcType=INTEGER}
187 187
   </update>
188
+
189
+  <select id="selectLoginName" resultMap="BaseResultMap">
190
+    select * from tp_user WHERE login_name = #{loginName,jdbcType=VARCHAR} and community_id = #{communityId}
191
+  </select>
192
+
193
+  <select id="selectByIdUserName" parameterType="int" resultType="string">
194
+        SELECT
195
+         user_name
196
+        FROM
197
+        tp_user
198
+        WHERE id=#{id,jdbcType=INTEGER}
199
+    </select>
200
+
201
+  <select id="getUser" resultType="com.community.huiju.model.TpUser">
202
+        SELECT
203
+        tu.create_user,
204
+        tu.create_date,
205
+        tu.update_date,
206
+        tu.user_name,
207
+        tu.remark,
208
+        tu.login_name,
209
+        tu.status,
210
+        tu.id
211
+        FROM
212
+         tp_user tu
213
+        WHERE   tu.community_id=#{communityId,jdbcType=INTEGER}
214
+        and tu.id!=#{id,jdbcType=INTEGER}
215
+    </select>
188 216
 </mapper>