dingxin 6 lat temu
rodzic
commit
01fbe49de8
86 zmienionych plików z 1695 dodań i 709 usunięć
  1. 0
    0
      CODE/logs/resold_admin_.log
  2. 9
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/MessageController.java
  3. 29
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java
  4. 43
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java
  5. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  6. 22
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaSysRoleMapper.java
  7. 22
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaSysUserRoleMapper.java
  8. 2
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivityMapper.java
  9. 1
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivitySignupMapper.java
  10. 2
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpMessageMapper.java
  11. 9
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java
  12. 8
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordCommentMapper.java
  13. 9
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordMapper.java
  14. 4
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java
  15. 75
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaSysRole.java
  16. 43
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaSysUserRole.java
  17. 1
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUser.java
  18. 24
    50
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicket.java
  19. 21
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecord.java
  20. 8
    8
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java
  21. 17
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java
  22. 5
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/MessageServiceI.java
  23. 15
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java
  24. 8
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MessageServiceImpl.java
  25. 109
    20
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java
  26. 57
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java
  27. 43
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/RecordCommentVO.java
  28. 1
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TaUserVO.java
  29. 2
    10
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketInfoVO.java
  30. 43
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketRecordCommentVO.java
  31. 35
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketRecordVO.java
  32. 2
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketVO.java
  33. 124
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaSysRoleMapper.xml
  34. 89
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TaSysUserRoleMapper.xml
  35. 23
    21
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  36. 3
    3
      CODE/smart-community/app-api/src/main/resources/mapper/TpActivityMapper.xml
  37. 11
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml
  38. 26
    63
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml
  39. 23
    12
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordCommentMapper.xml
  40. 19
    2
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml
  41. 7
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml
  42. 28
    0
      CODE/smart-community/app-api/src/test/java/com/community/huiju/DemoApplicationTests.java
  43. 7
    0
      CODE/smart-community/community-common/pom.xml
  44. 14
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java
  45. 11
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/CodeEnum.java
  46. 46
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TaUserVerifyStatusEnum.java
  47. 45
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketRepairTypeEnum.java
  48. 53
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketStatusEnum.java
  49. 42
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketTypeEnum.java
  50. 39
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketUserTypeEnum.java
  51. 24
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/utils/EnumUtils.java
  52. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/Constant.class
  53. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/CodeEnum.class
  54. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TaUserVerifyStatusEnum.class
  55. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketRepairTypeEnum.class
  56. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketStatusEnum.class
  57. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketTypeEnum.class
  58. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketUserTypeEnum.class
  59. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/mode/ResponseBean.class
  60. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/FastJsonSerializer.class
  61. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisConfiguration.class
  62. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisJsonSerializer.class
  63. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisObjectSerializer.class
  64. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisSerializer.class
  65. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisTemplate.class
  66. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/SerializationFailedException.class
  67. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/SingleRedisTemplate.class
  68. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/AccountValidatorUtil.class
  69. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/BeanTools.class
  70. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/CommonUtils.class
  71. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/CookieUtil.class
  72. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/DESUtils.class
  73. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/DateUtils.class
  74. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class
  75. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/HttpClientUtils.class
  76. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/MD5Utils.class
  77. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/QRCodeGeneratorUtils.class
  78. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/StringConverter.class
  79. BIN
      CODE/smart-community/community-common/target/community-common-0.0.1.jar
  80. BIN
      CODE/smart-community/community-common/target/community-common-0.0.1.jar.original
  81. 1
    1
      CODE/smart-community/community-common/target/maven-archiver/pom.properties
  82. 2
    0
      CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  83. 2
    0
      CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  84. 193
    253
      文档/MYSQL/smartCommunity.pdb
  85. 193
    253
      文档/MYSQL/smartCommunity.pdm
  86. BIN
      文档/需求/app接口需求-第二版.xlsx

+ 0
- 0
CODE/logs/resold_admin_.log Wyświetl plik


+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/MessageController.java Wyświetl plik

@@ -70,4 +70,13 @@ public class MessageController {
70 70
 		responseBean.addSuccess(upcomingList);
71 71
 		return responseBean;
72 72
 	}
73
+
74
+	@ApiOperation(value = "消息已读接口", notes = "消息已读接口")
75
+	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id")})
76
+	@RequestMapping(value = "/readStatus/{communityId}",method = RequestMethod.POST)
77
+	public ResponseBean allMessageRead(@PathVariable("communityId") Integer communityId){
78
+		ResponseBean responseBean = new ResponseBean();
79
+		messageService.updateMessageReadStatus(communityId);
80
+		return responseBean;
81
+	}
73 82
 }

+ 29
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Wyświetl plik

@@ -7,6 +7,7 @@ import com.community.huiju.model.TpActivity;
7 7
 import com.community.huiju.model.TpAnnouncement;
8 8
 import com.community.huiju.model.TpMessage;
9 9
 import com.community.huiju.model.TpTransaction;
10
+import com.community.huiju.model.*;
10 11
 import com.community.huiju.service.SocialServiceI;
11 12
 import io.swagger.annotations.Api;
12 13
 import io.swagger.annotations.ApiImplicitParam;
@@ -44,11 +45,12 @@ public class SocialController {
44 45
         return responseBean;
45 46
     }
46 47
 
47
-    @RequestMapping(value = "/sign", method = RequestMethod.GET)
48
+    @RequestMapping(value = "/sign/{communityId}", method = RequestMethod.GET)
48 49
     @ApiOperation(value = "活动报名接口", notes = "活动报名接口")
49
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", dataType = "Long", name = "communityId", value = "小区Id") })
50
-    public ResponseBean SignActivity(@PathVariable(value = "communityId")Integer communityId){
51
-        ResponseBean responseBean = new ResponseBean();
50
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
51
+                         @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动Id")})
52
+    public ResponseBean SignActivity(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId")Integer activityId){
53
+        ResponseBean responseBean = socialServiceI.findTaUserInfo(activityId, communityId);
52 54
         return responseBean;
53 55
     }
54 56
     
@@ -119,4 +121,27 @@ public class SocialController {
119 121
         return responseBean;
120 122
     }
121 123
 
124
+    @ApiOperation(value = "获取所有的二手租赁帖子", notes = "获取所有的二手租赁帖子")
125
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
126
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "type", value = "帖子类型"),
127
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
128
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
129
+    @RequestMapping(value = "/getAllTransaction/{communityId}", method = RequestMethod.GET)
130
+    public ResponseBean getAllPosts(@PathVariable("communityId")Integer communityId, @RequestParam("type") String type,
131
+                                    @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
132
+                                    @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
133
+        ResponseBean responseBean = new ResponseBean();
134
+        List<TpTransaction> tpTransactions = socialServiceI.findAllTransaction(communityId, type, pageNum, pageSize);
135
+        responseBean.addSuccess(tpTransactions);
136
+        return responseBean;
137
+    }
138
+
139
+    @ApiOperation(value = "报修进度终止", notes = "报修进度终止")
140
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
141
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "帖子Id")})
142
+    @RequestMapping(value = "/stopTicket/{communityId}", method = RequestMethod.GET)
143
+    public ResponseBean stopTicket(@PathVariable("communityId")Integer communityId, @RequestParam("ticketId")Integer ticketId){
144
+        ResponseBean responseBean = socialServiceI.stopTpTicketRecord(communityId, ticketId);
145
+        return responseBean;
146
+    }
122 147
 }

+ 43
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java Wyświetl plik

@@ -10,11 +10,13 @@ import io.swagger.annotations.Api;
10 10
 import io.swagger.annotations.ApiImplicitParam;
11 11
 import io.swagger.annotations.ApiImplicitParams;
12 12
 import io.swagger.annotations.ApiOperation;
13
+import lombok.val;
13 14
 import org.springframework.beans.factory.annotation.Autowired;
14 15
 import org.springframework.cloud.context.config.annotation.RefreshScope;
15 16
 import org.springframework.web.bind.annotation.*;
16 17
 
17 18
 import javax.servlet.http.HttpSession;
19
+import java.util.List;
18 20
 
19 21
 @RestController
20 22
 @RefreshScope
@@ -47,5 +49,46 @@ public class TicketController {
47 49
         response = iTicketService.getList(tpTicket,pageNum,pageSize);
48 50
         return response;
49 51
     }
52
+    
53
+    @ApiOperation(value = "获取报修/投诉/联系单进度详情数据",notes = "获取报修/投诉/联系单进度详情数据")
54
+    @ApiImplicitParams({
55
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区编号"),
56
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "ticketId",value = "报修id")
57
+    })
58
+    @RequestMapping(value = "/ticket/schedule/{communityId}", method = RequestMethod.GET)
59
+    public ResponseBean getTicketSchedule(@PathVariable(value = "communityId") String communityId,@RequestParam Integer ticketId){
60
+        ResponseBean responseBean = new ResponseBean();
61
+        TpTicket ticket = iTicketService.getTicketSchedule(communityId,ticketId);
62
+        responseBean.addSuccess(ticket);
63
+        return responseBean;
64
+    }
65
+    
66
+    @RequestMapping(value = "/tickets/list/{communityId}", method = RequestMethod.GET)
67
+    @ApiOperation(value = "获取 报修/投诉/联系单 数据列表", notes = "根据 小区编号,工单类型,第几页,一页多少行")
68
+    @ApiImplicitParams({
69
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId", value = "小区编号"),
70
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum", value = "第几页"),
71
+            @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
72
+            @ApiImplicitParam(paramType = "path",dataType = "String",name = "type", value = "工单类型 (0报修/1投诉/2联系单)"),
73
+    })
74
+    public ResponseBean getServiceList(@PathVariable(value = "communityId") String communityId,
75
+                                       @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,
76
+                                       @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
77
+                                       @RequestParam(value = "type") String type,
78
+                                       HttpSession session) {
79
+        ResponseBean responseBean = new ResponseBean();
80
+
81
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
82
+
83
+        TpTicket tpTicket = new TpTicket();
84
+        tpTicket.setCommunityId(Integer.valueOf(communityId));
85
+        tpTicket.setTaUserId(userElement.getId());
86
+        tpTicket.setType(type);
87
+
88
+        responseBean = iTicketService.getByTypeList(tpTicket,pageNum,pageSize);
89
+
90
+        return responseBean;
91
+
92
+    }
50 93
 
51 94
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Wyświetl plik

@@ -33,7 +33,7 @@ public class UserController {
33 33
     @Autowired
34 34
     private ITaUserService iTaUserService;
35 35
 
36
-    @ApiOperation(value = "登录", notes = "根据登录名和码")
36
+    @ApiOperation(value = "登录", notes = "根据登录名和验证码")
37 37
     @ApiImplicitParams({
38 38
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区"),
39 39
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "loginName",value = "登陆名(手机号)"),

+ 22
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaSysRoleMapper.java Wyświetl plik

@@ -0,0 +1,22 @@
1
+package com.community.huiju.dao;
2
+
3
+
4
+import com.community.huiju.model.TaSysRole;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+@Mapper
8
+public interface TaSysRoleMapper {
9
+    int deleteByPrimaryKey(Integer id);
10
+
11
+    int insert(TaSysRole record);
12
+
13
+    int insertSelective(TaSysRole record);
14
+
15
+    TaSysRole selectByPrimaryKey(Integer id);
16
+
17
+    int updateByPrimaryKeySelective(TaSysRole record);
18
+
19
+    int updateByPrimaryKey(TaSysRole record);
20
+
21
+    TaSysRole findRoleByUserId(Integer userId);
22
+}

+ 22
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaSysUserRoleMapper.java Wyświetl plik

@@ -0,0 +1,22 @@
1
+package com.community.huiju.dao;
2
+
3
+
4
+import com.community.huiju.model.TaSysUserRole;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+@Mapper
8
+public interface TaSysUserRoleMapper {
9
+    int deleteByPrimaryKey(Integer id);
10
+
11
+    int insert(TaSysUserRole record);
12
+
13
+    int insertSelective(TaSysUserRole record);
14
+
15
+    TaSysUserRole selectByPrimaryKey(Integer id);
16
+
17
+    int updateByPrimaryKeySelective(TaSysUserRole record);
18
+
19
+    int updateByPrimaryKey(TaSysUserRole record);
20
+
21
+    Integer findSysUserRoleByUserIdAndRoleId(Integer userId);
22
+}

+ 2
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivityMapper.java Wyświetl plik

@@ -9,13 +9,14 @@ import java.util.List;
9 9
 
10 10
 @Mapper
11 11
 public interface TpActivityMapper {
12
+
12 13
     int deleteByPrimaryKey(Integer id);
13 14
 
14 15
     int insert(TpActivity record);
15 16
 
16 17
     int insertSelective(TpActivity record);
17 18
 
18
-    TpActivity selectByPrimaryKey(@Param("id") Integer id,@Param("communityId") Integer communityId);
19
+    TpActivity selectByPrimaryKey(@Param("id") Integer id, @Param("communityId") Integer communityId);
19 20
 
20 21
     int updateByPrimaryKeySelective(TpActivity record);
21 22
 

+ 1
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivitySignupMapper.java Wyświetl plik

@@ -4,6 +4,7 @@ package com.community.huiju.dao;
4 4
 import com.community.huiju.model.TpActivitySignup;
5 5
 import org.apache.ibatis.annotations.Mapper;
6 6
 import org.apache.ibatis.annotations.Param;
7
+
7 8
 @Mapper
8 9
 public interface TpActivitySignupMapper {
9 10
     int deleteByPrimaryKey(Integer id);

+ 2
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpMessageMapper.java Wyświetl plik

@@ -24,4 +24,6 @@ public interface TpMessageMapper {
24 24
     Map<String, Object> getMessageTotal(@Param(value = "userId") Integer userId,@Param(value = "communityId") Integer communityId);
25 25
     
26 26
     List<TpMessage> getMessages(@Param(value = "userId") Integer userId,@Param(value = "communityId") Integer communityId, @Param(value = "modelType") Integer modelType);
27
+
28
+    void updateReadStatus(Integer communityId);
27 29
 }

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java Wyświetl plik

@@ -2,6 +2,7 @@ package com.community.huiju.dao;
2 2
 
3 3
 import com.community.huiju.model.TpTicket;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
5 6
 
6 7
 import java.util.List;
7 8
 import java.util.Map;
@@ -26,4 +27,12 @@ public interface TpTicketMapper {
26 27
      * @return
27 28
      */
28 29
     List<TpTicket> selectByCommuniytIdAndByTaUserIdAndByType(Map map);
30
+    
31
+    /**
32
+     * 获取报修进度
33
+     * @param communityId
34
+     * @param ticketId
35
+     * @return
36
+     */
37
+	TpTicket selectByTicketId(@Param("communityId") String communityId,@Param("ticketId") Integer ticketId);
29 38
 }

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordCommentMapper.java Wyświetl plik

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.dao;
2 2
 
3
+import com.community.huiju.model.TpTicketRecord;
3 4
 import com.community.huiju.model.TpTicketRecordComment;
4 5
 import org.apache.ibatis.annotations.Mapper;
5 6
 
@@ -30,4 +31,11 @@ public interface TpTicketRecordCommentMapper {
30 31
      * @return
31 32
      */
32 33
     List<TpTicketRecordComment> selectByTicketId(Map map);
34
+    
35
+    /**
36
+     * 查询出这个处理撞他下所有的回复数据
37
+     * @param tpTicketRecord
38
+     * @return
39
+     */
40
+	List<TpTicketRecordComment> selectByTicketRecordId(TpTicketRecord tpTicketRecord);
33 41
 }

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordMapper.java Wyświetl plik

@@ -2,6 +2,12 @@ package com.community.huiju.dao;
2 2
 
3 3
 import com.community.huiju.model.TpTicketRecord;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
8
+
9
+import java.util.List;
10
+import java.util.Map;
5 11
 
6 12
 @Mapper
7 13
 public interface TpTicketRecordMapper {
@@ -16,4 +22,7 @@ public interface TpTicketRecordMapper {
16 22
     int updateByPrimaryKeySelective(TpTicketRecord record);
17 23
 
18 24
     int updateByPrimaryKey(TpTicketRecord record);
25
+
26
+	List<TpTicketRecord> getTicketRecordByTicketId(@Param("communityId") String communityId,@Param("ticketId") Integer ticketId);
27
+
19 28
 }

+ 4
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java Wyświetl plik

@@ -4,6 +4,8 @@ import com.community.huiju.model.TpTransaction;
4 4
 import org.apache.ibatis.annotations.Mapper;
5 5
 import org.apache.ibatis.annotations.Param;
6 6
 
7
+import java.util.List;
8
+
7 9
 @Mapper
8 10
 public interface TpTransactionMapper {
9 11
     int deleteByPrimaryKey(Integer id);
@@ -17,4 +19,6 @@ public interface TpTransactionMapper {
17 19
     int updateByPrimaryKeySelective(TpTransaction record);
18 20
 
19 21
     int updateByPrimaryKey(TpTransaction record);
22
+
23
+    List<TpTransaction> findAllTransaction(@Param("communityId") Integer communityId, @Param("type") String type);
20 24
 }

+ 75
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaSysRole.java Wyświetl plik

@@ -0,0 +1,75 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TaSysRole {
6
+    private Integer id;
7
+
8
+    private String roleName;
9
+
10
+    private String description;
11
+
12
+    private Integer createUser;
13
+
14
+    private Date createDate;
15
+
16
+    private Integer updateUser;
17
+
18
+    private Date updateDate;
19
+
20
+    public Integer getId() {
21
+        return id;
22
+    }
23
+
24
+    public void setId(Integer id) {
25
+        this.id = id;
26
+    }
27
+
28
+    public String getRoleName() {
29
+        return roleName;
30
+    }
31
+
32
+    public void setRoleName(String roleName) {
33
+        this.roleName = roleName == null ? null : roleName.trim();
34
+    }
35
+
36
+    public String getDescription() {
37
+        return description;
38
+    }
39
+
40
+    public void setDescription(String description) {
41
+        this.description = description == null ? null : description.trim();
42
+    }
43
+
44
+    public Integer getCreateUser() {
45
+        return createUser;
46
+    }
47
+
48
+    public void setCreateUser(Integer createUser) {
49
+        this.createUser = createUser;
50
+    }
51
+
52
+    public Date getCreateDate() {
53
+        return createDate;
54
+    }
55
+
56
+    public void setCreateDate(Date createDate) {
57
+        this.createDate = createDate;
58
+    }
59
+
60
+    public Integer getUpdateUser() {
61
+        return updateUser;
62
+    }
63
+
64
+    public void setUpdateUser(Integer updateUser) {
65
+        this.updateUser = updateUser;
66
+    }
67
+
68
+    public Date getUpdateDate() {
69
+        return updateDate;
70
+    }
71
+
72
+    public void setUpdateDate(Date updateDate) {
73
+        this.updateDate = updateDate;
74
+    }
75
+}

+ 43
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaSysUserRole.java Wyświetl plik

@@ -0,0 +1,43 @@
1
+package com.community.huiju.model;
2
+
3
+public class TaSysUserRole {
4
+    private Integer id;
5
+
6
+    private Integer communityId;
7
+
8
+    private Integer userId;
9
+
10
+    private Integer roleId;
11
+
12
+    public Integer getId() {
13
+        return id;
14
+    }
15
+
16
+    public void setId(Integer id) {
17
+        this.id = id;
18
+    }
19
+
20
+    public Integer getCommunityId() {
21
+        return communityId;
22
+    }
23
+
24
+    public void setCommunityId(Integer communityId) {
25
+        this.communityId = communityId;
26
+    }
27
+
28
+    public Integer getUserId() {
29
+        return userId;
30
+    }
31
+
32
+    public void setUserId(Integer userId) {
33
+        this.userId = userId;
34
+    }
35
+
36
+    public Integer getRoleId() {
37
+        return roleId;
38
+    }
39
+
40
+    public void setRoleId(Integer roleId) {
41
+        this.roleId = roleId;
42
+    }
43
+}

+ 1
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TaUser.java Wyświetl plik

@@ -1,6 +1,5 @@
1 1
 package com.community.huiju.model;
2 2
 
3
-
4 3
 import java.util.Date;
5 4
 
6 5
 public class TaUser {
@@ -149,7 +148,7 @@ public class TaUser {
149 148
     }
150 149
 
151 150
     public void setVerifyStatus(String verifyStatus) {
152
-        this.verifyStatus = verifyStatus;
151
+        this.verifyStatus = verifyStatus == null ? null : verifyStatus.trim();
153 152
     }
154 153
 
155 154
     public Integer getCreateUser() {

+ 24
- 50
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicket.java Wyświetl plik

@@ -1,6 +1,7 @@
1 1
 package com.community.huiju.model;
2 2
 
3 3
 import java.util.Date;
4
+import java.util.List;
4 5
 
5 6
 public class TpTicket {
6 7
     private Integer id;
@@ -18,16 +19,11 @@ public class TpTicket {
18 19
     private String type;
19 20
 
20 21
     private String repairType;
21
-
22
-    private String ticketMatchImg1;
23
-
24
-    private String ticketMatchImg2;
25
-
26
-    private String ticketMatchImg3;
27
-
28
-    private String ticketMatchImg4;
29
-
30
-    private String ticketMatchImg5;
22
+    
23
+    /**
24
+     * 报修类型的名字
25
+     */
26
+    private String repairName;
31 27
 
32 28
     private Integer tpUserId;
33 29
 
@@ -42,6 +38,8 @@ public class TpTicket {
42 38
     private Integer updateUser;
43 39
 
44 40
     private Date updateDate;
41
+    
42
+    private List<TpTicketRecord> ticketRecordList;
45 43
 
46 44
     public Integer getId() {
47 45
         return id;
@@ -107,46 +105,6 @@ public class TpTicket {
107 105
         this.repairType = repairType == null ? null : repairType.trim();
108 106
     }
109 107
 
110
-    public String getTicketMatchImg1() {
111
-        return ticketMatchImg1;
112
-    }
113
-
114
-    public void setTicketMatchImg1(String ticketMatchImg1) {
115
-        this.ticketMatchImg1 = ticketMatchImg1 == null ? null : ticketMatchImg1.trim();
116
-    }
117
-
118
-    public String getTicketMatchImg2() {
119
-        return ticketMatchImg2;
120
-    }
121
-
122
-    public void setTicketMatchImg2(String ticketMatchImg2) {
123
-        this.ticketMatchImg2 = ticketMatchImg2 == null ? null : ticketMatchImg2.trim();
124
-    }
125
-
126
-    public String getTicketMatchImg3() {
127
-        return ticketMatchImg3;
128
-    }
129
-
130
-    public void setTicketMatchImg3(String ticketMatchImg3) {
131
-        this.ticketMatchImg3 = ticketMatchImg3 == null ? null : ticketMatchImg3.trim();
132
-    }
133
-
134
-    public String getTicketMatchImg4() {
135
-        return ticketMatchImg4;
136
-    }
137
-
138
-    public void setTicketMatchImg4(String ticketMatchImg4) {
139
-        this.ticketMatchImg4 = ticketMatchImg4 == null ? null : ticketMatchImg4.trim();
140
-    }
141
-
142
-    public String getTicketMatchImg5() {
143
-        return ticketMatchImg5;
144
-    }
145
-
146
-    public void setTicketMatchImg5(String ticketMatchImg5) {
147
-        this.ticketMatchImg5 = ticketMatchImg5 == null ? null : ticketMatchImg5.trim();
148
-    }
149
-
150 108
     public Integer getTpUserId() {
151 109
         return tpUserId;
152 110
     }
@@ -202,4 +160,20 @@ public class TpTicket {
202 160
     public void setUpdateDate(Date updateDate) {
203 161
         this.updateDate = updateDate;
204 162
     }
163
+    
164
+    public String getRepairName() {
165
+        return repairName;
166
+    }
167
+    
168
+    public void setRepairName(String repairName) {
169
+        this.repairName = repairName;
170
+    }
171
+    
172
+    public List<TpTicketRecord> getTicketRecordList() {
173
+        return ticketRecordList;
174
+    }
175
+    
176
+    public void setTicketRecordList(List<TpTicketRecord> ticketRecordList) {
177
+        this.ticketRecordList = ticketRecordList;
178
+    }
205 179
 }

+ 21
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecord.java Wyświetl plik

@@ -1,6 +1,7 @@
1 1
 package com.community.huiju.model;
2 2
 
3 3
 import java.util.Date;
4
+import java.util.List;
4 5
 
5 6
 public class TpTicketRecord {
6 7
     private Integer id;
@@ -10,10 +11,14 @@ public class TpTicketRecord {
10 11
     private Integer ticketId;
11 12
 
12 13
     private String status;
14
+    
15
+    private String ticketStatusName;
13 16
 
14 17
     private Integer createUser;
15 18
 
16 19
     private Date createDate;
20
+    
21
+    private List<TpTicketRecordComment> ticketRecordCommentList;
17 22
 
18 23
     public Integer getId() {
19 24
         return id;
@@ -62,4 +67,20 @@ public class TpTicketRecord {
62 67
     public void setCreateDate(Date createDate) {
63 68
         this.createDate = createDate;
64 69
     }
70
+    
71
+    public String getTicketStatusName() {
72
+        return ticketStatusName;
73
+    }
74
+    
75
+    public void setTicketStatusName(String ticketStatusName) {
76
+        this.ticketStatusName = ticketStatusName;
77
+    }
78
+    
79
+    public List<TpTicketRecordComment> getTicketRecordCommentList() {
80
+        return ticketRecordCommentList;
81
+    }
82
+    
83
+    public void setTicketRecordCommentList(List<TpTicketRecordComment> ticketRecordCommentList) {
84
+        this.ticketRecordCommentList = ticketRecordCommentList;
85
+    }
65 86
 }

+ 8
- 8
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java Wyświetl plik

@@ -7,7 +7,7 @@ public class TpTicketRecordComment {
7 7
 
8 8
     private Integer communityId;
9 9
 
10
-    private Integer tickerId;
10
+    private Integer ticketId;
11 11
 
12 12
     private Integer ticketRecordId;
13 13
 
@@ -38,15 +38,15 @@ public class TpTicketRecordComment {
38 38
     public void setCommunityId(Integer communityId) {
39 39
         this.communityId = communityId;
40 40
     }
41
-
42
-    public Integer getTickerId() {
43
-        return tickerId;
41
+    
42
+    public Integer getTicketId() {
43
+        return ticketId;
44 44
     }
45
-
46
-    public void setTickerId(Integer tickerId) {
47
-        this.tickerId = tickerId;
45
+    
46
+    public void setTicketId(Integer ticketId) {
47
+        this.ticketId = ticketId;
48 48
     }
49
-
49
+    
50 50
     public Integer getTicketRecordId() {
51 51
         return ticketRecordId;
52 52
     }

+ 17
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java Wyświetl plik

@@ -17,9 +17,24 @@ public interface ITicketService {
17 17
      * @param tpTicket
18 18
      * @param pageCode
19 19
      * @param pageSize
20
-     * @return
20
+     * @return 返回 维修/投诉/联系单 各 pageSize 条
21 21
      */
22 22
     ResponseBean getList(TpTicket tpTicket,Integer pageCode, Integer pageSize);
23 23
 
24
-
24
+    /**
25
+     * 根据 小区ID 用户ID 类型 查询数据
26
+     * @param tpTicket
27
+     * @param pageNum
28
+     * @param pageSize
29
+     * @return 返回 维修/投诉/联系单 记录列表
30
+     */
31
+    ResponseBean getByTypeList(TpTicket tpTicket,Integer pageNum, Integer pageSize);
32
+	
33
+	/**
34
+	 * 获取报修详情
35
+	 * @param communityId
36
+	 * @param ticketId
37
+	 * @return
38
+	 */
39
+	TpTicket getTicketSchedule(String communityId, Integer ticketId);
25 40
 }

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/MessageServiceI.java Wyświetl plik

@@ -22,4 +22,9 @@ public interface MessageServiceI {
22 22
 	 * @return
23 23
 	 */
24 24
 	List<TpMessage> getMessages(Integer communityId, Integer pageNum, Integer pageSize,Integer modelType);
25
+
26
+	/**
27
+	 * 全部已读
28
+	 */
29
+	void updateMessageReadStatus(Integer communityId);
25 30
 }

+ 15
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java Wyświetl plik

@@ -58,4 +58,19 @@ public interface SocialServiceI {
58 58
 	 * @return
59 59
 	 */
60 60
 	TpTransaction findUsedDetails(Integer activityId, Integer communityId, Integer userId);
61
+	/**
62
+	 * 获取所有的交易帖子
63
+	 * @param communityId
64
+	 * @param type
65
+	 * @return
66
+	 */
67
+	List<TpTransaction> findAllTransaction(Integer communityId, String type, Integer pageNum, Integer paeSize);
68
+
69
+	/**
70
+	 * 终止报修
71
+	 * @param communityId
72
+	 * @param ticketId
73
+	 * @return
74
+	 */
75
+	ResponseBean stopTpTicketRecord(Integer communityId, Integer ticketId);
61 76
 }

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MessageServiceImpl.java Wyświetl plik

@@ -50,4 +50,12 @@ public class MessageServiceImpl implements MessageServiceI {
50 50
 		List<TpMessage> messageList = tpMessageMapper.getMessages(userId,communityId, modelType);
51 51
 		return messageList;
52 52
 	}
53
+
54
+	/**
55
+	 * 消息全部已读
56
+	 */
57
+	@Override
58
+	public void updateMessageReadStatus(Integer communityId) {
59
+		tpMessageMapper.updateReadStatus(communityId);
60
+	}
53 61
 }

+ 109
- 20
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Wyświetl plik

@@ -38,7 +38,24 @@ public class SocialServiceImpl implements SocialServiceI {
38 38
 
39 39
     @Autowired
40 40
     private TpTransactionMapper tpTransactionMapper;
41
-    
41
+
42
+    private TaSysRoleMapper taSysRoleMapper;
43
+
44
+    @Autowired
45
+    private TaUserMapper taUserMapper;
46
+
47
+    @Autowired
48
+    private  TaSysUserRoleMapper taSysUserRoleMapper;
49
+
50
+    @Autowired
51
+    private TpTransactionMapper tpTransactionMapper;
52
+
53
+    @Autowired
54
+    private TpTicketRecordMapper tpTicketRecordMapper;
55
+
56
+    @Autowired
57
+    private TpTicketMapper tpTicketMapper;
58
+
42 59
     @Override
43 60
     @Transactional
44 61
     public TpAnnouncement findAnnouncementDetail(Integer id, Integer communityId) {
@@ -147,25 +164,97 @@ public class SocialServiceImpl implements SocialServiceI {
147 164
     }
148 165
 
149 166
     @Override
150
-    public ResponseBean findTaUserInfo(Integer id, Integer communityId) {
151
-//        ResponseBean responseBean = new ResponseBean();
152
-//        TpActivity tpActivity = tpActivityMapper.selectByPrimaryKey(id);
153
-//        //判断是否已经过了报名截至时间
154
-//        Date registrEndTime = tpActivity.getRegistrationEndTime();
155
-//        if (registrEndTime.compareTo(new Date()) < 0){
156
-//            return responseBean.addError("9999", "已过报名截止时间");
157
-//        }
158
-//
159
-//        //报名是否超过人数上限
160
-//        Integer signUpNum = tpActivitySignupMapper.sumActivitySignUpNum(id, communityId);
161
-//        if (signUpNum > tpActivity.getSignUpMax()){
162
-//            return responseBean.addError("9998", "报名人数已满");
163
-//        }
164
-//
165
-//        //已登陆,身份未知,状态未知
166
-//
167
-//        //身份为业主,状态为已停用
168
-        return null;
167
+    public ResponseBean findTaUserInfo(Integer activityId, Integer communityId) {
168
+        ResponseBean responseBean = new ResponseBean();
169
+        TpActivity tpActivity = tpActivityMapper.selectByPrimaryKey(activityId, communityId);
170
+        //判断是否已经过了报名截至时间
171
+        Date registrEndTime = tpActivity.getRegistrationEndTime();
172
+        if (registrEndTime.compareTo(new Date()) < 0){
173
+             responseBean.addError("9997", "已过报名截止时间");
174
+             return responseBean;
175
+        }
176
+
177
+        //报名是否超过人数上限
178
+        Integer signUpNum = tpActivitySignupMapper.sumActivitySignUpNum(activityId, communityId);
179
+        if (signUpNum > tpActivity.getSignUpMax()){
180
+            responseBean.addError("9998", "报名人数已满");
181
+            return responseBean;
182
+        }
183
+
184
+        //已登陆,身份未知,状态未知
185
+
186
+
187
+
188
+        //判断身份是否为业主且状态为已停用
189
+        //从seession中获取的user_id
190
+        //TODO
191
+        TaSysRole sysRole = taSysRoleMapper.findRoleByUserId(1);
192
+        TaUser taUser = taUserMapper.selectByPrimaryKey(1);
193
+        if (Constant.INVALID.equals(taUser.getStatus())
194
+            && Constant.OWNER.equals(sysRole.getRoleName())){
195
+
196
+            return insertActivitySignUp(tpActivity, communityId);
197
+        }
198
+
199
+        //身份为家属租客,状态为已停用
200
+        if (Constant.INVALID.equals(taUser.getStatus())
201
+            && (Constant.FAMILYMEMBER.equals(sysRole.getRoleName())) || Constant.TENANT.equals(sysRole.getRoleName())){
202
+
203
+            return insertActivitySignUp(tpActivity, communityId);
204
+        }
205
+
206
+        if (Constant.EFFECTIVE.equals(taUser.getStatus())
207
+                && (Constant.FAMILYMEMBER.equals(sysRole.getRoleName()))
208
+                || Constant.TENANT.equals(sysRole.getRoleName())
209
+                || Constant.OWNER.equals(sysRole.getRoleName())){
210
+            return insertActivitySignUp(tpActivity, communityId);
211
+        }
212
+        responseBean.addError("9999", "服务器异常");
213
+        return responseBean;
214
+    }
215
+
216
+    @Override
217
+    public List<TpTransaction> findAllTransaction(Integer communityId, String type, Integer pageNum, Integer paeSize) {
218
+        PageHelper.startPage(pageNum, paeSize);
219
+        return tpTransactionMapper.findAllTransaction(communityId, type);
220
+    }
221
+
222
+    @Transactional
223
+    @Override
224
+    public ResponseBean stopTpTicketRecord(Integer communityId, Integer ticketId) {
225
+        ResponseBean responseBean = new ResponseBean();
226
+        try{
227
+            TpTicket tpTicket = new TpTicket();
228
+            tpTicket.setStatus("6");
229
+            tpTicket.setId(ticketId);
230
+            tpTicketMapper.updateByPrimaryKeySelective(tpTicket);
231
+
232
+            TpTicketRecord tpTicketRecord = new TpTicketRecord();
233
+            tpTicketRecord.setStatus("6");
234
+            tpTicketRecord.setTicketId(ticketId);
235
+            tpTicketRecord.setCommunityId(communityId);
236
+            //TODO
237
+            tpTicketRecord.setCreateUser(1);
238
+            tpTicketRecord.setCreateDate(new Date());
239
+            tpTicketRecordMapper.insertSelective(tpTicketRecord);
240
+            return responseBean;
241
+        }catch(Exception e){
242
+            e.printStackTrace();
243
+            responseBean.addError("服务器异常");
244
+            return responseBean;
245
+        }
246
+    }
247
+
248
+    public ResponseBean insertActivitySignUp(TpActivity tpActivity, Integer communityId){
249
+        ResponseBean responseBean = new ResponseBean();
250
+        TpActivitySignup tpActivitySignup = new TpActivitySignup();
251
+        tpActivitySignup.setActivityId(tpActivity.getId());
252
+        tpActivitySignup.setCommunityId(communityId);
253
+        tpActivitySignup.setTaUserId(1);
254
+        tpActivitySignup.setSignUpTime(new Date());
255
+        tpActivitySignupMapper.insertSelective(tpActivitySignup);
256
+        responseBean.addSuccess("报名成功");
257
+        return responseBean;
169 258
     }
170 259
 
171 260
     @Override

+ 57
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java Wyświetl plik

@@ -1,11 +1,20 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.community.commom.constant.enums.TicketStatusEnum;
4
+import com.community.commom.constant.enums.TicketTypeEnum;
5
+import com.community.commom.constant.enums.TicketUserTypeEnum;
3 6
 import com.community.commom.mode.ResponseBean;
7
+import com.community.commom.utils.EnumUtils;
4 8
 import com.community.huiju.dao.TpTicketMapper;
5 9
 import com.community.huiju.dao.TpTicketRecordCommentMapper;
10
+import com.community.huiju.dao.TpTicketRecordMapper;
6 11
 import com.community.huiju.model.TpTicket;
12
+import com.community.huiju.model.TpTicketRecord;
7 13
 import com.community.huiju.model.TpTicketRecordComment;
8 14
 import com.community.huiju.service.ITicketService;
15
+import com.community.huiju.vo.RecordCommentVO;
16
+import com.community.huiju.vo.TpTicketRecordCommentVO;
17
+import com.community.huiju.vo.TpTicketRecordVO;
9 18
 import com.community.huiju.vo.TpTicketVO;
10 19
 import com.github.pagehelper.PageHelper;
11 20
 import com.google.common.collect.Lists;
@@ -17,6 +26,7 @@ import org.springframework.stereotype.Service;
17 26
 
18 27
 import java.util.List;
19 28
 import java.util.Map;
29
+import java.util.stream.Collectors;
20 30
 
21 31
 /**
22 32
  * 工单业务 实现
@@ -28,6 +38,9 @@ public class TicketServiceImpl implements ITicketService {
28 38
 
29 39
     @Autowired
30 40
     private TpTicketMapper tpTicketMapper;
41
+    
42
+    @Autowired
43
+    private TpTicketRecordMapper tpTicketRecordMapper;
31 44
 
32 45
     @Autowired
33 46
     private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
@@ -42,10 +55,9 @@ public class TicketServiceImpl implements ITicketService {
42 55
         Map<String,Object> parameter = Maps.newHashMap();
43 56
         parameter.put("communityId",tpTicket.getCommunityId());
44 57
         parameter.put("taUserId",tpTicket.getTaUserId());
58
+
45 59
         //  0 代表 报修  1 代表 投诉  2代表 联系单
46 60
         parameter.put("type",0);
47
-
48
-
49 61
         // 报修
50 62
         PageHelper.startPage(pageNum,pageSize);
51 63
         List<TpTicket> tpTicketRepairsList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
@@ -116,4 +128,47 @@ public class TicketServiceImpl implements ITicketService {
116 128
         });
117 129
     }
118 130
 
131
+    @Override
132
+    public ResponseBean getByTypeList(TpTicket tpTicket, Integer pageNum, Integer pageSize) {
133
+
134
+        ResponseBean response = new ResponseBean();
135
+
136
+        Map<String,Object> parameter = Maps.newHashMap();
137
+        parameter.put("communityId",tpTicket.getCommunityId());
138
+        parameter.put("taUserId",tpTicket.getTaUserId());
139
+
140
+        //  0 代表 报修  1 代表 投诉  2代表 联系单
141
+        parameter.put("type",tpTicket.getType());
142
+
143
+        PageHelper.startPage(pageNum,pageSize);
144
+        List<TpTicket> tpTicketList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
145
+
146
+        List<TpTicketVO> tpTicketVOList = Lists.newArrayList();
147
+        tpTicketVOConvert(tpTicketList,tpTicketVOList);
148
+
149
+        response.addSuccess(tpTicketVOList);
150
+
151
+        return response;
152
+    }
153
+    
154
+    /**
155
+     * 获取报修详情
156
+     * @param communityId
157
+     * @param ticketId
158
+     * @return
159
+     */
160
+    @Override
161
+    public TpTicket getTicketSchedule(String communityId, Integer ticketId) {
162
+        //查看工单详情
163
+        TpTicket ticket = tpTicketMapper.selectByTicketId(communityId,ticketId);
164
+        //工单进度
165
+        List<TpTicketRecord> ticketRecordList = tpTicketRecordMapper.getTicketRecordByTicketId(communityId,ticketId);
166
+        //工单回复
167
+        ticketRecordList.stream().forEach(TpTicketRecord -> {
168
+            List<TpTicketRecordComment> ticketRecordCommentList = tpTicketRecordCommentMapper.selectByTicketRecordId(TpTicketRecord);
169
+            TpTicketRecord.setTicketRecordCommentList(ticketRecordCommentList);
170
+         });
171
+        ticket.setTicketRecordList(ticketRecordList);
172
+        return ticket;
173
+    }
119 174
 }

+ 43
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/RecordCommentVO.java Wyświetl plik

@@ -0,0 +1,43 @@
1
+package com.community.huiju.vo;
2
+
3
+import com.community.commom.constant.enums.TicketUserTypeEnum;
4
+import lombok.AllArgsConstructor;
5
+import lombok.Data;
6
+import lombok.NoArgsConstructor;
7
+
8
+import java.util.Date;
9
+
10
+/**
11
+ * 工单处理
12
+ *
13
+ *     回复/追问 数据
14
+ *
15
+ * @author weiximei
16
+ */
17
+@Data
18
+@AllArgsConstructor
19
+@NoArgsConstructor
20
+public class RecordCommentVO {
21
+
22
+    /** 编号 **/
23
+    private Integer id;
24
+
25
+    /** 追问人id(tp_user_id也就是物业用户)  或者是 发起人id(ta_user_id也就是住户app的id) **/
26
+    private Integer uuid;
27
+
28
+    /** 对应上面 uuid 的 用户姓名 **/
29
+    private String userName;
30
+
31
+    /** 用户类型 追问人/发起人 **/
32
+    private String userType;
33
+
34
+    /** 追问内容 或者 回复记录 **/
35
+    private String content;
36
+
37
+    /** 回复的是哪一条记录, 0表示当前(比如 待分配 等状态)状态下第一条 **/
38
+    private Integer parentId;
39
+
40
+    /** 创建时间 **/
41
+    private Date createDate;
42
+
43
+}

+ 1
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TaUserVO.java Wyświetl plik

@@ -5,6 +5,7 @@ import lombok.Data;
5 5
 import lombok.NoArgsConstructor;
6 6
 
7 7
 /**
8
+ * 用户数据
8 9
  * @author weiximei
9 10
  */
10 11
 @Data

+ 2
- 10
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketInfoVO.java Wyświetl plik

@@ -7,6 +7,8 @@ import lombok.NoArgsConstructor;
7 7
 import java.util.Date;
8 8
 
9 9
 /**
10
+ * 工单不包含所有的 答复 记录
11
+ * 只包含最新的 答复和答复时间
10 12
  * @author weiximei
11 13
  */
12 14
 @Data
@@ -24,16 +26,6 @@ public class TpTicketInfoVO extends TpTicketVO {
24 26
     /** 报修类型 0:公共区域  1: 房屋质量  2::户内设施   **/
25 27
     private String repairType;
26 28
 
27
-    private String ticketMatchImg1;
28
-
29
-    private String ticketMatchImg2;
30
-
31
-    private String ticketMatchImg3;
32
-
33
-    private String ticketMatchImg4;
34
-
35
-    private String ticketMatchImg5;
36
-
37 29
     /** 评分 **/
38 30
     private String score;
39 31
 

+ 43
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketRecordCommentVO.java Wyświetl plik

@@ -0,0 +1,43 @@
1
+package com.community.huiju.vo;
2
+
3
+import com.community.commom.constant.enums.TicketTypeEnum;
4
+import lombok.AllArgsConstructor;
5
+import lombok.Data;
6
+import lombok.NoArgsConstructor;
7
+
8
+import java.util.Date;
9
+import java.util.List;
10
+
11
+/**
12
+ * 工单包含 答复记录
13
+ * @author weiximei
14
+ */
15
+@Data
16
+@AllArgsConstructor
17
+@NoArgsConstructor
18
+public class TpTicketRecordCommentVO {
19
+
20
+    /** 编号 **/
21
+    private Integer id;
22
+
23
+    /** 小区编号 **/
24
+    private Integer communityId;
25
+
26
+    /** 用户app的id **/
27
+    private Integer taUserId;
28
+
29
+    /** ================================ **/
30
+
31
+    /** 工单标题 **/
32
+    private String ticketTitle;
33
+
34
+    /** 类型 报修/投诉/联系单 **/
35
+    private String type;
36
+
37
+    /** 工单 创建时间 **/
38
+    private Date createDate;
39
+
40
+    /** 待分配,已分配等记录 集合 **/
41
+    List<TpTicketRecordVO> content;
42
+
43
+}

+ 35
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketRecordVO.java Wyświetl plik

@@ -0,0 +1,35 @@
1
+package com.community.huiju.vo;
2
+
3
+import com.community.commom.constant.enums.TicketStatusEnum;
4
+import lombok.AllArgsConstructor;
5
+import lombok.Data;
6
+import lombok.NoArgsConstructor;
7
+
8
+import java.util.Date;
9
+import java.util.List;
10
+
11
+/**
12
+ * 工单 处理记录
13
+ *
14
+ *  比如 待分配,已分配等记录
15
+ *
16
+ * @author weiximei
17
+ */
18
+@Data
19
+@AllArgsConstructor
20
+@NoArgsConstructor
21
+public class TpTicketRecordVO {
22
+
23
+    /** 工单处理ID **/
24
+    private Integer id;
25
+
26
+    /** 工单记录 流转状态 **/
27
+    private String status;
28
+
29
+    /** 创建时间 **/
30
+    private Date createDate;
31
+
32
+    /** 回复/追问 记录 集合 **/
33
+    private List<RecordCommentVO> comments;
34
+
35
+}

+ 2
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketVO.java Wyświetl plik

@@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
7 7
 import java.util.Date;
8 8
 
9 9
 /**
10
+ * 工单列表数据
10 11
  * @author weiximei
11 12
  */
12 13
 @Data
@@ -20,7 +21,7 @@ public class TpTicketVO {
20 21
     /** 小区编号 **/
21 22
     private Integer communityId;
22 23
 
23
-    /** 用户appd的id **/
24
+    /** 用户app的id **/
24 25
     private Integer taUserId;
25 26
 
26 27
     /** ================================ **/

+ 124
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaSysRoleMapper.xml Wyświetl plik

@@ -0,0 +1,124 @@
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.TaSysRoleMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaSysRole" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="role_name" property="roleName" jdbcType="VARCHAR" />
7
+    <result column="description" property="description" jdbcType="VARCHAR" />
8
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
9
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
10
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
11
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
12
+  </resultMap>
13
+  <sql id="Base_Column_List" >
14
+    id, role_name, description, create_user, create_date, update_user, update_date
15
+  </sql>
16
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
17
+    select 
18
+    <include refid="Base_Column_List" />
19
+    from ta_sys_role
20
+    where id = #{id,jdbcType=INTEGER}
21
+  </select>
22
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
23
+    delete from ta_sys_role
24
+    where id = #{id,jdbcType=INTEGER}
25
+  </delete>
26
+  <insert id="insert" parameterType="com.community.huiju.model.TaSysRole" >
27
+    insert into ta_sys_role (id, role_name, description, 
28
+      create_user, create_date, update_user, 
29
+      update_date)
30
+    values (#{id,jdbcType=INTEGER}, #{roleName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, 
31
+      #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, 
32
+      #{updateDate,jdbcType=TIMESTAMP})
33
+  </insert>
34
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TaSysRole" >
35
+    insert into ta_sys_role
36
+    <trim prefix="(" suffix=")" suffixOverrides="," >
37
+      <if test="id != null" >
38
+        id,
39
+      </if>
40
+      <if test="roleName != null" >
41
+        role_name,
42
+      </if>
43
+      <if test="description != null" >
44
+        description,
45
+      </if>
46
+      <if test="createUser != null" >
47
+        create_user,
48
+      </if>
49
+      <if test="createDate != null" >
50
+        create_date,
51
+      </if>
52
+      <if test="updateUser != null" >
53
+        update_user,
54
+      </if>
55
+      <if test="updateDate != null" >
56
+        update_date,
57
+      </if>
58
+    </trim>
59
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
60
+      <if test="id != null" >
61
+        #{id,jdbcType=INTEGER},
62
+      </if>
63
+      <if test="roleName != null" >
64
+        #{roleName,jdbcType=VARCHAR},
65
+      </if>
66
+      <if test="description != null" >
67
+        #{description,jdbcType=VARCHAR},
68
+      </if>
69
+      <if test="createUser != null" >
70
+        #{createUser,jdbcType=INTEGER},
71
+      </if>
72
+      <if test="createDate != null" >
73
+        #{createDate,jdbcType=TIMESTAMP},
74
+      </if>
75
+      <if test="updateUser != null" >
76
+        #{updateUser,jdbcType=INTEGER},
77
+      </if>
78
+      <if test="updateDate != null" >
79
+        #{updateDate,jdbcType=TIMESTAMP},
80
+      </if>
81
+    </trim>
82
+  </insert>
83
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaSysRole" >
84
+    update ta_sys_role
85
+    <set >
86
+      <if test="roleName != null" >
87
+        role_name = #{roleName,jdbcType=VARCHAR},
88
+      </if>
89
+      <if test="description != null" >
90
+        description = #{description,jdbcType=VARCHAR},
91
+      </if>
92
+      <if test="createUser != null" >
93
+        create_user = #{createUser,jdbcType=INTEGER},
94
+      </if>
95
+      <if test="createDate != null" >
96
+        create_date = #{createDate,jdbcType=TIMESTAMP},
97
+      </if>
98
+      <if test="updateUser != null" >
99
+        update_user = #{updateUser,jdbcType=INTEGER},
100
+      </if>
101
+      <if test="updateDate != null" >
102
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
103
+      </if>
104
+    </set>
105
+    where id = #{id,jdbcType=INTEGER}
106
+  </update>
107
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaSysRole" >
108
+    update ta_sys_role
109
+    set role_name = #{roleName,jdbcType=VARCHAR},
110
+      description = #{description,jdbcType=VARCHAR},
111
+      create_user = #{createUser,jdbcType=INTEGER},
112
+      create_date = #{createDate,jdbcType=TIMESTAMP},
113
+      update_user = #{updateUser,jdbcType=INTEGER},
114
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
115
+    where id = #{id,jdbcType=INTEGER}
116
+  </update>
117
+  <select id="findRoleByUserId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
118
+    select
119
+    <include refid="Base_Column_List" />
120
+    from ta_sys_role
121
+    	where id = (select role_id from ta_sys_user_role where user_id = #{userId})
122
+  </select>
123
+
124
+</mapper>

+ 89
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TaSysUserRoleMapper.xml Wyświetl plik

@@ -0,0 +1,89 @@
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.TaSysUserRoleMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TaSysUserRole" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="user_id" property="userId" jdbcType="INTEGER" />
8
+    <result column="role_id" property="roleId" jdbcType="INTEGER" />
9
+  </resultMap>
10
+  <sql id="Base_Column_List" >
11
+    id, community_id, user_id, role_id
12
+  </sql>
13
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
14
+    select 
15
+    <include refid="Base_Column_List" />
16
+    from ta_sys_user_role
17
+    where id = #{id,jdbcType=INTEGER}
18
+  </select>
19
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
20
+    delete from ta_sys_user_role
21
+    where id = #{id,jdbcType=INTEGER}
22
+  </delete>
23
+  <insert id="insert" parameterType="com.community.huiju.model.TaSysUserRole" >
24
+    insert into ta_sys_user_role (id, community_id, user_id, 
25
+      role_id)
26
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, 
27
+      #{roleId,jdbcType=INTEGER})
28
+  </insert>
29
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TaSysUserRole" >
30
+    insert into ta_sys_user_role
31
+    <trim prefix="(" suffix=")" suffixOverrides="," >
32
+      <if test="id != null" >
33
+        id,
34
+      </if>
35
+      <if test="communityId != null" >
36
+        community_id,
37
+      </if>
38
+      <if test="userId != null" >
39
+        user_id,
40
+      </if>
41
+      <if test="roleId != null" >
42
+        role_id,
43
+      </if>
44
+    </trim>
45
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
46
+      <if test="id != null" >
47
+        #{id,jdbcType=INTEGER},
48
+      </if>
49
+      <if test="communityId != null" >
50
+        #{communityId,jdbcType=INTEGER},
51
+      </if>
52
+      <if test="userId != null" >
53
+        #{userId,jdbcType=INTEGER},
54
+      </if>
55
+      <if test="roleId != null" >
56
+        #{roleId,jdbcType=INTEGER},
57
+      </if>
58
+    </trim>
59
+  </insert>
60
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaSysUserRole" >
61
+    update ta_sys_user_role
62
+    <set >
63
+      <if test="communityId != null" >
64
+        community_id = #{communityId,jdbcType=INTEGER},
65
+      </if>
66
+      <if test="userId != null" >
67
+        user_id = #{userId,jdbcType=INTEGER},
68
+      </if>
69
+      <if test="roleId != null" >
70
+        role_id = #{roleId,jdbcType=INTEGER},
71
+      </if>
72
+    </set>
73
+    where id = #{id,jdbcType=INTEGER}
74
+  </update>
75
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaSysUserRole" >
76
+    update ta_sys_user_role
77
+    set community_id = #{communityId,jdbcType=INTEGER},
78
+      user_id = #{userId,jdbcType=INTEGER},
79
+      role_id = #{roleId,jdbcType=INTEGER}
80
+    where id = #{id,jdbcType=INTEGER}
81
+  </update>
82
+
83
+  <select id="findSysUserRoleByUserIdAndRoleId" resultType="java.lang.Integer" parameterType="java.lang.Integer" >
84
+    select
85
+    count(*)
86
+    from ta_sys_user_role
87
+    where user_id = #{userId,jdbcType=INTEGER} and role_id = 1
88
+  </select>
89
+</mapper>

+ 23
- 21
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Wyświetl plik

@@ -8,7 +8,7 @@
8 8
     <result column="head_portrait" property="headPortrait" jdbcType="VARCHAR" />
9 9
     <result column="user_name" property="userName" jdbcType="VARCHAR" />
10 10
     <result column="login_name" property="loginName" jdbcType="VARCHAR" />
11
-    <!--<result column="login_password" property="loginPassword" jdbcType="VARCHAR" />-->
11
+    <result column="login_password" property="loginPassword" jdbcType="VARCHAR" />
12 12
     <result column="email" property="email" jdbcType="VARCHAR" />
13 13
     <result column="gender" property="gender" jdbcType="CHAR" />
14 14
     <result column="status" property="status" jdbcType="CHAR" />
@@ -23,11 +23,11 @@
23 23
   </resultMap>
24 24
   <sql id="Base_Column_List" >
25 25
     id, community_id, building_owner_info_id, head_portrait, user_name, login_name, login_password, 
26
-    email, gender, status, remark, parent_id, accept_agreement_status, verify_status,create_user, create_date,
27
-    update_user, update_date
26
+    email, gender, status, remark, parent_id, accept_agreement_status, verify_status,
27
+    create_user, create_date, update_user, update_date
28 28
   </sql>
29 29
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
30
-    select 
30
+    select
31 31
     <include refid="Base_Column_List" />
32 32
     from ta_user
33 33
     where id = #{id,jdbcType=INTEGER}
@@ -37,18 +37,20 @@
37 37
     where id = #{id,jdbcType=INTEGER}
38 38
   </delete>
39 39
   <insert id="insert" parameterType="com.community.huiju.model.TaUser" >
40
-    insert into ta_user (id, community_id, building_owner_info_id, 
41
-      head_portrait, user_name, login_name, 
42
-      login_password, email, gender, 
43
-      status, remark, parent_id, 
44
-      accept_agreement_status, verify_status, create_user, create_date,
45
-      update_user, update_date)
46
-    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{buildingOwnerInfoId,jdbcType=INTEGER}, 
47
-      #{headPortrait,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{loginName,jdbcType=VARCHAR}, 
48
-      #{loginPassword,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{gender,jdbcType=CHAR}, 
49
-      #{status,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, 
50
-      #{acceptAgreementStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR},#{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
51
-      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
40
+    insert into ta_user (id, community_id, building_owner_info_id,
41
+      head_portrait, user_name, login_name,
42
+      login_password, email, gender,
43
+      status, remark, parent_id,
44
+      accept_agreement_status, verify_status, create_user,
45
+      create_date, update_user, update_date
46
+      )
47
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{buildingOwnerInfoId,jdbcType=INTEGER},
48
+      #{headPortrait,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{loginName,jdbcType=VARCHAR},
49
+      #{loginPassword,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{gender,jdbcType=CHAR},
50
+      #{status,jdbcType=CHAR}, #{remark,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
51
+      #{acceptAgreementStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER},
52
+      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
53
+      )
52 54
   </insert>
53 55
   <insert id="insertSelective" parameterType="com.community.huiju.model.TaUser" >
54 56
     insert into ta_user
@@ -92,7 +94,7 @@
92 94
       <if test="acceptAgreementStatus != null" >
93 95
         accept_agreement_status,
94 96
       </if>
95
-      <if test="verifyStatus != null">
97
+      <if test="verifyStatus != null" >
96 98
         verify_status,
97 99
       </if>
98 100
       <if test="createUser != null" >
@@ -148,7 +150,7 @@
148 150
       <if test="acceptAgreementStatus != null" >
149 151
         #{acceptAgreementStatus,jdbcType=CHAR},
150 152
       </if>
151
-      <if test="verifyStatus != null">
153
+      <if test="verifyStatus != null" >
152 154
         #{verifyStatus,jdbcType=CHAR},
153 155
       </if>
154 156
       <if test="createUser != null" >
@@ -204,7 +206,7 @@
204 206
       <if test="acceptAgreementStatus != null" >
205 207
         accept_agreement_status = #{acceptAgreementStatus,jdbcType=CHAR},
206 208
       </if>
207
-      <if test="verifyStatus != null">
209
+      <if test="verifyStatus != null" >
208 210
         verify_status = #{verifyStatus,jdbcType=CHAR},
209 211
       </if>
210 212
       <if test="createUser != null" >
@@ -248,14 +250,14 @@
248 250
     select
249 251
     <include refid="Base_Column_List" />
250 252
     from ta_user
251
-    where login_name=#{loginName} and login_password = #{loginPassword}
253
+    where login_name=#{loginName,jdbcType=VARCHAR} and login_password = #{loginPassword,jdbcType=VARCHAR}
252 254
   </select>
253 255
 
254 256
   <select id="selectByLoginName" parameterType="map" resultMap="BaseResultMap" >
255 257
     select
256 258
     <include refid="Base_Column_List" />
257 259
     from ta_user
258
-    where login_name=#{loginName}
260
+    where login_name=#{loginName,jdbcType=VARCHAR}
259 261
   </select>
260 262
 
261 263
   <select id="ubdateLongName" parameterType="com.community.huiju.model.TaUser" resultMap="BaseResultMap">

+ 3
- 3
CODE/smart-community/app-api/src/main/resources/mapper/TpActivityMapper.xml Wyświetl plik

@@ -28,11 +28,11 @@
28 28
     activity_start_time, activity_end_time, status, create_user, create_date, update_user, 
29 29
     update_date
30 30
   </sql>
31
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
32
-    select 
31
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap">
32
+    select
33 33
     <include refid="Base_Column_List" />
34 34
     from tp_activity
35
-    where id = #{id,jdbcType=INTEGER} and #{communityId,jdbcType=INTEGER}
35
+    where id = #{id,jdbcType=INTEGER} and community_id = #{communityId,jdbcType=INTEGER}
36 36
   </select>
37 37
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
38 38
     delete from tp_activity

+ 11
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml Wyświetl plik

@@ -262,4 +262,15 @@
262 262
     ORDER BY
263 263
     create_date DESC
264 264
   </select>
265
+
266
+  <update id="updateReadStatus" parameterType="java.lang.Integer" >
267
+    update tp_message
268
+    set
269
+      read_status = 1
270
+    where community_id = #{communityId}
271
+    and advice_type = 1
272
+    and model_type = 1
273
+    and source = 1
274
+  </update>
275
+
265 276
 </mapper>

+ 26
- 63
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml Wyświetl plik

@@ -10,11 +10,7 @@
10 10
     <result column="status" property="status" jdbcType="CHAR" />
11 11
     <result column="type" property="type" jdbcType="CHAR" />
12 12
     <result column="repair_type" property="repairType" jdbcType="CHAR" />
13
-    <result column="ticket_match_img1" property="ticketMatchImg1" jdbcType="VARCHAR" />
14
-    <result column="ticket_match_img2" property="ticketMatchImg2" jdbcType="VARCHAR" />
15
-    <result column="ticket_match_img3" property="ticketMatchImg3" jdbcType="VARCHAR" />
16
-    <result column="ticket_match_img4" property="ticketMatchImg4" jdbcType="VARCHAR" />
17
-    <result column="ticket_match_img5" property="ticketMatchImg5" jdbcType="VARCHAR" />
13
+    <result column="repair_name" property="repairName" jdbcType="VARCHAR" />
18 14
     <result column="tp_user_id" property="tpUserId" jdbcType="INTEGER" />
19 15
     <result column="score" property="score" jdbcType="VARCHAR" />
20 16
     <result column="comment" property="comment" jdbcType="VARCHAR" />
@@ -24,8 +20,7 @@
24 20
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
25 21
   </resultMap>
26 22
   <sql id="Base_Column_List" >
27
-    id, community_id, ta_user_id, ticket_title, ticket_content, status, type, repair_type, 
28
-    ticket_match_img1, ticket_match_img2, ticket_match_img3, ticket_match_img4, ticket_match_img5, 
23
+    id, community_id, ta_user_id, ticket_title, ticket_content, status, type, repair_type,
29 24
     tp_user_id, score, comment, create_user, create_date, update_user, update_date
30 25
   </sql>
31 26
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -41,16 +36,12 @@
41 36
   <insert id="insert" parameterType="com.community.huiju.model.TpTicket" >
42 37
     insert into tp_ticket (id, community_id, ta_user_id, 
43 38
       ticket_title, ticket_content, status, 
44
-      type, repair_type, ticket_match_img1, 
45
-      ticket_match_img2, ticket_match_img3, ticket_match_img4, 
46
-      ticket_match_img5, tp_user_id, score, 
39
+      type, repair_type, tp_user_id, score,
47 40
       comment, create_user, create_date, 
48 41
       update_user, update_date)
49 42
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER}, 
50 43
       #{ticketTitle,jdbcType=VARCHAR}, #{ticketContent,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, 
51
-      #{type,jdbcType=CHAR}, #{repairType,jdbcType=CHAR}, #{ticketMatchImg1,jdbcType=VARCHAR}, 
52
-      #{ticketMatchImg2,jdbcType=VARCHAR}, #{ticketMatchImg3,jdbcType=VARCHAR}, #{ticketMatchImg4,jdbcType=VARCHAR}, 
53
-      #{ticketMatchImg5,jdbcType=VARCHAR}, #{tpUserId,jdbcType=INTEGER}, #{score,jdbcType=VARCHAR}, 
44
+      #{type,jdbcType=CHAR}, #{repairType,jdbcType=CHAR}, #{tpUserId,jdbcType=INTEGER}, #{score,jdbcType=VARCHAR},
54 45
       #{comment,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
55 46
       #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
56 47
   </insert>
@@ -81,21 +72,6 @@
81 72
       <if test="repairType != null" >
82 73
         repair_type,
83 74
       </if>
84
-      <if test="ticketMatchImg1 != null" >
85
-        ticket_match_img1,
86
-      </if>
87
-      <if test="ticketMatchImg2 != null" >
88
-        ticket_match_img2,
89
-      </if>
90
-      <if test="ticketMatchImg3 != null" >
91
-        ticket_match_img3,
92
-      </if>
93
-      <if test="ticketMatchImg4 != null" >
94
-        ticket_match_img4,
95
-      </if>
96
-      <if test="ticketMatchImg5 != null" >
97
-        ticket_match_img5,
98
-      </if>
99 75
       <if test="tpUserId != null" >
100 76
         tp_user_id,
101 77
       </if>
@@ -143,21 +119,6 @@
143 119
       <if test="repairType != null" >
144 120
         #{repairType,jdbcType=CHAR},
145 121
       </if>
146
-      <if test="ticketMatchImg1 != null" >
147
-        #{ticketMatchImg1,jdbcType=VARCHAR},
148
-      </if>
149
-      <if test="ticketMatchImg2 != null" >
150
-        #{ticketMatchImg2,jdbcType=VARCHAR},
151
-      </if>
152
-      <if test="ticketMatchImg3 != null" >
153
-        #{ticketMatchImg3,jdbcType=VARCHAR},
154
-      </if>
155
-      <if test="ticketMatchImg4 != null" >
156
-        #{ticketMatchImg4,jdbcType=VARCHAR},
157
-      </if>
158
-      <if test="ticketMatchImg5 != null" >
159
-        #{ticketMatchImg5,jdbcType=VARCHAR},
160
-      </if>
161 122
       <if test="tpUserId != null" >
162 123
         #{tpUserId,jdbcType=INTEGER},
163 124
       </if>
@@ -205,21 +166,6 @@
205 166
       <if test="repairType != null" >
206 167
         repair_type = #{repairType,jdbcType=CHAR},
207 168
       </if>
208
-      <if test="ticketMatchImg1 != null" >
209
-        ticket_match_img1 = #{ticketMatchImg1,jdbcType=VARCHAR},
210
-      </if>
211
-      <if test="ticketMatchImg2 != null" >
212
-        ticket_match_img2 = #{ticketMatchImg2,jdbcType=VARCHAR},
213
-      </if>
214
-      <if test="ticketMatchImg3 != null" >
215
-        ticket_match_img3 = #{ticketMatchImg3,jdbcType=VARCHAR},
216
-      </if>
217
-      <if test="ticketMatchImg4 != null" >
218
-        ticket_match_img4 = #{ticketMatchImg4,jdbcType=VARCHAR},
219
-      </if>
220
-      <if test="ticketMatchImg5 != null" >
221
-        ticket_match_img5 = #{ticketMatchImg5,jdbcType=VARCHAR},
222
-      </if>
223 169
       <if test="tpUserId != null" >
224 170
         tp_user_id = #{tpUserId,jdbcType=INTEGER},
225 171
       </if>
@@ -253,11 +199,6 @@
253 199
       status = #{status,jdbcType=CHAR},
254 200
       type = #{type,jdbcType=CHAR},
255 201
       repair_type = #{repairType,jdbcType=CHAR},
256
-      ticket_match_img1 = #{ticketMatchImg1,jdbcType=VARCHAR},
257
-      ticket_match_img2 = #{ticketMatchImg2,jdbcType=VARCHAR},
258
-      ticket_match_img3 = #{ticketMatchImg3,jdbcType=VARCHAR},
259
-      ticket_match_img4 = #{ticketMatchImg4,jdbcType=VARCHAR},
260
-      ticket_match_img5 = #{ticketMatchImg5,jdbcType=VARCHAR},
261 202
       tp_user_id = #{tpUserId,jdbcType=INTEGER},
262 203
       score = #{score,jdbcType=VARCHAR},
263 204
       comment = #{comment,jdbcType=VARCHAR},
@@ -284,4 +225,26 @@
284 225
         </if>
285 226
       </trim>
286 227
   </select>
228
+
229
+  <select id="selectByTicketId" resultMap="BaseResultMap" >
230
+     SELECT
231
+        t.id,
232
+        t.community_id,
233
+        t.ticket_title,
234
+        t.ticket_content,
235
+        t.STATUS,
236
+        t.type,
237
+        t.repair_type,
238
+        d.name as repair_name,
239
+        t.score,
240
+        t.COMMENT,
241
+        t.create_date
242
+    FROM
243
+        tp_ticket t
244
+        LEFT JOIN sys_dictionary d ON t.repair_type = d.CODE
245
+        AND d.group_id = ( SELECT id FROM sys_dictionary WHERE CODE = "ticket_repair_type" )
246
+    WHERE
247
+        t.id = #{ticketId,jdbcType=INTEGER}
248
+        AND t.community_id = #{communityId,jdbcType=INTEGER}
249
+  </select>
287 250
 </mapper>

+ 23
- 12
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordCommentMapper.xml Wyświetl plik

@@ -4,7 +4,7 @@
4 4
   <resultMap id="BaseResultMap" type="com.community.huiju.model.TpTicketRecordComment" >
5 5
     <id column="id" property="id" jdbcType="INTEGER" />
6 6
     <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
-    <result column="ticker_id" property="tickerId" jdbcType="INTEGER" />
7
+    <result column="ticket_id" property="ticketId" jdbcType="INTEGER" />
8 8
     <result column="ticket_record_id" property="ticketRecordId" jdbcType="INTEGER" />
9 9
     <result column="uuid" property="uuid" jdbcType="INTEGER" />
10 10
     <result column="user_type" property="userType" jdbcType="CHAR" />
@@ -14,7 +14,7 @@
14 14
     <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
15 15
   </resultMap>
16 16
   <sql id="Base_Column_List" >
17
-    id, community_id, ticker_id, ticket_record_id, uuid, user_type, content, parent_id, 
17
+    id, community_id, ticket_id, ticket_record_id, uuid, user_type, content, parent_id,
18 18
     user_name, create_date
19 19
   </sql>
20 20
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -28,11 +28,11 @@
28 28
     where id = #{id,jdbcType=INTEGER}
29 29
   </delete>
30 30
   <insert id="insert" parameterType="com.community.huiju.model.TpTicketRecordComment" >
31
-    insert into tp_ticket_record_comment (id, community_id, ticker_id, 
31
+    insert into tp_ticket_record_comment (id, community_id, ticket_id,
32 32
       ticket_record_id, uuid, user_type, 
33 33
       content, parent_id, user_name, 
34 34
       create_date)
35
-    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{tickerId,jdbcType=INTEGER}, 
35
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{ticketId,jdbcType=INTEGER},
36 36
       #{ticketRecordId,jdbcType=INTEGER}, #{uuid,jdbcType=INTEGER}, #{userType,jdbcType=CHAR}, 
37 37
       #{content,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, 
38 38
       #{createDate,jdbcType=TIMESTAMP})
@@ -46,8 +46,8 @@
46 46
       <if test="communityId != null" >
47 47
         community_id,
48 48
       </if>
49
-      <if test="tickerId != null" >
50
-        ticker_id,
49
+      <if test="ticketId != null" >
50
+        ticket_id,
51 51
       </if>
52 52
       <if test="ticketRecordId != null" >
53 53
         ticket_record_id,
@@ -78,8 +78,8 @@
78 78
       <if test="communityId != null" >
79 79
         #{communityId,jdbcType=INTEGER},
80 80
       </if>
81
-      <if test="tickerId != null" >
82
-        #{tickerId,jdbcType=INTEGER},
81
+      <if test="ticketId != null" >
82
+        #{ticketId,jdbcType=INTEGER},
83 83
       </if>
84 84
       <if test="ticketRecordId != null" >
85 85
         #{ticketRecordId,jdbcType=INTEGER},
@@ -110,8 +110,8 @@
110 110
       <if test="communityId != null" >
111 111
         community_id = #{communityId,jdbcType=INTEGER},
112 112
       </if>
113
-      <if test="tickerId != null" >
114
-        ticker_id = #{tickerId,jdbcType=INTEGER},
113
+      <if test="ticketId != null" >
114
+        ticket_id = #{ticketId,jdbcType=INTEGER},
115 115
       </if>
116 116
       <if test="ticketRecordId != null" >
117 117
         ticket_record_id = #{ticketRecordId,jdbcType=INTEGER},
@@ -140,7 +140,7 @@
140 140
   <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpTicketRecordComment" >
141 141
     update tp_ticket_record_comment
142 142
     set community_id = #{communityId,jdbcType=INTEGER},
143
-      ticker_id = #{tickerId,jdbcType=INTEGER},
143
+      ticket_id = #{ticketId,jdbcType=INTEGER},
144 144
       ticket_record_id = #{ticketRecordId,jdbcType=INTEGER},
145 145
       uuid = #{uuid,jdbcType=INTEGER},
146 146
       user_type = #{userType,jdbcType=CHAR},
@@ -155,6 +155,17 @@
155 155
     select ttrc.* from tp_ticket tp
156 156
                 inner join tp_ticket_record ttr on tp.id = ttr.ticket_id
157 157
                 inner join tp_ticket_record_comment ttrc on ttr.ticket_id = ttrc.ticket_record_id
158
-    where tp.id=#{tickerId,jdbcType=INTEGER} order by ttrc.create_date DESC LIMIT #{size,jdbcType=INTEGER}
158
+    where tp.id=#{ticketId,jdbcType=INTEGER} order by ttrc.create_date DESC LIMIT #{size,jdbcType=INTEGER}
159
+  </select>
160
+
161
+  <select id="selectByTicketRecordId" parameterType="com.community.huiju.model.TpTicketRecord" resultMap="BaseResultMap" >
162
+    SELECT
163
+    <include refid="Base_Column_List" />
164
+    FROM
165
+        tp_ticket_record_comment
166
+    WHERE
167
+        community_id = #{communityId,jdbcType=INTEGER}
168
+        AND ticket_id = #{ticketId,jdbcType=INTEGER}
169
+        AND ticket_record_id = #{id,jdbcType=INTEGER}
159 170
   </select>
160 171
 </mapper>

+ 19
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml Wyświetl plik

@@ -16,7 +16,7 @@
16 16
     select 
17 17
     <include refid="Base_Column_List" />
18 18
     from tp_ticket_record
19
-    where id = #{id,jdbcType=INTEGER}
19
+    where ticket_id = #{ticketId,jdbcType=INTEGER}
20 20
   </select>
21 21
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
22 22
     delete from tp_ticket_record
@@ -92,7 +92,7 @@
92 92
         create_date = #{createDate,jdbcType=TIMESTAMP},
93 93
       </if>
94 94
     </set>
95
-    where id = #{id,jdbcType=INTEGER}
95
+    where ticket_id = #{ticketId,jdbcType=INTEGER}
96 96
   </update>
97 97
   <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpTicketRecord" >
98 98
     update tp_ticket_record
@@ -103,4 +103,21 @@
103 103
       create_date = #{createDate,jdbcType=TIMESTAMP}
104 104
     where id = #{id,jdbcType=INTEGER}
105 105
   </update>
106
+
107
+
108
+  <select id="getTicketRecordByTicketId" resultType="com.community.huiju.model.TpTicketRecord">
109
+    SELECT
110
+        t.id,
111
+        t.ticket_id AS ticketId,
112
+        t.community_id AS communityId,
113
+        d.NAME AS ticketStatusName
114
+    FROM
115
+        tp_ticket_record t
116
+        LEFT JOIN sys_dictionary d ON t.STATUS = d.CODE
117
+        AND d.group_id = ( SELECT id FROM sys_dictionary WHERE CODE = "ticket_status" )
118
+    WHERE
119
+        community_id = #{communityId,jdbcType=INTEGER}
120
+        AND ticket_id = #{ticketId,jdbcType=INTEGER}
121
+
122
+  </select>
106 123
 </mapper>

+ 7
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml Wyświetl plik

@@ -232,4 +232,11 @@
232 232
       update_date = #{updateDate,jdbcType=TIMESTAMP}
233 233
     where id = #{id,jdbcType=INTEGER}
234 234
   </update>
235
+
236
+  <select id="findAllTransaction" resultMap="BaseResultMap">
237
+    select
238
+    <include refid="Base_Column_List" />
239
+    from tp_transaction
240
+    where community_id = #{communityId,jdbcType=INTEGER} and type = #{type,jdbcType=VARCHAR}
241
+  </select>
235 242
 </mapper>

+ 28
- 0
CODE/smart-community/app-api/src/test/java/com/community/huiju/DemoApplicationTests.java Wyświetl plik

@@ -1,16 +1,44 @@
1 1
 package com.community.huiju;
2 2
 
3
+import com.community.huiju.dao.TaUserMapper;
4
+import com.community.huiju.dao.ToCommunitiesMapper;
5
+import com.community.huiju.dao.TpTicketMapper;
6
+import com.community.huiju.model.TaUser;
7
+import com.community.huiju.model.ToCommunities;
8
+import com.community.huiju.model.TpTicket;
3 9
 import org.junit.Test;
4 10
 import org.junit.runner.RunWith;
11
+import org.springframework.beans.factory.annotation.Autowired;
5 12
 import org.springframework.boot.test.context.SpringBootTest;
6 13
 import org.springframework.test.context.junit4.SpringRunner;
7 14
 
15
+import java.util.List;
16
+
8 17
 @RunWith(SpringRunner.class)
9 18
 @SpringBootTest
10 19
 public class DemoApplicationTests {
11 20
 
21
+
22
+	@Autowired
23
+	private TaUserMapper mapper;
24
+
25
+	@Autowired
26
+	private TpTicketMapper tpTicketMapper;
27
+
28
+	@Autowired
29
+	private ToCommunitiesMapper toCommunitiesMapper;
30
+
12 31
 	@Test
13 32
 	public void contextLoads() {
33
+
34
+		List<ToCommunities> list = toCommunitiesMapper.selectByCommunityName("小区");
35
+		System.out.println(list);
36
+
37
+//		TpTicket tpTicket = tpTicketMapper.selectByPrimaryKey(1);
38
+//		System.out.println(tpTicket);
39
+
40
+//		TaUser user = mapper.selectByPrimaryKey(1);
41
+//		System.out.println(user);
14 42
 	}
15 43
 
16 44
 }

+ 7
- 0
CODE/smart-community/community-common/pom.xml Wyświetl plik

@@ -66,6 +66,13 @@
66 66
             <artifactId>core</artifactId>
67 67
             <version>3.2.1</version>
68 68
         </dependency>
69
+        <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
70
+        <dependency>
71
+            <groupId>org.projectlombok</groupId>
72
+            <artifactId>lombok</artifactId>
73
+            <version>1.18.2</version>
74
+            <scope>provided</scope>
75
+        </dependency>
69 76
         <dependency>
70 77
             <groupId>com.google.zxing</groupId>
71 78
             <artifactId>javase</artifactId>

+ 14
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java Wyświetl plik

@@ -45,4 +45,18 @@ public class Constant {
45 45
     /** 社交二手租赁类型**/
46 46
     public static final String LEASE = "lease";
47 47
 
48
+    /**有效状态**/
49
+    public static final Integer EFFECTIVE = 1;
50
+
51
+    /**无效状态**/
52
+    public static final Integer INVALID = 0;
53
+
54
+    /**业主角色**/
55
+    public static final String OWNER = "owner";
56
+
57
+    /**租客角色**/
58
+    public static final String TENANT = "tenant";
59
+
60
+    /**家属角色**/
61
+    public static final String FAMILYMEMBER = "familyMember";
48 62
 }

+ 11
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/CodeEnum.java Wyświetl plik

@@ -0,0 +1,11 @@
1
+package com.community.commom.constant.enums;
2
+
3
+/**
4
+ * 公共接口
5
+ * @author weiximei
6
+ */
7
+public interface CodeEnum {
8
+
9
+    Integer getCode();
10
+
11
+}

+ 46
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TaUserVerifyStatusEnum.java Wyświetl plik

@@ -0,0 +1,46 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.AllArgsConstructor;
5
+import lombok.Getter;
6
+
7
+/**
8
+ * app用户  认证状态
9
+ *
10
+ * 认证状态  0 是未认证    1是认证通过   2是已作废
11
+ *
12
+ * @author weiximei
13
+ */
14
+@Getter
15
+public enum  TaUserVerifyStatusEnum implements CodeEnum {
16
+
17
+    UNAUTHORIZED(0,"未认证"),
18
+
19
+    CERTIFICATION_BY(1,"认证通过"),
20
+
21
+    THE_CANCELLATION(2,"已作废"),
22
+
23
+    ;
24
+
25
+    private Integer code;
26
+
27
+    private String comments;
28
+
29
+    TaUserVerifyStatusEnum(Integer code, String comments) {
30
+        this.code = code;
31
+        this.comments = comments;
32
+    }
33
+
34
+    /**
35
+     * 重写toString,单个转化成json
36
+     * @return
37
+     */
38
+    @Override
39
+    public String toString() {
40
+        JSONObject object = new JSONObject();
41
+        object.put("code",code);
42
+        object.put("comments",comments);
43
+        return object.toString();
44
+    }
45
+
46
+}

+ 45
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketRepairTypeEnum.java Wyświetl plik

@@ -0,0 +1,45 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * 工单 报修类型
8
+ *
9
+ * 0:公共区域  1: 房屋质量  2::户内设施  PS : 报修的情况下才有报修类型
10
+ *
11
+ * @author weiximei
12
+ */
13
+@Getter
14
+public enum  TicketRepairTypeEnum implements CodeEnum {
15
+
16
+    THE_PUBLIC_AREAS(0,"公共区域"),
17
+
18
+    BUILDING_QUALITY(1,"房子质量"),
19
+
20
+    INDOOR_FACILITIES(2,"户内设施"),
21
+
22
+    ;
23
+
24
+    private Integer code;
25
+
26
+    private String comments;
27
+
28
+    TicketRepairTypeEnum(Integer code, String comments) {
29
+        this.code = code;
30
+        this.comments = comments;
31
+    }
32
+
33
+    /**
34
+     * 重写toString,单个转化成json
35
+     * @return
36
+     */
37
+    @Override
38
+    public String toString() {
39
+        JSONObject object = new JSONObject();
40
+        object.put("code",code);
41
+        object.put("comments",comments);
42
+        return object.toString();
43
+    }
44
+
45
+}

+ 53
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketStatusEnum.java Wyświetl plik

@@ -0,0 +1,53 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * 工单 流转状态
8
+ *
9
+ *  0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:被终止
10
+ *
11
+ * @author weiximei
12
+ */
13
+@Getter
14
+public enum TicketStatusEnum implements CodeEnum {
15
+
16
+    TO_BE_DISTRIBUTED(0,"待分配"),
17
+
18
+    REFUSED_TO_ACCEPT(1,"拒绝受理"),
19
+
20
+    TO_BE_PROCESSED(2,"待处理"),
21
+
22
+    ARE_DEALING_WITH(3,"正在处理"),
23
+
24
+    TO_EVALUATE(4,"待评价"),
25
+
26
+    HAVE_EVALUATION(5,"已评价"),
27
+
28
+    BE_TERMINATED(6,"被终止"),
29
+
30
+    ;
31
+
32
+    private Integer code;
33
+
34
+    private String comments;
35
+
36
+    TicketStatusEnum(Integer code, String comments) {
37
+        this.code = code;
38
+        this.comments = comments;
39
+    }
40
+
41
+    /**
42
+     * 重写toString,单个转化成json
43
+     * @return
44
+     */
45
+    @Override
46
+    public String toString() {
47
+        JSONObject object = new JSONObject();
48
+        object.put("code",code);
49
+        object.put("comments",comments);
50
+        return object.toString();
51
+    }
52
+
53
+}

+ 42
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketTypeEnum.java Wyświetl plik

@@ -0,0 +1,42 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * 工单类型
8
+ * @author weiximei
9
+ */
10
+@Getter
11
+public enum TicketTypeEnum implements CodeEnum {
12
+
13
+    REPAIRS(0,"报修"),
14
+
15
+    COMPLAINT(1,"投诉"),
16
+
17
+    LIAISON(2,"联系单"),
18
+
19
+    ;
20
+
21
+    private Integer code;
22
+
23
+    private String comments;
24
+
25
+    TicketTypeEnum(Integer code, String comments) {
26
+        this.code = code;
27
+        this.comments = comments;
28
+    }
29
+
30
+
31
+    /**
32
+     * 重写toString,单个转化成json
33
+     * @return
34
+     */
35
+    @Override
36
+    public String toString() {
37
+        JSONObject object = new JSONObject();
38
+        object.put("code",code);
39
+        object.put("comments",comments);
40
+        return object.toString();
41
+    }
42
+}

+ 39
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketUserTypeEnum.java Wyświetl plik

@@ -0,0 +1,39 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * 追问表 用户类型
8
+ * @author weiximei
9
+ */
10
+@Getter
11
+public enum TicketUserTypeEnum implements CodeEnum {
12
+
13
+    ASK_A_PERSON(0,"追问人"),
14
+
15
+    THE_ORIGINATOR(1,"发起人"),
16
+    ;
17
+
18
+    private Integer code;
19
+
20
+    private String comments;
21
+
22
+    TicketUserTypeEnum(Integer code, String comments) {
23
+        this.code = code;
24
+        this.comments = comments;
25
+    }
26
+
27
+    /**
28
+     * 重写toString,单个转化成json
29
+     * @return
30
+     */
31
+    @Override
32
+    public String toString() {
33
+        JSONObject object = new JSONObject();
34
+        object.put("code",code);
35
+        object.put("comments",comments);
36
+        return object.toString();
37
+    }
38
+
39
+}

+ 24
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/utils/EnumUtils.java Wyświetl plik

@@ -1,5 +1,8 @@
1 1
 package com.community.commom.utils;
2 2
 
3
+import com.community.commom.constant.enums.CodeEnum;
4
+import com.community.commom.constant.enums.TicketRepairTypeEnum;
5
+
3 6
 import java.lang.reflect.InvocationTargetException;
4 7
 import java.lang.reflect.Method;
5 8
 import java.util.Arrays;
@@ -117,4 +120,25 @@ public class EnumUtils {
117 120
         }
118 121
         return enumConstants;
119 122
     }
123
+
124
+
125
+    /**
126
+     * 获取枚举类型
127
+     *
128
+     * @param code
129
+     * @param enumClass
130
+     * @param <T>
131
+     * @return
132
+     */
133
+    public static <T extends CodeEnum> T getByCode(Integer code,Class<T> enumClass){
134
+        for (T each:enumClass.getEnumConstants()){
135
+            if (code.equals(each.getCode())){
136
+                return each;
137
+            }
138
+        }
139
+
140
+        return null;
141
+    }
142
+
143
+
120 144
 }

BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/Constant.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/CodeEnum.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TaUserVerifyStatusEnum.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketRepairTypeEnum.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketStatusEnum.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketTypeEnum.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketUserTypeEnum.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/mode/ResponseBean.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/FastJsonSerializer.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisConfiguration.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisJsonSerializer.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisObjectSerializer.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisSerializer.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisTemplate.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/SerializationFailedException.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/SingleRedisTemplate.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/AccountValidatorUtil.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/BeanTools.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/CommonUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/CookieUtil.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/DESUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/DateUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/HttpClientUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/MD5Utils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/QRCodeGeneratorUtils.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/StringConverter.class Wyświetl plik


BIN
CODE/smart-community/community-common/target/community-common-0.0.1.jar Wyświetl plik


BIN
CODE/smart-community/community-common/target/community-common-0.0.1.jar.original Wyświetl plik


+ 1
- 1
CODE/smart-community/community-common/target/maven-archiver/pom.properties Wyświetl plik

@@ -1,4 +1,4 @@
1
-#Created by Apache Maven 3.3.9
1
+#Created by Apache Maven 3.5.4
2 2
 version=0.0.1
3 3
 groupId=com.community
4 4
 artifactId=community-common

+ 2
- 0
CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst Wyświetl plik

@@ -1,6 +1,7 @@
1 1
 com\community\commom\redis\RedisTemplate.class
2 2
 com\community\commom\utils\DateUtils.class
3 3
 com\community\commom\utils\HttpClientUtils.class
4
+com\community\commom\constant\Constant.class
4 5
 com\community\commom\redis\RedisConfiguration.class
5 6
 com\community\commom\redis\SingleRedisTemplate.class
6 7
 com\community\commom\utils\CookieUtil.class
@@ -16,4 +17,5 @@ com\community\commom\redis\RedisObjectSerializer.class
16 17
 com\community\commom\utils\QRCodeGeneratorUtils.class
17 18
 com\community\commom\redis\SerializationFailedException.class
18 19
 com\community\commom\utils\DESUtils.class
20
+com\community\commom\utils\AccountValidatorUtil.class
19 21
 com\community\commom\redis\FastJsonSerializer.class

+ 2
- 0
CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst Wyświetl plik

@@ -13,6 +13,8 @@ E:\gitcode\smartCommunity\CODE\smart-community\community-common\src\main\java\co
13 13
 E:\gitcode\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\BeanTools.java
14 14
 E:\gitcode\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\SingleRedisTemplate.java
15 15
 E:\gitcode\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\mode\ResponseBean.java
16
+E:\gitcode\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\constant\Constant.java
17
+E:\gitcode\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\AccountValidatorUtil.java
16 18
 E:\gitcode\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisObjectSerializer.java
17 19
 E:\gitcode\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\SerializationFailedException.java
18 20
 E:\gitcode\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\DESUtils.java

+ 193
- 253
文档/MYSQL/smartCommunity.pdb
Plik diff jest za duży
Wyświetl plik


+ 193
- 253
文档/MYSQL/smartCommunity.pdm
Plik diff jest za duży
Wyświetl plik


BIN
文档/需求/app接口需求-第二版.xlsx Wyświetl plik