Ver código fonte

合并分支

傅行帆 6 anos atrás
pai
commit
99a692219c
68 arquivos alterados com 2787 adições e 722 exclusões
  1. 9
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AgreementController.java
  2. 59
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BillController.java
  3. 58
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java
  4. 38
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java
  5. 78
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  6. 8
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  7. 2
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivitySignupMapper.java
  8. 39
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillInvoiceMapper.java
  9. 19
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillMapper.java
  10. 19
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillStatementMapper.java
  11. 19
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java
  12. 7
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java
  13. 2
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java
  14. 11
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpannouncementTelMapper.java
  15. 145
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBill.java
  16. 155
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillInvoice.java
  17. 95
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBillStatement.java
  18. 165
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java
  19. 12
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java
  20. 0
    51
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTransaction.java
  21. 54
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpannouncementTel.java
  22. 7
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/AgreementServicel.java
  23. 23
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BillServiceI.java
  24. 37
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java
  25. 17
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java
  26. 25
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java
  27. 18
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AgreementServiceimpl.java
  28. 49
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java
  29. 75
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java
  30. 178
    3
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  31. 50
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java
  32. 2
    0
      CODE/smart-community/app-api/src/main/resources/application.yml
  33. 7
    1
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  34. 2
    1
      CODE/smart-community/app-api/src/main/resources/mapper/ToBannerMapper.xml
  35. 6
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpActivitySignupMapper.xml
  36. 264
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBillInvoiceMapper.xml
  37. 199
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBillMapper.xml
  38. 142
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBillStatementMapper.xml
  39. 223
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml
  40. 11
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml
  41. 12
    63
      CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml
  42. 25
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpannouncementTelMapper.xml
  43. 3
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java
  44. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/Constant.class
  45. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/mode/ResponseBean.class
  46. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/FastJsonSerializer.class
  47. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisConfiguration.class
  48. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisJsonSerializer.class
  49. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisObjectSerializer.class
  50. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisSerializer.class
  51. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisTemplate.class
  52. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/SerializationFailedException.class
  53. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/redis/SingleRedisTemplate.class
  54. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/AccountValidatorUtil.class
  55. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/BeanTools.class
  56. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/CommonUtils.class
  57. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/CookieUtil.class
  58. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/DESUtils.class
  59. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/DateUtils.class
  60. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class
  61. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/HttpClientUtils.class
  62. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/MD5Utils.class
  63. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/QRCodeGeneratorUtils.class
  64. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/StringConverter.class
  65. 0
    56
      CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/HelloWorld.java
  66. 207
    263
      文档/MYSQL/smartCommunity.pdb
  67. 211
    267
      文档/MYSQL/smartCommunity.pdm
  68. BIN
      文档/需求/app接口需求-第二版.xlsx

+ 9
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AgreementController.java Ver arquivo

@@ -42,4 +42,13 @@ public class AgreementController {
42 42
         return responseBean;
43 43
     }
44 44
 
45
+    @ApiOperation(value = "物业,门卫,领导电话", notes = "物业,门卫,领导电话")
46
+    @RequestMapping(value = "/allTpAnnouncementTel",method = RequestMethod.GET)
47
+    public ResponseBean getTpAnnouncementTel(){
48
+        ResponseBean responseBean = new ResponseBean();
49
+        ResponseBean agreement = agreementService.getTpAnnouncementTel();
50
+        responseBean.addSuccess(agreement);
51
+        return responseBean;
52
+    }
53
+
45 54
 }

+ 59
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/BillController.java Ver arquivo

@@ -0,0 +1,59 @@
1
+package com.community.huiju.controller;
2
+
3
+import com.community.commom.mode.ResponseBean;
4
+import com.community.huiju.service.BillServiceI;
5
+import io.swagger.annotations.Api;
6
+import io.swagger.annotations.ApiImplicitParam;
7
+import io.swagger.annotations.ApiImplicitParams;
8
+import io.swagger.annotations.ApiOperation;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.cloud.context.config.annotation.RefreshScope;
11
+import org.springframework.web.bind.annotation.PathVariable;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RequestMethod;
14
+import org.springframework.web.bind.annotation.RequestParam;
15
+import org.springframework.web.bind.annotation.RestController;
16
+
17
+import java.util.List;
18
+import java.util.Map;
19
+
20
+/**
21
+ * @author FXF
22
+ * @date 2018-10-25
23
+ */
24
+@RestController
25
+@RefreshScope
26
+@RequestMapping("/")
27
+@Api(value = "缴费相关的API", description = "缴费相关的API")
28
+public class BillController {
29
+	
30
+	@Autowired
31
+	private BillServiceI billServiceI;
32
+	
33
+	@ApiOperation(value = "获取本人的收费账单信息(已缴费或未缴费)", notes = "获取本人的收费账单信息(已缴费或未缴费)")
34
+	@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
35
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "payType", value = "0是未缴费1是已缴费"),
36
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
37
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
38
+	@RequestMapping(value = "/bills/{communityId}/{payType}",method = RequestMethod.GET)
39
+	public ResponseBean getBillInvoice(@PathVariable Integer communityId,
40
+	                                   @PathVariable Integer payType,
41
+	                                   @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
42
+	                                   @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
43
+		ResponseBean responseBean = new ResponseBean();
44
+		List<Map<String,Object>> billsList = billServiceI.getBillsList(communityId,payType,pageNum,pageSize);
45
+		responseBean.addSuccess(billsList);
46
+		return responseBean;
47
+	}
48
+	
49
+	@ApiOperation(value = "获取账单的详细信息", notes = "获取账单的详细信息")
50
+	@ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
51
+						@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "billInvoiceId", value = "账单id")})
52
+	@RequestMapping(value = "/bill/{communityId}/{billInvoiceId}",method = RequestMethod.GET)
53
+	public ResponseBean getBillInvoiceDetail(@PathVariable Integer communityId,@PathVariable Integer billInvoiceId){
54
+		ResponseBean responseBean = new ResponseBean();
55
+		Map<String,Object> billInvoiceMap = billServiceI.getBillInvoiceDetail(communityId,billInvoiceId);
56
+		responseBean.addSuccess(billInvoiceMap);
57
+		return responseBean;
58
+	}
59
+}

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

@@ -146,14 +146,68 @@ public class SocialController {
146 146
     }
147 147
 
148 148
     @ApiOperation(value = "修改报修内容", notes = "修改报修内容")
149
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "ticketId", value = "小区Id"),
150
-                         @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket")})
149
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "ticketId", value = "工单Id"),
150
+                         @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket"),
151
+                         @ApiImplicitParam(paramType = "query", dataType = "integer", name = "type", value = "工单类型")})
151 152
     @RequestMapping(value = "/updateTicket/{ticketId}", method = RequestMethod.POST)
152
-    public ResponseBean updateTicketContent(@PathVariable("ticketId")Integer ticketId, @RequestBody TpTicket tpTicket){
153
+    public ResponseBean updateTicketContent(@PathVariable("ticketId")Integer ticketId, @RequestBody TpTicket tpTicket, @RequestParam("type")String type){
153 154
         ResponseBean responseBean = new ResponseBean();
154
-        socialServiceI.updateTicketContent(ticketId, tpTicket);
155
+        socialServiceI.updateTicketContent(ticketId, tpTicket, type);
155 156
         return responseBean;
156 157
     }
157 158
 
159
+    @ApiOperation(value = "添加二手租赁帖子", notes = "添加二手租赁帖子")
160
+    @ApiImplicitParams({
161
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "transactionTitle",value = "交易标题"),
162
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "transactionContent",value = "交易内容"),
163
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "type",value = "0:二手 1:求购  2:租赁"),
164
+    })
165
+    @RequestMapping(value = "/addAllTransaction",method = RequestMethod.POST)
166
+    public ResponseBean addTransaction(TpTransaction tpTransaction, HttpSession session){
167
+        ResponseBean responseBean = new ResponseBean();
168
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
169
+        Integer userId=userElement.getId();
170
+        ResponseBean response=socialServiceI.addAllTransaction(userId,tpTransaction);
171
+        return response;
172
+    }
173
+
174
+    @ApiOperation(value = "获取我发布所有二手租赁帖子", notes = "获取我发布所有二手租赁帖子")
175
+    @ApiImplicitParams({
176
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
177
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")
178
+    })
179
+    @RequestMapping(value = "/selectAllTransaction",method = RequestMethod.POST)
180
+    public ResponseBean selectAllTransaction( HttpSession session,
181
+                                              @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
182
+                                              @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
183
+        ResponseBean responseBean = new ResponseBean();
184
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
185
+        Integer userId=userElement.getId();
186
+        ResponseBean response=socialServiceI.selectAllTransaction(userId,pageNum, pageSize);
187
+        return response;
188
+    }
189
+
190
+    @ApiOperation(value = "修改二手租赁帖子", notes = "修改二手租赁帖子")
191
+    @ApiImplicitParams({
192
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "二手租赁帖子Id")
193
+    })
194
+    @RequestMapping(value = "/ubDateAllTransaction",method = RequestMethod.PUT)
195
+    public ResponseBean ubdateTransaction( HttpSession session, TpTransaction tpTransaction) {
196
+        ResponseBean responseBean = new ResponseBean();
197
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
198
+        Integer userId = userElement.getId();
199
+        ResponseBean response = socialServiceI.updateTransaction(tpTransaction, userId);
200
+        return response;
201
+    }
158 202
 
203
+    @ApiOperation(value = "评价工单内容以及评分", notes = "评价工单内容以及评分")
204
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
205
+            @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket"),
206
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "工单Id")})
207
+    @RequestMapping(value = "/accessTicket/{communityId}", method = RequestMethod.POST)
208
+    public ResponseBean accessTicket(@PathVariable("communityId")Integer communityId, @RequestBody TpTicket tpTicket, @RequestParam("ticketId")String ticketId){
209
+        ResponseBean responseBean = new ResponseBean();
210
+        socialServiceI.accessTicket(communityId, tpTicket, ticketId);
211
+        return responseBean;
212
+    }
159 213
 }

+ 38
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java Ver arquivo

@@ -5,11 +5,15 @@ import com.community.commom.mode.ResponseBean;
5 5
 import com.community.huiju.config.entity.UserElement;
6 6
 import com.community.huiju.model.TaUser;
7 7
 import com.community.huiju.model.TpTicket;
8
+import com.community.huiju.model.TpTransaction;
9
+import com.community.huiju.model.TpTicketRecordComment;
8 10
 import com.community.huiju.service.ITicketService;
9 11
 import io.swagger.annotations.Api;
10 12
 import io.swagger.annotations.ApiImplicitParam;
11 13
 import io.swagger.annotations.ApiImplicitParams;
12 14
 import io.swagger.annotations.ApiOperation;
15
+import io.swagger.annotations.Example;
16
+import io.swagger.annotations.ExampleProperty;
13 17
 import lombok.val;
14 18
 import org.springframework.beans.factory.annotation.Autowired;
15 19
 import org.springframework.cloud.context.config.annotation.RefreshScope;
@@ -68,8 +72,8 @@ public class TicketController {
68 72
     @ApiImplicitParams({
69 73
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId", value = "小区编号"),
70 74
             @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联系单)"),
75
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
76
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "type", value = "工单类型 (0报修/1投诉/2联系单)"),
73 77
     })
74 78
     public ResponseBean getServiceList(@PathVariable(value = "communityId") String communityId,
75 79
                                        @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,
@@ -90,5 +94,37 @@ public class TicketController {
90 94
         return responseBean;
91 95
 
92 96
     }
97
+    @ApiOperation(value = "回复 报修/投诉/联系单 追问接口", notes = "回复 报修/投诉/联系单 追问接口")
98
+    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
99
+            @ApiImplicitParam(name = "tpTicketRecordComment", value = "回复记录参数", paramType ="body")})
100
+    @RequestMapping(value = "/ticket/reply/{communityId}", method = RequestMethod.POST)
101
+    public ResponseBean updateTicketsReply(@PathVariable(value = "communityId") Integer communityId, @RequestBody TpTicketRecordComment tpTicketRecordComment){
102
+        ResponseBean responseBean = new ResponseBean();
103
+        tpTicketRecordComment.setCommunityId(communityId);
104
+        Integer size = iTicketService.updateTicketsReply(tpTicketRecordComment);
105
+        if (size > 0){
106
+            responseBean.addSuccess(size);
107
+        }else{
108
+            responseBean.addError("更新失败");
109
+        }
110
+        return responseBean;
111
+    }
112
+
113
+    @ApiOperation(value = "添加报修", notes = "添加报修")
114
+    @ApiImplicitParams({
115
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "ticketContent",value = "工单内容"),
116
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "ticketTitle",value = "工单标题"),
117
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "repairType",value = "报修房屋类型"),
118
+    })
119
+    @RequestMapping(value = "/addAlltpTicket",method = RequestMethod.POST)
120
+    @ResponseBody
121
+    public ResponseBean addTransaction(TpTicket tpTicket, HttpSession session){
122
+        ResponseBean responseBean = new ResponseBean();
123
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
124
+        Integer userId=userElement.getId();
125
+        ResponseBean response=iTicketService.addAiTicketService(userId,tpTicket);
126
+        return response;
127
+    }
128
+
93 129
 
94 130
 }

+ 78
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java Ver arquivo

@@ -1,10 +1,12 @@
1 1
 package com.community.huiju.controller;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.constant.Constant;
4 5
 import com.community.commom.mode.ResponseBean;
5 6
 import com.community.huiju.common.code.cache.AppkeyCache;
6 7
 import com.community.huiju.config.entity.UserElement;
7 8
 import com.community.huiju.model.TaUser;
9
+import com.community.huiju.model.TpTicket;
8 10
 import com.community.huiju.service.ITaUserService;
9 11
 import com.community.huiju.vo.TaUserVO;
10 12
 import io.swagger.annotations.Api;
@@ -12,6 +14,7 @@ import io.swagger.annotations.ApiImplicitParam;
12 14
 import io.swagger.annotations.ApiImplicitParams;
13 15
 import io.swagger.annotations.ApiOperation;
14 16
 import org.apache.catalina.User;
17
+import org.apache.ibatis.annotations.Param;
15 18
 import org.springframework.beans.BeanUtils;
16 19
 import org.springframework.beans.factory.annotation.Autowired;
17 20
 import org.springframework.cloud.context.config.annotation.RefreshScope;
@@ -19,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
19 22
 
20 23
 import javax.servlet.http.HttpSession;
21 24
 import javax.xml.crypto.dsig.keyinfo.PGPData;
25
+import java.util.List;
22 26
 
23 27
 /**
24 28
  * 用户控制器
@@ -62,13 +66,85 @@ public class UserController {
62 66
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "code",value = "验证码")
63 67
     })
64 68
             @RequestMapping(value = "/user/phone",method = RequestMethod.PUT)
65
-    public ResponseBean update(@RequestParam(value = "phone") String phone,@RequestParam(value = "code")String code,HttpSession session){
69
+    public ResponseBean update(@RequestBody String paramets, HttpSession session){
66 70
         ResponseBean responseBean = new ResponseBean();
67 71
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
68 72
         Integer userId=userElement.getId();
69
-        ResponseBean response=iTaUserService.selectloginName(userId,phone,code);
73
+        ResponseBean response=iTaUserService.udDateloginName(userId,paramets);
70 74
         return response;
71 75
     }
72 76
 
77
+    @ApiOperation(value = "查看房屋成员列表", notes = "查看房屋成员列表")
78
+    @RequestMapping(value = "/roomUserList", method = RequestMethod.GET)
79
+    public ResponseBean accessTicket(){
80
+        ResponseBean responseBean = new ResponseBean();
81
+        //todo
82
+        List<TaUser> taUserList = iTaUserService.getAllRoomUserList(1);
83
+        responseBean.addSuccess(taUserList);
84
+        return responseBean;
85
+    }
86
+    @ApiOperation(value = "修改用户名和性别", notes = "修改用户名和性别")
87
+    @ApiImplicitParams({
88
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "userName",value = "用户民"),
89
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "gender",value = "性别")
90
+    })
91
+    @RequestMapping(value = "/user/update/info",method = RequestMethod.PUT)
92
+    public ResponseBean updateUserNameAndGender(@RequestBody TaUser user,
93
+                                                HttpSession session){
94
+        ResponseBean response = new ResponseBean();
95
+
96
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
97
+
98
+        user.setId(userElement.getId());
99
+
100
+        response = iTaUserService.modifyUser(user);
101
+        return response;
102
+
103
+    }
104
+
105
+    @ApiOperation(value = "租客或家属 启用或者停用", notes = "租客或家属 启用或者停用")
106
+    @ApiImplicitParams({
107
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "userId",value = "租客或者家属"),
108
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "type",value = "1启用 0停用")
109
+    })
110
+    @RequestMapping(value = "/user/update/dependentsOrTenants",method = RequestMethod.PUT)
111
+    public ResponseBean updateDependentsOrTenants(@RequestBody String parameter,
112
+                                                HttpSession session){
113
+        ResponseBean response = new ResponseBean();
114
+
115
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
116
+
117
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
118
+        response = iTaUserService.startOrEndUsingUser(userElement.getId(),jsonObject.getInteger("userId"),jsonObject.getInteger("type"));
119
+
120
+        return response;
121
+
122
+    }
123
+
124
+
125
+    @ApiOperation(value = "业主添加 租客或家属", notes = "业主添加 租客或家属")
126
+    @ApiImplicitParams({
127
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "userName",value = "租客或者家属 姓名"),
128
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "phone",value = "租客或者家属 手机号"),
129
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "gender",value = "租客或者家属 性别 1男 2女"),
130
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "type",value = "1家属 0租客")
131
+    })
132
+    @RequestMapping(value = "/user/update/addTenantsOrDependents",method = RequestMethod.POST)
133
+    public ResponseBean addTenantsOrDependents(@RequestBody String parameter,
134
+                                               HttpSession session){
135
+        ResponseBean response = new ResponseBean();
136
+
137
+        UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
138
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
139
+        response = iTaUserService.addTenantsOrDependents(jsonObject.getString("userName"),
140
+                jsonObject.getString("phone"),jsonObject.getString("gender"),
141
+                userElement.getId(),
142
+                jsonObject.getInteger("type"));
143
+
144
+        return response;
145
+
146
+    }
147
+
148
+
73 149
 
74 150
 }

+ 8
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java Ver arquivo

@@ -3,6 +3,7 @@ package com.community.huiju.dao;
3 3
 import com.community.huiju.model.TaUser;
4 4
 import org.apache.ibatis.annotations.Mapper;
5 5
 
6
+import java.util.List;
6 7
 import java.util.Map;
7 8
 
8 9
 @Mapper
@@ -39,4 +40,11 @@ public interface TaUserMapper {
39 40
      * @return
40 41
      */
41 42
     TaUser ubdateLongName(TaUser record);
43
+
44
+    /**
45
+     * 查询房屋成员列表
46
+     * @param parentId
47
+     * @return
48
+     */
49
+    List<TaUser> selectUserListByParentId(Integer parentId);
42 50
 }

+ 2
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpActivitySignupMapper.java Ver arquivo

@@ -20,4 +20,6 @@ public interface TpActivitySignupMapper {
20 20
     int updateByPrimaryKey(TpActivitySignup record);
21 21
 
22 22
     Integer sumActivitySignUpNum(@Param("id")Integer id, @Param("communityId")Integer communityId);
23
+
24
+    Integer findTpActivetitySignByUserId(@Param("activityId") Integer activityId, @Param("communityId")Integer communityId, @Param("userId")Integer userId);
23 25
 }

+ 39
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillInvoiceMapper.java Ver arquivo

@@ -0,0 +1,39 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.TpBillInvoice;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
8
+import java.util.Map;
9
+
10
+@Mapper
11
+public interface TpBillInvoiceMapper {
12
+    int deleteByPrimaryKey(Integer id);
13
+
14
+    int insert(TpBillInvoice record);
15
+
16
+    int insertSelective(TpBillInvoice record);
17
+
18
+    TpBillInvoice selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(TpBillInvoice record);
21
+
22
+    int updateByPrimaryKey(TpBillInvoice record);
23
+    
24
+    /**
25
+     * 分页获取缴费和未缴费的数据
26
+     * @param communityId
27
+     * @param userId
28
+     * @param payType
29
+     * @return
30
+     */
31
+    List<Map<String, Object>> getBillsList(@Param("communityId") Integer communityId,@Param("userId") Integer userId,@Param("payType") Integer payType);
32
+    
33
+    /**
34
+     * 获取账单的详细信息
35
+     * @param billInvoiceId
36
+     * @return
37
+     */
38
+    Map<String, Object> getBillInvoiceDetail(@Param("communityId") Integer communityId,@Param("billInvoiceId") Integer billInvoiceId);
39
+}

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillMapper.java Ver arquivo

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

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBillStatementMapper.java Ver arquivo

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

+ 19
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpBuildingOwnerInfoMapper.java Ver arquivo

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

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java Ver arquivo

@@ -35,4 +35,11 @@ public interface TpTicketMapper {
35 35
      * @return
36 36
      */
37 37
 	TpTicket selectByTicketId(@Param("communityId") String communityId,@Param("ticketId") Integer ticketId);
38
+
39
+    /**
40
+     * 获取当前插入的信息
41
+     * @param userId
42
+     * @param communityId
43
+     */
44
+    TpTicket getById(@Param("userId")Integer userId, @Param("communityId")Integer communityId);
38 45
 }

+ 2
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java Ver arquivo

@@ -21,4 +21,6 @@ public interface TpTransactionMapper {
21 21
     int updateByPrimaryKey(TpTransaction record);
22 22
 
23 23
     List<TpTransaction> findAllTransaction(@Param("communityId") Integer communityId, @Param("type") String type);
24
+
25
+    List<TpTransaction> selectTransaction(@Param("userId")Integer userId, @Param("communityId")Integer communityId);
24 26
 }

+ 11
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpannouncementTelMapper.java Ver arquivo

@@ -0,0 +1,11 @@
1
+package com.community.huiju.dao;
2
+
3
+
4
+import com.community.huiju.model.TpannouncementTel;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+@Mapper
9
+public interface TpannouncementTelMapper {
10
+    List<TpannouncementTel> getTpannouncementTel();
11
+}

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

@@ -0,0 +1,145 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBill {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private String billName;
11
+
12
+    private String billExplain;
13
+
14
+    private String payPrice;
15
+
16
+    private Integer payTotalNum;
17
+
18
+    private Integer payedNum;
19
+
20
+    private Integer unpayedNum;
21
+
22
+    private String billStatus;
23
+
24
+    private Date endDate;
25
+
26
+    private Integer createUser;
27
+
28
+    private Date createDate;
29
+
30
+    private Integer updateUser;
31
+
32
+    private Date updateDate;
33
+
34
+    public Integer getId() {
35
+        return id;
36
+    }
37
+
38
+    public void setId(Integer id) {
39
+        this.id = id;
40
+    }
41
+
42
+    public Integer getCommunityId() {
43
+        return communityId;
44
+    }
45
+
46
+    public void setCommunityId(Integer communityId) {
47
+        this.communityId = communityId;
48
+    }
49
+
50
+    public String getBillName() {
51
+        return billName;
52
+    }
53
+
54
+    public void setBillName(String billName) {
55
+        this.billName = billName == null ? null : billName.trim();
56
+    }
57
+
58
+    public String getBillExplain() {
59
+        return billExplain;
60
+    }
61
+
62
+    public void setBillExplain(String billExplain) {
63
+        this.billExplain = billExplain == null ? null : billExplain.trim();
64
+    }
65
+
66
+    public String getPayPrice() {
67
+        return payPrice;
68
+    }
69
+
70
+    public void setPayPrice(String payPrice) {
71
+        this.payPrice = payPrice == null ? null : payPrice.trim();
72
+    }
73
+
74
+    public Integer getPayTotalNum() {
75
+        return payTotalNum;
76
+    }
77
+
78
+    public void setPayTotalNum(Integer payTotalNum) {
79
+        this.payTotalNum = payTotalNum;
80
+    }
81
+
82
+    public Integer getPayedNum() {
83
+        return payedNum;
84
+    }
85
+
86
+    public void setPayedNum(Integer payedNum) {
87
+        this.payedNum = payedNum;
88
+    }
89
+
90
+    public Integer getUnpayedNum() {
91
+        return unpayedNum;
92
+    }
93
+
94
+    public void setUnpayedNum(Integer unpayedNum) {
95
+        this.unpayedNum = unpayedNum;
96
+    }
97
+
98
+    public String getBillStatus() {
99
+        return billStatus;
100
+    }
101
+
102
+    public void setBillStatus(String billStatus) {
103
+        this.billStatus = billStatus == null ? null : billStatus.trim();
104
+    }
105
+
106
+    public Date getEndDate() {
107
+        return endDate;
108
+    }
109
+
110
+    public void setEndDate(Date endDate) {
111
+        this.endDate = endDate;
112
+    }
113
+
114
+    public Integer getCreateUser() {
115
+        return createUser;
116
+    }
117
+
118
+    public void setCreateUser(Integer createUser) {
119
+        this.createUser = createUser;
120
+    }
121
+
122
+    public Date getCreateDate() {
123
+        return createDate;
124
+    }
125
+
126
+    public void setCreateDate(Date createDate) {
127
+        this.createDate = createDate;
128
+    }
129
+
130
+    public Integer getUpdateUser() {
131
+        return updateUser;
132
+    }
133
+
134
+    public void setUpdateUser(Integer updateUser) {
135
+        this.updateUser = updateUser;
136
+    }
137
+
138
+    public Date getUpdateDate() {
139
+        return updateDate;
140
+    }
141
+
142
+    public void setUpdateDate(Date updateDate) {
143
+        this.updateDate = updateDate;
144
+    }
145
+}

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

@@ -0,0 +1,155 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBillInvoice {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer billId;
11
+
12
+    private Integer buildingOwnerInfoId;
13
+
14
+    private Integer taUserId;
15
+
16
+    private String billInvoiceExplain;
17
+
18
+    private Integer payPrice;
19
+
20
+    private Integer billStatementId;
21
+
22
+    private String billStatus;
23
+
24
+    private String payName;
25
+
26
+    private Date payDate;
27
+
28
+    private Integer createUser;
29
+
30
+    private Date createDate;
31
+
32
+    private Integer updateUser;
33
+
34
+    private Date updateDate;
35
+
36
+    public Integer getId() {
37
+        return id;
38
+    }
39
+
40
+    public void setId(Integer id) {
41
+        this.id = id;
42
+    }
43
+
44
+    public Integer getCommunityId() {
45
+        return communityId;
46
+    }
47
+
48
+    public void setCommunityId(Integer communityId) {
49
+        this.communityId = communityId;
50
+    }
51
+
52
+    public Integer getBillId() {
53
+        return billId;
54
+    }
55
+
56
+    public void setBillId(Integer billId) {
57
+        this.billId = billId;
58
+    }
59
+
60
+    public Integer getBuildingOwnerInfoId() {
61
+        return buildingOwnerInfoId;
62
+    }
63
+
64
+    public void setBuildingOwnerInfoId(Integer buildingOwnerInfoId) {
65
+        this.buildingOwnerInfoId = buildingOwnerInfoId;
66
+    }
67
+
68
+    public Integer getTaUserId() {
69
+        return taUserId;
70
+    }
71
+
72
+    public void setTaUserId(Integer taUserId) {
73
+        this.taUserId = taUserId;
74
+    }
75
+
76
+    public String getBillInvoiceExplain() {
77
+        return billInvoiceExplain;
78
+    }
79
+
80
+    public void setBillInvoiceExplain(String billInvoiceExplain) {
81
+        this.billInvoiceExplain = billInvoiceExplain == null ? null : billInvoiceExplain.trim();
82
+    }
83
+
84
+    public Integer getPayPrice() {
85
+        return payPrice;
86
+    }
87
+
88
+    public void setPayPrice(Integer payPrice) {
89
+        this.payPrice = payPrice;
90
+    }
91
+
92
+    public Integer getBillStatementId() {
93
+        return billStatementId;
94
+    }
95
+
96
+    public void setBillStatementId(Integer billStatementId) {
97
+        this.billStatementId = billStatementId;
98
+    }
99
+
100
+    public String getBillStatus() {
101
+        return billStatus;
102
+    }
103
+
104
+    public void setBillStatus(String billStatus) {
105
+        this.billStatus = billStatus == null ? null : billStatus.trim();
106
+    }
107
+
108
+    public String getPayName() {
109
+        return payName;
110
+    }
111
+
112
+    public void setPayName(String payName) {
113
+        this.payName = payName == null ? null : payName.trim();
114
+    }
115
+
116
+    public Date getPayDate() {
117
+        return payDate;
118
+    }
119
+
120
+    public void setPayDate(Date payDate) {
121
+        this.payDate = payDate;
122
+    }
123
+
124
+    public Integer getCreateUser() {
125
+        return createUser;
126
+    }
127
+
128
+    public void setCreateUser(Integer createUser) {
129
+        this.createUser = createUser;
130
+    }
131
+
132
+    public Date getCreateDate() {
133
+        return createDate;
134
+    }
135
+
136
+    public void setCreateDate(Date createDate) {
137
+        this.createDate = createDate;
138
+    }
139
+
140
+    public Integer getUpdateUser() {
141
+        return updateUser;
142
+    }
143
+
144
+    public void setUpdateUser(Integer updateUser) {
145
+        this.updateUser = updateUser;
146
+    }
147
+
148
+    public Date getUpdateDate() {
149
+        return updateDate;
150
+    }
151
+
152
+    public void setUpdateDate(Date updateDate) {
153
+        this.updateDate = updateDate;
154
+    }
155
+}

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

@@ -0,0 +1,95 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBillStatement {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer billInvoiceId;
11
+
12
+    private Integer taUserId;
13
+
14
+    private Integer payPrice;
15
+
16
+    private String payName;
17
+
18
+    private String payRemark;
19
+
20
+    private String payType;
21
+
22
+    private Date createTime;
23
+
24
+    public Integer getId() {
25
+        return id;
26
+    }
27
+
28
+    public void setId(Integer id) {
29
+        this.id = id;
30
+    }
31
+
32
+    public Integer getCommunityId() {
33
+        return communityId;
34
+    }
35
+
36
+    public void setCommunityId(Integer communityId) {
37
+        this.communityId = communityId;
38
+    }
39
+
40
+    public Integer getBillInvoiceId() {
41
+        return billInvoiceId;
42
+    }
43
+
44
+    public void setBillInvoiceId(Integer billInvoiceId) {
45
+        this.billInvoiceId = billInvoiceId;
46
+    }
47
+
48
+    public Integer getTaUserId() {
49
+        return taUserId;
50
+    }
51
+
52
+    public void setTaUserId(Integer taUserId) {
53
+        this.taUserId = taUserId;
54
+    }
55
+
56
+    public Integer getPayPrice() {
57
+        return payPrice;
58
+    }
59
+
60
+    public void setPayPrice(Integer payPrice) {
61
+        this.payPrice = payPrice;
62
+    }
63
+
64
+    public String getPayName() {
65
+        return payName;
66
+    }
67
+
68
+    public void setPayName(String payName) {
69
+        this.payName = payName == null ? null : payName.trim();
70
+    }
71
+
72
+    public String getPayRemark() {
73
+        return payRemark;
74
+    }
75
+
76
+    public void setPayRemark(String payRemark) {
77
+        this.payRemark = payRemark == null ? null : payRemark.trim();
78
+    }
79
+
80
+    public String getPayType() {
81
+        return payType;
82
+    }
83
+
84
+    public void setPayType(String payType) {
85
+        this.payType = payType == null ? null : payType.trim();
86
+    }
87
+
88
+    public Date getCreateTime() {
89
+        return createTime;
90
+    }
91
+
92
+    public void setCreateTime(Date createTime) {
93
+        this.createTime = createTime;
94
+    }
95
+}

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

@@ -0,0 +1,165 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpBuildingOwnerInfo {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private String idCard;
11
+
12
+    private String building;
13
+
14
+    private String unit;
15
+
16
+    private String level;
17
+
18
+    private String roomNo;
19
+
20
+    private String ownerName;
21
+
22
+    private String ownerTel;
23
+
24
+    private String gender;
25
+
26
+    private String pairStatus;
27
+
28
+    private String verifyStatus;
29
+
30
+    private Integer createUser;
31
+
32
+    private Date createDate;
33
+
34
+    private Integer updateUser;
35
+
36
+    private Date updateDate;
37
+
38
+    public Integer getId() {
39
+        return id;
40
+    }
41
+
42
+    public void setId(Integer id) {
43
+        this.id = id;
44
+    }
45
+
46
+    public Integer getCommunityId() {
47
+        return communityId;
48
+    }
49
+
50
+    public void setCommunityId(Integer communityId) {
51
+        this.communityId = communityId;
52
+    }
53
+
54
+    public String getIdCard() {
55
+        return idCard;
56
+    }
57
+
58
+    public void setIdCard(String idCard) {
59
+        this.idCard = idCard == null ? null : idCard.trim();
60
+    }
61
+
62
+    public String getBuilding() {
63
+        return building;
64
+    }
65
+
66
+    public void setBuilding(String building) {
67
+        this.building = building == null ? null : building.trim();
68
+    }
69
+
70
+    public String getUnit() {
71
+        return unit;
72
+    }
73
+
74
+    public void setUnit(String unit) {
75
+        this.unit = unit == null ? null : unit.trim();
76
+    }
77
+
78
+    public String getLevel() {
79
+        return level;
80
+    }
81
+
82
+    public void setLevel(String level) {
83
+        this.level = level == null ? null : level.trim();
84
+    }
85
+
86
+    public String getRoomNo() {
87
+        return roomNo;
88
+    }
89
+
90
+    public void setRoomNo(String roomNo) {
91
+        this.roomNo = roomNo == null ? null : roomNo.trim();
92
+    }
93
+
94
+    public String getOwnerName() {
95
+        return ownerName;
96
+    }
97
+
98
+    public void setOwnerName(String ownerName) {
99
+        this.ownerName = ownerName == null ? null : ownerName.trim();
100
+    }
101
+
102
+    public String getOwnerTel() {
103
+        return ownerTel;
104
+    }
105
+
106
+    public void setOwnerTel(String ownerTel) {
107
+        this.ownerTel = ownerTel == null ? null : ownerTel.trim();
108
+    }
109
+
110
+    public String getGender() {
111
+        return gender;
112
+    }
113
+
114
+    public void setGender(String gender) {
115
+        this.gender = gender == null ? null : gender.trim();
116
+    }
117
+
118
+    public String getPairStatus() {
119
+        return pairStatus;
120
+    }
121
+
122
+    public void setPairStatus(String pairStatus) {
123
+        this.pairStatus = pairStatus == null ? null : pairStatus.trim();
124
+    }
125
+
126
+    public String getVerifyStatus() {
127
+        return verifyStatus;
128
+    }
129
+
130
+    public void setVerifyStatus(String verifyStatus) {
131
+        this.verifyStatus = verifyStatus == null ? null : verifyStatus.trim();
132
+    }
133
+
134
+    public Integer getCreateUser() {
135
+        return createUser;
136
+    }
137
+
138
+    public void setCreateUser(Integer createUser) {
139
+        this.createUser = createUser;
140
+    }
141
+
142
+    public Date getCreateDate() {
143
+        return createDate;
144
+    }
145
+
146
+    public void setCreateDate(Date createDate) {
147
+        this.createDate = createDate;
148
+    }
149
+
150
+    public Integer getUpdateUser() {
151
+        return updateUser;
152
+    }
153
+
154
+    public void setUpdateUser(Integer updateUser) {
155
+        this.updateUser = updateUser;
156
+    }
157
+
158
+    public Date getUpdateDate() {
159
+        return updateDate;
160
+    }
161
+
162
+    public void setUpdateDate(Date updateDate) {
163
+        this.updateDate = updateDate;
164
+    }
165
+}

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

@@ -1,5 +1,7 @@
1 1
 package com.community.huiju.model;
2 2
 
3
+import org.apache.ibatis.annotations.Mapper;
4
+
3 5
 import java.util.Date;
4 6
 
5 7
 public class TpTicketRecordComment {
@@ -10,6 +12,8 @@ public class TpTicketRecordComment {
10 12
     private Integer ticketId;
11 13
 
12 14
     private Integer ticketRecordId;
15
+    
16
+    private Integer ticketRecordCommentId;
13 17
 
14 18
     private Integer uuid;
15 19
 
@@ -102,4 +106,12 @@ public class TpTicketRecordComment {
102 106
     public void setCreateDate(Date createDate) {
103 107
         this.createDate = createDate;
104 108
     }
109
+    
110
+    public Integer getTicketRecordCommentId() {
111
+        return ticketRecordCommentId;
112
+    }
113
+    
114
+    public void setTicketRecordCommentId(Integer ticketRecordCommentId) {
115
+        this.ticketRecordCommentId = ticketRecordCommentId;
116
+    }
105 117
 }

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

@@ -13,16 +13,6 @@ public class TpTransaction {
13 13
 
14 14
     private String transactionContent;
15 15
 
16
-    private String transactionMatchImg1;
17
-
18
-    private String activityMatchImg3;
19
-
20
-    private String activityMatchImg4;
21
-
22
-    private String activityMatchImg5;
23
-
24
-    private String activityMatchImg6;
25
-
26 16
     private Integer viewCount;
27 17
 
28 18
     private String status;
@@ -76,47 +66,6 @@ public class TpTransaction {
76 66
     public void setTransactionContent(String transactionContent) {
77 67
         this.transactionContent = transactionContent == null ? null : transactionContent.trim();
78 68
     }
79
-
80
-    public String getTransactionMatchImg1() {
81
-        return transactionMatchImg1;
82
-    }
83
-
84
-    public void setTransactionMatchImg1(String transactionMatchImg1) {
85
-        this.transactionMatchImg1 = transactionMatchImg1 == null ? null : transactionMatchImg1.trim();
86
-    }
87
-
88
-    public String getActivityMatchImg3() {
89
-        return activityMatchImg3;
90
-    }
91
-
92
-    public void setActivityMatchImg3(String activityMatchImg3) {
93
-        this.activityMatchImg3 = activityMatchImg3 == null ? null : activityMatchImg3.trim();
94
-    }
95
-
96
-    public String getActivityMatchImg4() {
97
-        return activityMatchImg4;
98
-    }
99
-
100
-    public void setActivityMatchImg4(String activityMatchImg4) {
101
-        this.activityMatchImg4 = activityMatchImg4 == null ? null : activityMatchImg4.trim();
102
-    }
103
-
104
-    public String getActivityMatchImg5() {
105
-        return activityMatchImg5;
106
-    }
107
-
108
-    public void setActivityMatchImg5(String activityMatchImg5) {
109
-        this.activityMatchImg5 = activityMatchImg5 == null ? null : activityMatchImg5.trim();
110
-    }
111
-
112
-    public String getActivityMatchImg6() {
113
-        return activityMatchImg6;
114
-    }
115
-
116
-    public void setActivityMatchImg6(String activityMatchImg6) {
117
-        this.activityMatchImg6 = activityMatchImg6 == null ? null : activityMatchImg6.trim();
118
-    }
119
-
120 69
     public Integer getViewCount() {
121 70
         return viewCount;
122 71
     }

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

@@ -0,0 +1,54 @@
1
+package com.community.huiju.model;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+
7
+import java.util.Date;
8
+@Data
9
+@AllArgsConstructor
10
+@NoArgsConstructor
11
+public class TpannouncementTel {
12
+
13
+    private Integer Id;
14
+    /**
15
+     * 小区id
16
+     */
17
+    private Integer communityId;
18
+
19
+    /**
20
+     * 电话名称
21
+     */
22
+    private String name;
23
+
24
+    /**
25
+     * 电话
26
+     */
27
+    private String tel;
28
+
29
+    /***
30
+     * 备注
31
+     */
32
+    private String remark;
33
+
34
+    /**
35
+     * 创建人
36
+     */
37
+    private Integer createUser;
38
+
39
+    /**
40
+     * 创建时间
41
+     */
42
+    private Date createDate;
43
+
44
+    /**
45
+     * 更新人
46
+     */
47
+    private Integer updateUser;
48
+
49
+    /**
50
+     * 更新时间
51
+     */
52
+    private Date updateDate;
53
+
54
+}

+ 7
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/AgreementServicel.java Ver arquivo

@@ -1,5 +1,6 @@
1 1
 package com.community.huiju.service;
2 2
 
3
+import com.community.commom.mode.ResponseBean;
3 4
 import com.community.huiju.model.TaAgreement;
4 5
 
5 6
 import java.util.List;
@@ -26,4 +27,10 @@ public interface AgreementServicel {
26 27
     int updateByPrimaryKey(TaAgreement record);
27 28
 
28 29
     TaAgreement getAgreement();
30
+
31
+    /**
32
+     * 物业电话/门卫电话/领导电话
33
+     * @return
34
+     */
35
+    ResponseBean getTpAnnouncementTel();
29 36
 }

+ 23
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/BillServiceI.java Ver arquivo

@@ -0,0 +1,23 @@
1
+package com.community.huiju.service;
2
+
3
+import java.util.List;
4
+import java.util.Map;
5
+
6
+public interface BillServiceI {
7
+	/**
8
+	 * 根据payType分页获取缴费或未缴费的数据
9
+	 * @param communityId
10
+	 * @param payType
11
+	 * @param pageNum
12
+	 * @param pageSize
13
+	 * @return
14
+	 */
15
+	List<Map<String, Object>> getBillsList(Integer communityId, Integer payType, Integer pageNum, Integer pageSize);
16
+	
17
+	/**
18
+	 * 获取账单的详细信息
19
+	 * @param billInvoiceId
20
+	 * @return
21
+	 */
22
+	Map<String, Object> getBillInvoiceDetail(Integer communityId,Integer billInvoiceId);
23
+}

+ 37
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java Ver arquivo

@@ -3,6 +3,8 @@ package com.community.huiju.service;
3 3
 import com.community.commom.mode.ResponseBean;
4 4
 import com.community.huiju.model.TaUser;
5 5
 
6
+import java.util.List;
7
+
6 8
 /**
7 9
  * 用户业务 接口
8 10
  * @author weiximei
@@ -33,12 +35,45 @@ public interface ITaUserService {
33 35
     ResponseBean register(TaUser user);
34 36
 
35 37
     /**
36
-     * 查询当前用户信息
38
+     * 修改当前用户信息
37 39
      * @param id
38 40
      * @return
39 41
      */
40
-    ResponseBean selectloginName(Integer id, String phone, String code);
42
+    ResponseBean udDateloginName(Integer id, String paramets);
43
+
44
+    /**
45
+     * 获取房屋成员列表
46
+     * @param parentId
47
+     * @return
48
+     */
49
+    List<TaUser> getAllRoomUserList(Integer parentId);
41 50
 
51
+    /**
52
+     * 修改用户
53
+     * @param user
54
+     * @return
55
+     */
56
+    ResponseBean modifyUser(TaUser user);
42 57
 
58
+    /**
59
+     * 停用用户 或者 启用用户
60
+     * @param currentUserId 当前用户(业主)
61
+     * @param userId
62
+     * @param type 1启用 0停用
63
+     * @return
64
+     */
65
+    ResponseBean startOrEndUsingUser(Integer currentUserId,Integer userId,Integer type);
66
+
67
+
68
+    /**
69
+     * 添加租客或者家属
70
+     * @param userName
71
+     * @param phone
72
+     * @param gender
73
+     * @param currentUserId 当前用户(业主)
74
+     * @param type 1家属 0租客
75
+     * @return
76
+     */
77
+    ResponseBean addTenantsOrDependents(String userName, String phone, String gender,Integer currentUserId,Integer type);
43 78
 
44 79
 }

+ 17
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java Ver arquivo

@@ -2,6 +2,7 @@ package com.community.huiju.service;
2 2
 
3 3
 import com.community.commom.mode.ResponseBean;
4 4
 import com.community.huiju.model.TpTicket;
5
+import com.community.huiju.model.TpTicketRecordComment;
5 6
 import com.community.huiju.vo.TpTicketVO;
6 7
 
7 8
 import java.util.List;
@@ -37,4 +38,20 @@ public interface ITicketService {
37 38
 	 * @return
38 39
 	 */
39 40
 	TpTicket getTicketSchedule(String communityId, Integer ticketId);
41
+
42
+
43
+	/**
44
+	 * 添加报修
45
+	 * @param userId
46
+	 * @param tpTicket
47
+	 * @return
48
+	 */
49
+    ResponseBean addAiTicketService(Integer userId, TpTicket tpTicket);
50
+	
51
+	/**
52
+	 * 回复工单
53
+	 * @param tpTicketRecordComment
54
+	 * @return
55
+	 */
56
+	Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment);
40 57
 }

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

@@ -75,9 +75,31 @@ public interface SocialServiceI {
75 75
 	ResponseBean stopTpTicketRecord(Integer communityId, Integer ticketId);
76 76
 
77 77
 	/**
78
-	 * 修改报修内容
79
-	 * @param ticketId
78
+	 * 添加二手租赁帖子
79
+	 */
80
+    ResponseBean addAllTransaction(Integer userId,  TpTransaction Transaction);
81
+
82
+	/**
83
+	 * 获取当前用户所有的帖子
84
+	 * @param userId
85
+	 * @return
86
+	 */
87
+	ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer pageSize);
88
+
89
+	/**
90
+	 * 修改当前帖子
91
+	 * @param tpTransaction
92
+	 * @param userId
93
+	 * @return
94
+	 */
95
+	ResponseBean updateTransaction(TpTransaction tpTransaction,Integer userId);
96
+	void updateTicketContent(Integer ticketId, TpTicket tpTicket, String type);
97
+
98
+	/**
99
+	 * 评价工单以及评分
100
+	 * @param communityId
80 101
 	 * @param tpTicket
102
+	 * @param ticketId
81 103
 	 */
82
-	void updateTicketContent(Integer ticketId, TpTicket tpTicket);
104
+	void accessTicket(Integer communityId, TpTicket tpTicket, String ticketId);
83 105
 }

+ 18
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/AgreementServiceimpl.java Ver arquivo

@@ -1,12 +1,18 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.community.commom.mode.ResponseBean;
3 4
 import com.community.huiju.dao.TaAgreementMapper;
5
+import com.community.huiju.dao.TpannouncementTelMapper;
4 6
 import com.community.huiju.model.TaAgreement;
7
+import com.community.huiju.model.TpannouncementTel;
5 8
 import com.community.huiju.service.AgreementServicel;
6 9
 import org.springframework.beans.factory.annotation.Autowired;
7 10
 import org.springframework.stereotype.Service;
8 11
 
12
+import java.util.ArrayList;
13
+import java.util.HashMap;
9 14
 import java.util.List;
15
+import java.util.Map;
10 16
 
11 17
 @Service("agreementService")
12 18
 public class AgreementServiceimpl implements AgreementServicel {
@@ -14,6 +20,9 @@ public class AgreementServiceimpl implements AgreementServicel {
14 20
     @Autowired
15 21
     private TaAgreementMapper agreementMapper;
16 22
 
23
+    @Autowired
24
+    private TpannouncementTelMapper tpannouncementTelMapper;
25
+
17 26
     @Override
18 27
     public int deleteByPrimaryKey(Integer id) {
19 28
         return agreementMapper.deleteByPrimaryKey(id);
@@ -45,11 +54,18 @@ public class AgreementServiceimpl implements AgreementServicel {
45 54
     }
46 55
 
47 56
     /**
48
-     *
49 57
      * @return
50 58
      */
51 59
     @Override
52 60
     public TaAgreement getAgreement() {
53 61
         return agreementMapper.getAgreement();
54 62
     }
55
-}
63
+
64
+    @Override
65
+    public ResponseBean getTpAnnouncementTel() {
66
+        ResponseBean responseBody = new ResponseBean();
67
+        List<TpannouncementTel> tt = tpannouncementTelMapper.getTpannouncementTel();
68
+        responseBody.addSuccess(tt);
69
+        return responseBody;
70
+    }
71
+}

+ 49
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/BillServiceImpl.java Ver arquivo

@@ -0,0 +1,49 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.community.huiju.dao.TpBillInvoiceMapper;
4
+import com.community.huiju.service.BillServiceI;
5
+import com.github.pagehelper.PageHelper;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.stereotype.Service;
8
+
9
+import java.util.List;
10
+import java.util.Map;
11
+
12
+/**
13
+ * @author FXF
14
+ * @date 2018-10-25
15
+ */
16
+@Service("billService")
17
+public class BillServiceImpl implements BillServiceI {
18
+	
19
+	@Autowired
20
+	private TpBillInvoiceMapper tpBillInvoiceMapper;
21
+	
22
+	/**
23
+	 * 根据payType分页获取缴费或未缴费的数据
24
+	 * @param communityId
25
+	 * @param payType
26
+	 * @param pageNum
27
+	 * @param pageSize
28
+	 * @return
29
+	 */
30
+	@Override
31
+	public List<Map<String, Object>> getBillsList(Integer communityId, Integer payType, Integer pageNum, Integer pageSize) {
32
+		//todo
33
+		Integer userId = 1;
34
+		//使用分页插件
35
+		PageHelper.startPage(pageNum, pageSize);
36
+		List<Map<String,Object>> billsList = tpBillInvoiceMapper.getBillsList(communityId,userId,payType);
37
+		return billsList;
38
+	}
39
+	
40
+	/**
41
+	 * 获取账单的详细信息
42
+	 * @param billInvoiceId
43
+	 * @return
44
+	 */
45
+	@Override
46
+	public Map<String, Object> getBillInvoiceDetail(Integer communityId,Integer billInvoiceId) {
47
+		return tpBillInvoiceMapper.getBillInvoiceDetail(communityId,billInvoiceId);
48
+	}
49
+}

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

@@ -1,15 +1,18 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.constant.Constant;
4 5
 import com.community.commom.mode.ResponseBean;
5 6
 import com.community.huiju.dao.*;
6 7
 import com.community.huiju.model.*;
7 8
 import com.community.huiju.service.SocialServiceI;
8 9
 import com.github.pagehelper.PageHelper;
10
+import com.netflix.discovery.converters.Auto;
9 11
 import org.springframework.beans.factory.annotation.Autowired;
10 12
 import org.springframework.stereotype.Service;
11 13
 import org.springframework.transaction.annotation.Transactional;
12 14
 
15
+import java.text.SimpleDateFormat;
13 16
 import java.util.Date;
14 17
 import java.util.List;
15 18
 
@@ -39,6 +42,7 @@ public class SocialServiceImpl implements SocialServiceI {
39 42
     @Autowired
40 43
     private TpTransactionMapper tpTransactionMapper;
41 44
 
45
+    @Autowired
42 46
     private TaSysRoleMapper taSysRoleMapper;
43 47
 
44 48
     @Autowired
@@ -243,13 +247,82 @@ public class SocialServiceImpl implements SocialServiceI {
243 247
     }
244 248
 
245 249
     @Override
246
-    public void updateTicketContent(Integer ticketId, TpTicket tpTicket) {
250
+    public void updateTicketContent(Integer ticketId, TpTicket tpTicket, String type) {
247 251
         tpTicket.setId(ticketId);
252
+        tpTicket.setType(type);
253
+        tpTicketMapper.updateByPrimaryKeySelective(tpTicket);
254
+    }
255
+
256
+    @Override
257
+    public ResponseBean addAllTransaction(Integer userId, TpTransaction tpTransaction) {
258
+        ResponseBean response = new ResponseBean();
259
+        TaUser user=taUserMapper.selectByPrimaryKey(userId);
260
+        tpTransaction.setCommunityId(user.getCommunityId());
261
+        tpTransaction.setTaUserId(userId);
262
+        tpTransaction.setCreateUser(userId);
263
+        tpTransaction.setCreateDate(new Date());
264
+        tpTransaction.setUpdateUser(userId);
265
+        tpTransaction.setUpdateDate(new Date());
266
+        tpTransactionMapper.insert(tpTransaction);
267
+        response.addSuccess("发布成功");
268
+        return response;
269
+    }
270
+
271
+    @Override
272
+    public ResponseBean selectAllTransaction(Integer userId,Integer pageNum,Integer paeSize) {
273
+        PageHelper.startPage(pageNum, paeSize);
274
+        ResponseBean responseBean = new ResponseBean();
275
+        TaUser user=taUserMapper.selectByPrimaryKey(userId);
276
+         Integer communityId=user.getCommunityId();
277
+        List<TpTransaction> tpTransactions=tpTransactionMapper.selectTransaction(userId,communityId);
278
+        responseBean.addSuccess(tpTransactions);
279
+        return responseBean;
280
+    }
281
+
282
+    @Override
283
+    public ResponseBean updateTransaction(TpTransaction tpTransaction,Integer userId) {
284
+        ResponseBean response = new ResponseBean();
285
+        TaUser user=taUserMapper.selectByPrimaryKey(userId);
286
+        tpTransaction.setCommunityId(user.getCommunityId());
287
+        tpTransaction.setTaUserId(userId);
288
+        tpTransaction.setCreateUser(userId);
289
+        tpTransaction.setStatus("2");
290
+        tpTransaction.setCreateDate(new Date());
291
+        tpTransaction.setUpdateUser(userId);
292
+        tpTransaction.setUpdateDate(new Date());
293
+        tpTransactionMapper.updateByPrimaryKey(tpTransaction);
294
+        response.addSuccess("修改成功");
295
+        return response;
296
+    }
297
+
298
+    @Override
299
+    public void accessTicket(Integer communityId, TpTicket tpTicket, String ticketId) {
300
+        //修改工单内容和评分
301
+        tpTicket.setId(Integer.valueOf(ticketId));
302
+        tpTicket.setStatus("5");
248 303
         tpTicketMapper.updateByPrimaryKeySelective(tpTicket);
304
+
305
+        //工单处理表新增评分记录
306
+        TpTicketRecord record = new TpTicketRecord();
307
+        record.setCommunityId(communityId);
308
+        record.setTicketId(Integer.valueOf(ticketId));
309
+        record.setStatus("5");
310
+        //todo
311
+        record.setCreateUser(1);
312
+        record.setCreateDate(new Date());
313
+        tpTicketRecordMapper.insertSelective(record);
249 314
     }
250 315
 
251 316
     public ResponseBean insertActivitySignUp(TpActivity tpActivity, Integer communityId){
252 317
         ResponseBean responseBean = new ResponseBean();
318
+        //判断是否已经报名
319
+        //todo
320
+        Integer signNum = tpActivitySignupMapper.findTpActivetitySignByUserId(tpActivity.getId(), communityId, 1);
321
+        if (signNum != 0){
322
+            responseBean.addError("9996", "您已报名,请勿重复报名");
323
+            return responseBean;
324
+        }
325
+
253 326
         TpActivitySignup tpActivitySignup = new TpActivitySignup();
254 327
         tpActivitySignup.setActivityId(tpActivity.getId());
255 328
         tpActivitySignup.setCommunityId(communityId);
@@ -260,6 +333,7 @@ public class SocialServiceImpl implements SocialServiceI {
260 333
         return responseBean;
261 334
     }
262 335
 
336
+    @Transactional
263 337
     @Override
264 338
     public TpTransaction findUsedDetails(Integer activityId, Integer communityId, Integer userId) {
265 339
         Integer num = updateSocialView(userId,Constant.LEASE,communityId,activityId);

+ 178
- 3
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java Ver arquivo

@@ -1,22 +1,30 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.alibaba.fastjson.JSONObject;
3 4
 import com.community.commom.mode.ResponseBean;
4 5
 import com.community.commom.utils.AccountValidatorUtil;
5 6
 import com.community.commom.utils.MD5Utils;
6 7
 import com.community.huiju.common.code.cache.AppkeyCache;
8
+import com.community.huiju.dao.TaSysRoleMapper;
9
+import com.community.huiju.dao.TaSysUserRoleMapper;
7 10
 import com.community.huiju.dao.TaUserMapper;
11
+import com.community.huiju.dao.TpBuildingOwnerInfoMapper;
12
+import com.community.huiju.model.TaSysRole;
13
+import com.community.huiju.model.TaSysUserRole;
8 14
 import com.community.huiju.model.TaUser;
9 15
 import com.community.huiju.service.ITaUserService;
10 16
 import com.community.huiju.vo.TaUserVO;
11 17
 import com.google.common.collect.Maps;
12 18
 import lombok.extern.slf4j.Slf4j;
13 19
 import org.apache.commons.lang.StringUtils;
20
+import org.checkerframework.checker.units.qual.A;
14 21
 import org.springframework.beans.BeanUtils;
15 22
 import org.springframework.beans.factory.annotation.Autowired;
16 23
 import org.springframework.stereotype.Service;
17 24
 import org.springframework.transaction.annotation.Transactional;
18 25
 
19 26
 import java.util.Date;
27
+import java.util.List;
20 28
 import java.util.Map;
21 29
 
22 30
 /**
@@ -30,6 +38,15 @@ public class TaUserServiceImpl implements ITaUserService {
30 38
     @Autowired
31 39
     private TaUserMapper taUserMapper;
32 40
 
41
+    @Autowired
42
+    private TpBuildingOwnerInfoMapper tpBuildingOwnerInfoMapper;
43
+
44
+    @Autowired
45
+    private TaSysRoleMapper taSysRoleMapper;
46
+
47
+    @Autowired
48
+    private TaSysUserRoleMapper taSysUserRoleMapper;
49
+
33 50
     @Transactional
34 51
     @Override
35 52
     public ResponseBean login(TaUser user) {
@@ -137,13 +154,18 @@ public class TaUserServiceImpl implements ITaUserService {
137 154
         response.addSuccess(taUserVO);
138 155
         return response;
139 156
     }
140
-
157
+    @Transactional
141 158
     @Override
142
-    public ResponseBean selectloginName(Integer id, String phone, String code) {
159
+    public ResponseBean udDateloginName(Integer id, String paramets) {
143 160
         ResponseBean response = new ResponseBean();
161
+
162
+        JSONObject jsonObject = JSONObject.parseObject(paramets);
163
+        String phone = (String) jsonObject.get("phone");
164
+        String code = (String) jsonObject.get("code");
165
+
144 166
         TaUser user=taUserMapper.selectByPrimaryKey(id);
145 167
         //系统验证码
146
-        String  codes= (String) AppkeyCache.getCache(user.getLoginName());
168
+        String  codes= (String) AppkeyCache.getCache(phone);
147 169
         //用户电话
148 170
             /*String  phones=user.getLoginName();*/
149 171
         if(codes.equals(code)){
@@ -163,4 +185,157 @@ public class TaUserServiceImpl implements ITaUserService {
163 185
 
164 186
     }
165 187
 
188
+    @Override
189
+    public List<TaUser> getAllRoomUserList(Integer parentId) {
190
+        return taUserMapper.selectUserListByParentId(parentId);
191
+    }
192
+
193
+    @Transactional
194
+    @Override
195
+    public ResponseBean modifyUser(TaUser user) {
196
+
197
+        ResponseBean response = new ResponseBean();
198
+
199
+        TaUser taUser = taUserMapper.selectByPrimaryKey(user.getId());
200
+        BeanUtils.copyProperties(user,taUser);
201
+
202
+        int result = taUserMapper.updateByPrimaryKeySelective(taUser);
203
+
204
+        if (result > 0){
205
+            response.addSuccess("修改成功!");
206
+        }else {
207
+            response.addError("修改失败!");
208
+        }
209
+
210
+        return response;
211
+    }
212
+
213
+    @Transactional
214
+    @Override
215
+    public ResponseBean startOrEndUsingUser(Integer currentUserId, Integer userId, Integer type) {
216
+        ResponseBean response = null;
217
+        if ("1".equals(type)){
218
+            response = startAndEnd(currentUserId,userId,true);
219
+        } else {
220
+            response = startAndEnd(currentUserId,userId,false);
221
+        }
222
+        return response;
223
+    }
224
+
225
+    /**
226
+     *  用户停用和启用
227
+     * @param currentUserId 当前用户(业主)
228
+     * @param userId 租客或者家属
229
+     * @param bool 启用为 true  停用为 false
230
+     * @return
231
+     */
232
+    private ResponseBean startAndEnd(Integer currentUserId, Integer userId, boolean bool){
233
+
234
+        // TODO 更新人字段需要待定
235
+        /**
236
+         * 更新人 是业主 还是 物业
237
+         */
238
+
239
+        ResponseBean response = new ResponseBean();
240
+
241
+        TaUser user = taUserMapper.selectByPrimaryKey(userId);
242
+        if (null == user) {
243
+            response.addError("该用户不存在!");
244
+            return response;
245
+        }
246
+        if (!currentUserId.equals(user.getParentId())) {
247
+            response.addError("该用户不是您的家属或租客!");
248
+            return response;
249
+        }
250
+        if (bool) {
251
+            if ("1".equals(user.getStatus())) {
252
+                response.addError("用户已启用!");
253
+                return response;
254
+            }
255
+            user.setStatus("1");
256
+        } else {
257
+            if ("0".equals(user.getStatus())) {
258
+                response.addError("用户已停用!");
259
+                return response;
260
+            }
261
+            user.setStatus("0");
262
+        }
263
+
264
+        int result = taUserMapper.updateByPrimaryKeySelective(user);
265
+        if (result > 0) {
266
+            response.addSuccess(bool==true?"用户启用成功!":"用户停用成功!");
267
+        } else {
268
+            response.addError(bool==true?"用户启用失败!":"用户停用失败!");
269
+        }
270
+
271
+        return response;
272
+    }
273
+
274
+    @Transactional
275
+    @Override
276
+    public ResponseBean addTenantsOrDependents(String userName, String phone, String gender, Integer currentUserId, Integer type) {
277
+        ResponseBean response = new ResponseBean();
278
+
279
+        TaUser taUser = taUserMapper.selectByPrimaryKey(currentUserId);
280
+        if (null == taUser) {
281
+            response.addError("此用户不存在!");
282
+            return response;
283
+        }
284
+        if (taUser.getVerifyStatus().equals("0") || taUser.getVerifyStatus().equals("2")) {
285
+            response.addError("对不起,您未认证或认证已作废!");
286
+            return response;
287
+        }
288
+
289
+        TaUser user = new TaUser();
290
+        user.setUserName(userName);
291
+        user.setLoginName(phone);
292
+        user.setGender(gender);
293
+        user.setCreateDate(new Date());
294
+        user.setCreateUser(currentUserId);
295
+        user.setUpdateDate(new Date());
296
+        user.setUpdateUser(currentUserId);
297
+        user.setParentId(currentUserId);
298
+        user.setStatus("1");
299
+        user.setVerifyStatus("1");
300
+        user.setAcceptAgreementStatus("1");
301
+        user.setRemark("这是业主添加的!");
302
+        user.setUserName(user.getLoginName());
303
+        user.setBuildingOwnerInfoId(taUser.getBuildingOwnerInfoId());
304
+        user.setCommunityId(user.getCommunityId());
305
+
306
+        int result = taUserMapper.insertSelective(user);
307
+        if (result < 0) {
308
+            response.addError("添加失败!");
309
+            return response;
310
+        }
311
+
312
+        // 先查询角色 在角色关联记录
313
+        // 这里的 2 或者 3 是对应角色编号
314
+        int roleType = type.equals("0") ? 2 : 3;
315
+        TaSysRole taSysRole = taSysRoleMapper.selectByPrimaryKey(roleType);
316
+        if (null == taSysRole) {
317
+            response.addError("该权限不存在!");
318
+            log.error("这个角色没有找到!角色名称:{} 角色编号:{}",type.equals("0") ? "租客" : "家属",roleType);
319
+            return response;
320
+        }
321
+
322
+        TaSysUserRole taSysUserRole = new TaSysUserRole();
323
+        taSysUserRole.setCommunityId(user.getCommunityId());
324
+        taSysUserRole.setRoleId(taSysRole.getId());
325
+        taSysUserRole.setUserId(user.getId());
326
+        try {
327
+            int resultRole = taSysUserRoleMapper.insertSelective(taSysUserRole);
328
+            if (resultRole > 0) {
329
+                response.addSuccess("添加成功!");
330
+            } else {
331
+                throw new RuntimeException("租客或者家属角色权限添加失败");
332
+            }
333
+        } catch (Exception e) {
334
+            response.addSuccess("添加失败!");
335
+            log.error("租客或者家属角色权限添加失败!",e);
336
+            throw new RuntimeException("租客或者家属角色权限添加失败");
337
+        }
338
+
339
+        return response;
340
+    }
166 341
 }

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

@@ -1,15 +1,17 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3 3
 
4
+import com.community.commom.constant.Constant;
4 5
 import com.community.commom.mode.ResponseBean;
6
+import com.community.huiju.dao.TaUserMapper;
5 7
 import com.community.huiju.dao.TpTicketMapper;
6 8
 import com.community.huiju.dao.TpTicketRecordCommentMapper;
7 9
 import com.community.huiju.dao.TpTicketRecordMapper;
10
+import com.community.huiju.model.TaUser;
8 11
 import com.community.huiju.model.TpTicket;
9 12
 import com.community.huiju.model.TpTicketRecord;
10 13
 import com.community.huiju.model.TpTicketRecordComment;
11 14
 import com.community.huiju.service.ITicketService;
12
-
13 15
 import com.community.huiju.vo.TpTicketVO;
14 16
 import com.github.pagehelper.PageHelper;
15 17
 import com.google.common.collect.Lists;
@@ -19,6 +21,7 @@ import org.springframework.beans.BeanUtils;
19 21
 import org.springframework.beans.factory.annotation.Autowired;
20 22
 import org.springframework.stereotype.Service;
21 23
 
24
+import java.util.Date;
22 25
 import java.util.List;
23 26
 import java.util.Map;
24 27
 
@@ -38,6 +41,9 @@ public class TicketServiceImpl implements ITicketService {
38 41
 
39 42
     @Autowired
40 43
     private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
44
+    
45
+    @Autowired
46
+    private TaUserMapper taUserMapper;
41 47
 
42 48
     @Override
43 49
     public ResponseBean getList(TpTicket tpTicket,Integer pageNum, Integer pageSize) {
@@ -167,4 +173,47 @@ public class TicketServiceImpl implements ITicketService {
167 173
         }
168 174
         return ticket;
169 175
     }
176
+
177
+    @Override
178
+    public ResponseBean addAiTicketService(Integer userId, TpTicket tpTicket) {
179
+        ResponseBean response = new ResponseBean();
180
+        TaUser user = taUserMapper.selectByPrimaryKey(userId);
181
+        tpTicket.setCommunityId(user.getCommunityId());
182
+        tpTicket.setTaUserId(userId);
183
+        tpTicket.setTpUserId(userId);
184
+        tpTicket.setCreateUser(userId);
185
+        tpTicket.setCreateDate(new Date());
186
+        tpTicket.setUpdateUser(userId);
187
+        tpTicket.setUpdateDate(new Date());
188
+        tpTicketMapper.insert(tpTicket);
189
+        TpTicketRecord tpTicketRecord = new TpTicketRecord();
190
+        //获取当前插入的信息,维护工单记录表
191
+        TpTicket tpTicketReco = tpTicketMapper.getById(userId, user.getCommunityId());
192
+        tpTicketRecord.setCommunityId(user.getCommunityId());
193
+        tpTicketRecord.setTicketId(tpTicketReco.getId());
194
+        tpTicketRecord.setCreateUser(userId);
195
+        tpTicketRecord.setCreateDate(new Date());
196
+        tpTicketRecordMapper.insert(tpTicketRecord);
197
+        response.addSuccess("新增成功");
198
+        return response;
199
+    }
200
+    /**
201
+     * 回复工单
202
+     * @param tpTicketRecordComment
203
+     * @return
204
+     */
205
+    @Override
206
+    public Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment) {
207
+        Integer userId = 1;
208
+        //查询用户名
209
+        TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
210
+        
211
+        tpTicketRecordComment.setUserName(taUser.getUserName());
212
+        tpTicketRecordComment.setParentId(tpTicketRecordComment.getTicketRecordCommentId());
213
+        tpTicketRecordComment.setUuid(userId);
214
+        tpTicketRecordComment.setUserType(Constant.TICKET_USER_TYPE);
215
+        tpTicketRecordComment.setCreateDate(new Date());
216
+        //插入回复数据
217
+        return tpTicketRecordCommentMapper.insertSelective(tpTicketRecordComment);
218
+    }
170 219
 }

+ 2
- 0
CODE/smart-community/app-api/src/main/resources/application.yml Ver arquivo

@@ -7,6 +7,8 @@ management:
7 7
 mybatis:
8 8
   typeAliasesPackage: com.community.huiju.model
9 9
   mapperLocations: classpath:mapper/*.xml
10
+  configuration:
11
+    call-setters-on-nulls: true
10 12
 # 分页配置
11 13
 pagehelper:
12 14
   helper-dialect: mysql

+ 7
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml Ver arquivo

@@ -52,7 +52,7 @@
52 52
       #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
53 53
       )
54 54
   </insert>
55
-  <insert id="insertSelective" parameterType="com.community.huiju.model.TaUser" >
55
+  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.community.huiju.model.TaUser" >
56 56
     insert into ta_user
57 57
     <trim prefix="(" suffix=")" suffixOverrides="," >
58 58
       <if test="id != null" >
@@ -267,4 +267,10 @@
267 267
     where id = #{id,jdbcType=INTEGER}
268 268
   </select>
269 269
 
270
+  <select id="selectUserListByParentId" parameterType="java.lang.Integer" resultMap="BaseResultMap" >
271
+    select
272
+    <include refid="Base_Column_List" />
273
+    from ta_user
274
+    where parent_id = #{parentId}
275
+  </select>
270 276
 </mapper>

+ 2
- 1
CODE/smart-community/app-api/src/main/resources/mapper/ToBannerMapper.xml Ver arquivo

@@ -32,7 +32,8 @@
32 32
 
33 33
   <select id="selectAllByNum" resultMap="BaseResultMap">
34 34
     select
35
-    <include refid="Base_Column_List"></include>
35
+    id, community_id, banner_description, sort, banner_cover, banner_position, eff_time,
36
+    exp_time, banner_type, external_link, banner_title, create_user, create_date
36 37
     from to_banner t where t.eff_time &lt; #{nowTime}
37 38
     and t.exp_time &gt; #{nowTime}
38 39
     order by t.sort, t.eff_time

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

@@ -111,4 +111,10 @@
111 111
     where activity_id = #{id,jdbcType=INTEGER} and community_id = #{communityId}
112 112
   </select>
113 113
 
114
+  <select id="findTpActivetitySignByUserId" resultType="java.lang.Integer">
115
+    select
116
+    count(*)
117
+    from tp_activity_sign_up
118
+    where activity_id = #{activityId} and community_id = #{communityId} and ta_user_id = #{userId}
119
+  </select>
114 120
 </mapper>

+ 264
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBillInvoiceMapper.xml Ver arquivo

@@ -0,0 +1,264 @@
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.TpBillInvoiceMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBillInvoice" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="bill_id" property="billId" jdbcType="INTEGER" />
8
+    <result column="building_owner_info_id" property="buildingOwnerInfoId" jdbcType="INTEGER" />
9
+    <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
10
+    <result column="bill_invoice_explain" property="billInvoiceExplain" jdbcType="VARCHAR" />
11
+    <result column="pay_price" property="payPrice" jdbcType="INTEGER" />
12
+    <result column="bill_statement_id" property="billStatementId" jdbcType="INTEGER" />
13
+    <result column="bill_status" property="billStatus" jdbcType="CHAR" />
14
+    <result column="pay_name" property="payName" jdbcType="VARCHAR" />
15
+    <result column="pay_date" property="payDate" jdbcType="TIMESTAMP" />
16
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
17
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
18
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
19
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
20
+  </resultMap>
21
+  <sql id="Base_Column_List" >
22
+    id, community_id, bill_id, building_owner_info_id, ta_user_id, bill_invoice_explain, 
23
+    pay_price, bill_statement_id, bill_status, pay_name, pay_date, create_user, create_date, 
24
+    update_user, update_date
25
+  </sql>
26
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
27
+    select 
28
+    <include refid="Base_Column_List" />
29
+    from tp_bill_invoice
30
+    where id = #{id,jdbcType=INTEGER}
31
+  </select>
32
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
33
+    delete from tp_bill_invoice
34
+    where id = #{id,jdbcType=INTEGER}
35
+  </delete>
36
+  <insert id="insert" parameterType="com.community.huiju.model.TpBillInvoice" >
37
+    insert into tp_bill_invoice (id, community_id, bill_id, 
38
+      building_owner_info_id, ta_user_id, bill_invoice_explain, 
39
+      pay_price, bill_statement_id, bill_status, 
40
+      pay_name, pay_date, create_user, 
41
+      create_date, update_user, update_date
42
+      )
43
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{billId,jdbcType=INTEGER}, 
44
+      #{buildingOwnerInfoId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER}, #{billInvoiceExplain,jdbcType=VARCHAR}, 
45
+      #{payPrice,jdbcType=INTEGER}, #{billStatementId,jdbcType=INTEGER}, #{billStatus,jdbcType=CHAR}, 
46
+      #{payName,jdbcType=VARCHAR}, #{payDate,jdbcType=TIMESTAMP}, #{createUser,jdbcType=INTEGER}, 
47
+      #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP}
48
+      )
49
+  </insert>
50
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBillInvoice" >
51
+    insert into tp_bill_invoice
52
+    <trim prefix="(" suffix=")" suffixOverrides="," >
53
+      <if test="id != null" >
54
+        id,
55
+      </if>
56
+      <if test="communityId != null" >
57
+        community_id,
58
+      </if>
59
+      <if test="billId != null" >
60
+        bill_id,
61
+      </if>
62
+      <if test="buildingOwnerInfoId != null" >
63
+        building_owner_info_id,
64
+      </if>
65
+      <if test="taUserId != null" >
66
+        ta_user_id,
67
+      </if>
68
+      <if test="billInvoiceExplain != null" >
69
+        bill_invoice_explain,
70
+      </if>
71
+      <if test="payPrice != null" >
72
+        pay_price,
73
+      </if>
74
+      <if test="billStatementId != null" >
75
+        bill_statement_id,
76
+      </if>
77
+      <if test="billStatus != null" >
78
+        bill_status,
79
+      </if>
80
+      <if test="payName != null" >
81
+        pay_name,
82
+      </if>
83
+      <if test="payDate != null" >
84
+        pay_date,
85
+      </if>
86
+      <if test="createUser != null" >
87
+        create_user,
88
+      </if>
89
+      <if test="createDate != null" >
90
+        create_date,
91
+      </if>
92
+      <if test="updateUser != null" >
93
+        update_user,
94
+      </if>
95
+      <if test="updateDate != null" >
96
+        update_date,
97
+      </if>
98
+    </trim>
99
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
100
+      <if test="id != null" >
101
+        #{id,jdbcType=INTEGER},
102
+      </if>
103
+      <if test="communityId != null" >
104
+        #{communityId,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="billId != null" >
107
+        #{billId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="buildingOwnerInfoId != null" >
110
+        #{buildingOwnerInfoId,jdbcType=INTEGER},
111
+      </if>
112
+      <if test="taUserId != null" >
113
+        #{taUserId,jdbcType=INTEGER},
114
+      </if>
115
+      <if test="billInvoiceExplain != null" >
116
+        #{billInvoiceExplain,jdbcType=VARCHAR},
117
+      </if>
118
+      <if test="payPrice != null" >
119
+        #{payPrice,jdbcType=INTEGER},
120
+      </if>
121
+      <if test="billStatementId != null" >
122
+        #{billStatementId,jdbcType=INTEGER},
123
+      </if>
124
+      <if test="billStatus != null" >
125
+        #{billStatus,jdbcType=CHAR},
126
+      </if>
127
+      <if test="payName != null" >
128
+        #{payName,jdbcType=VARCHAR},
129
+      </if>
130
+      <if test="payDate != null" >
131
+        #{payDate,jdbcType=TIMESTAMP},
132
+      </if>
133
+      <if test="createUser != null" >
134
+        #{createUser,jdbcType=INTEGER},
135
+      </if>
136
+      <if test="createDate != null" >
137
+        #{createDate,jdbcType=TIMESTAMP},
138
+      </if>
139
+      <if test="updateUser != null" >
140
+        #{updateUser,jdbcType=INTEGER},
141
+      </if>
142
+      <if test="updateDate != null" >
143
+        #{updateDate,jdbcType=TIMESTAMP},
144
+      </if>
145
+    </trim>
146
+  </insert>
147
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBillInvoice" >
148
+    update tp_bill_invoice
149
+    <set >
150
+      <if test="communityId != null" >
151
+        community_id = #{communityId,jdbcType=INTEGER},
152
+      </if>
153
+      <if test="billId != null" >
154
+        bill_id = #{billId,jdbcType=INTEGER},
155
+      </if>
156
+      <if test="buildingOwnerInfoId != null" >
157
+        building_owner_info_id = #{buildingOwnerInfoId,jdbcType=INTEGER},
158
+      </if>
159
+      <if test="taUserId != null" >
160
+        ta_user_id = #{taUserId,jdbcType=INTEGER},
161
+      </if>
162
+      <if test="billInvoiceExplain != null" >
163
+        bill_invoice_explain = #{billInvoiceExplain,jdbcType=VARCHAR},
164
+      </if>
165
+      <if test="payPrice != null" >
166
+        pay_price = #{payPrice,jdbcType=INTEGER},
167
+      </if>
168
+      <if test="billStatementId != null" >
169
+        bill_statement_id = #{billStatementId,jdbcType=INTEGER},
170
+      </if>
171
+      <if test="billStatus != null" >
172
+        bill_status = #{billStatus,jdbcType=CHAR},
173
+      </if>
174
+      <if test="payName != null" >
175
+        pay_name = #{payName,jdbcType=VARCHAR},
176
+      </if>
177
+      <if test="payDate != null" >
178
+        pay_date = #{payDate,jdbcType=TIMESTAMP},
179
+      </if>
180
+      <if test="createUser != null" >
181
+        create_user = #{createUser,jdbcType=INTEGER},
182
+      </if>
183
+      <if test="createDate != null" >
184
+        create_date = #{createDate,jdbcType=TIMESTAMP},
185
+      </if>
186
+      <if test="updateUser != null" >
187
+        update_user = #{updateUser,jdbcType=INTEGER},
188
+      </if>
189
+      <if test="updateDate != null" >
190
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
191
+      </if>
192
+    </set>
193
+    where id = #{id,jdbcType=INTEGER}
194
+  </update>
195
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBillInvoice" >
196
+    update tp_bill_invoice
197
+    set community_id = #{communityId,jdbcType=INTEGER},
198
+      bill_id = #{billId,jdbcType=INTEGER},
199
+      building_owner_info_id = #{buildingOwnerInfoId,jdbcType=INTEGER},
200
+      ta_user_id = #{taUserId,jdbcType=INTEGER},
201
+      bill_invoice_explain = #{billInvoiceExplain,jdbcType=VARCHAR},
202
+      pay_price = #{payPrice,jdbcType=INTEGER},
203
+      bill_statement_id = #{billStatementId,jdbcType=INTEGER},
204
+      bill_status = #{billStatus,jdbcType=CHAR},
205
+      pay_name = #{payName,jdbcType=VARCHAR},
206
+      pay_date = #{payDate,jdbcType=TIMESTAMP},
207
+      create_user = #{createUser,jdbcType=INTEGER},
208
+      create_date = #{createDate,jdbcType=TIMESTAMP},
209
+      update_user = #{updateUser,jdbcType=INTEGER},
210
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
211
+    where id = #{id,jdbcType=INTEGER}
212
+  </update>
213
+
214
+  <select id="getBillsList" resultType="map">
215
+      SELECT
216
+          i.id,
217
+          i.bill_invoice_explain as billInvoiceExplain,
218
+          i.pay_price AS payPrice,
219
+          i.ta_user_id AS taUserId,
220
+          i.bill_status AS billStatus,
221
+          b.bill_name AS billName,
222
+          b.bill_explain AS billExplain,
223
+          b.end_date AS endDate
224
+      FROM
225
+          tp_bill_invoice i
226
+          LEFT JOIN tp_bill b ON b.id = i.bill_id
227
+          AND b.community_id = #{communityId,jdbcType=INTEGER}
228
+      WHERE
229
+          i.community_id = #{communityId,jdbcType=INTEGER}
230
+          <if test="payType == 0">
231
+            AND i.bill_status = 0
232
+          </if>
233
+          <if test="payType == 1">
234
+            AND (i.bill_status = 1 or i.bill_status = 2)
235
+          </if>
236
+          AND i.ta_user_id = #{userId,jdbcType=INTEGER}
237
+  </select>
238
+
239
+  <select id="getBillInvoiceDetail" resultType="map">
240
+    SELECT
241
+        i.id,
242
+        i.bill_invoice_explain AS billInvoiceExplain,
243
+        i.pay_price AS payPrice,
244
+        i.ta_user_id AS taUserId,
245
+        i.bill_status AS billStatus,
246
+        b.bill_name AS billName,
247
+        b.bill_explain AS billExplain,
248
+        b.end_date AS endDate,
249
+        s.id AS billStatementId,
250
+        s.pay_name AS payName,
251
+        s.pay_remark AS payRemark,
252
+        s.pay_type AS payType,
253
+        s.create_time AS createTime
254
+    FROM
255
+        tp_bill_invoice i
256
+        LEFT JOIN tp_bill b ON b.id = i.bill_id
257
+        AND b.community_id = #{communityId,jdbcType=INTEGER}
258
+        LEFT JOIN tp_bill_statement s ON i.bill_statement_id = s.id
259
+        AND s.community_id = #{communityId,jdbcType=INTEGER}
260
+    WHERE
261
+        i.id = #{billInvoiceId,jdbcType=INTEGER}
262
+    AND i.community_id = #{communityId,jdbcType=INTEGER}
263
+  </select>
264
+</mapper>

+ 199
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBillMapper.xml Ver arquivo

@@ -0,0 +1,199 @@
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.TpBillMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBill" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="bill_name" property="billName" jdbcType="VARCHAR" />
8
+    <result column="bill_explain" property="billExplain" jdbcType="VARCHAR" />
9
+    <result column="pay_price" property="payPrice" jdbcType="CHAR" />
10
+    <result column="pay_total_num" property="payTotalNum" jdbcType="INTEGER" />
11
+    <result column="payed_num" property="payedNum" jdbcType="INTEGER" />
12
+    <result column="unpayed_num" property="unpayedNum" jdbcType="INTEGER" />
13
+    <result column="bill_status" property="billStatus" jdbcType="CHAR" />
14
+    <result column="end_date" property="endDate" jdbcType="TIMESTAMP" />
15
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
16
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
17
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
18
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
19
+  </resultMap>
20
+  <sql id="Base_Column_List" >
21
+    id, community_id, bill_name, bill_explain, pay_price, pay_total_num, payed_num, unpayed_num, 
22
+    bill_status, end_date, create_user, create_date, update_user, update_date
23
+  </sql>
24
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
25
+    select 
26
+    <include refid="Base_Column_List" />
27
+    from tp_bill
28
+    where id = #{id,jdbcType=INTEGER}
29
+  </select>
30
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
31
+    delete from tp_bill
32
+    where id = #{id,jdbcType=INTEGER}
33
+  </delete>
34
+  <insert id="insert" parameterType="com.community.huiju.model.TpBill" >
35
+    insert into tp_bill (id, community_id, bill_name, 
36
+      bill_explain, pay_price, pay_total_num, 
37
+      payed_num, unpayed_num, bill_status, 
38
+      end_date, create_user, create_date, 
39
+      update_user, update_date)
40
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{billName,jdbcType=VARCHAR}, 
41
+      #{billExplain,jdbcType=VARCHAR}, #{payPrice,jdbcType=CHAR}, #{payTotalNum,jdbcType=INTEGER}, 
42
+      #{payedNum,jdbcType=INTEGER}, #{unpayedNum,jdbcType=INTEGER}, #{billStatus,jdbcType=CHAR}, 
43
+      #{endDate,jdbcType=TIMESTAMP}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
44
+      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
45
+  </insert>
46
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBill" >
47
+    insert into tp_bill
48
+    <trim prefix="(" suffix=")" suffixOverrides="," >
49
+      <if test="id != null" >
50
+        id,
51
+      </if>
52
+      <if test="communityId != null" >
53
+        community_id,
54
+      </if>
55
+      <if test="billName != null" >
56
+        bill_name,
57
+      </if>
58
+      <if test="billExplain != null" >
59
+        bill_explain,
60
+      </if>
61
+      <if test="payPrice != null" >
62
+        pay_price,
63
+      </if>
64
+      <if test="payTotalNum != null" >
65
+        pay_total_num,
66
+      </if>
67
+      <if test="payedNum != null" >
68
+        payed_num,
69
+      </if>
70
+      <if test="unpayedNum != null" >
71
+        unpayed_num,
72
+      </if>
73
+      <if test="billStatus != null" >
74
+        bill_status,
75
+      </if>
76
+      <if test="endDate != null" >
77
+        end_date,
78
+      </if>
79
+      <if test="createUser != null" >
80
+        create_user,
81
+      </if>
82
+      <if test="createDate != null" >
83
+        create_date,
84
+      </if>
85
+      <if test="updateUser != null" >
86
+        update_user,
87
+      </if>
88
+      <if test="updateDate != null" >
89
+        update_date,
90
+      </if>
91
+    </trim>
92
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
93
+      <if test="id != null" >
94
+        #{id,jdbcType=INTEGER},
95
+      </if>
96
+      <if test="communityId != null" >
97
+        #{communityId,jdbcType=INTEGER},
98
+      </if>
99
+      <if test="billName != null" >
100
+        #{billName,jdbcType=VARCHAR},
101
+      </if>
102
+      <if test="billExplain != null" >
103
+        #{billExplain,jdbcType=VARCHAR},
104
+      </if>
105
+      <if test="payPrice != null" >
106
+        #{payPrice,jdbcType=CHAR},
107
+      </if>
108
+      <if test="payTotalNum != null" >
109
+        #{payTotalNum,jdbcType=INTEGER},
110
+      </if>
111
+      <if test="payedNum != null" >
112
+        #{payedNum,jdbcType=INTEGER},
113
+      </if>
114
+      <if test="unpayedNum != null" >
115
+        #{unpayedNum,jdbcType=INTEGER},
116
+      </if>
117
+      <if test="billStatus != null" >
118
+        #{billStatus,jdbcType=CHAR},
119
+      </if>
120
+      <if test="endDate != null" >
121
+        #{endDate,jdbcType=TIMESTAMP},
122
+      </if>
123
+      <if test="createUser != null" >
124
+        #{createUser,jdbcType=INTEGER},
125
+      </if>
126
+      <if test="createDate != null" >
127
+        #{createDate,jdbcType=TIMESTAMP},
128
+      </if>
129
+      <if test="updateUser != null" >
130
+        #{updateUser,jdbcType=INTEGER},
131
+      </if>
132
+      <if test="updateDate != null" >
133
+        #{updateDate,jdbcType=TIMESTAMP},
134
+      </if>
135
+    </trim>
136
+  </insert>
137
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBill" >
138
+    update tp_bill
139
+    <set >
140
+      <if test="communityId != null" >
141
+        community_id = #{communityId,jdbcType=INTEGER},
142
+      </if>
143
+      <if test="billName != null" >
144
+        bill_name = #{billName,jdbcType=VARCHAR},
145
+      </if>
146
+      <if test="billExplain != null" >
147
+        bill_explain = #{billExplain,jdbcType=VARCHAR},
148
+      </if>
149
+      <if test="payPrice != null" >
150
+        pay_price = #{payPrice,jdbcType=CHAR},
151
+      </if>
152
+      <if test="payTotalNum != null" >
153
+        pay_total_num = #{payTotalNum,jdbcType=INTEGER},
154
+      </if>
155
+      <if test="payedNum != null" >
156
+        payed_num = #{payedNum,jdbcType=INTEGER},
157
+      </if>
158
+      <if test="unpayedNum != null" >
159
+        unpayed_num = #{unpayedNum,jdbcType=INTEGER},
160
+      </if>
161
+      <if test="billStatus != null" >
162
+        bill_status = #{billStatus,jdbcType=CHAR},
163
+      </if>
164
+      <if test="endDate != null" >
165
+        end_date = #{endDate,jdbcType=TIMESTAMP},
166
+      </if>
167
+      <if test="createUser != null" >
168
+        create_user = #{createUser,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="createDate != null" >
171
+        create_date = #{createDate,jdbcType=TIMESTAMP},
172
+      </if>
173
+      <if test="updateUser != null" >
174
+        update_user = #{updateUser,jdbcType=INTEGER},
175
+      </if>
176
+      <if test="updateDate != null" >
177
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
178
+      </if>
179
+    </set>
180
+    where id = #{id,jdbcType=INTEGER}
181
+  </update>
182
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBill" >
183
+    update tp_bill
184
+    set community_id = #{communityId,jdbcType=INTEGER},
185
+      bill_name = #{billName,jdbcType=VARCHAR},
186
+      bill_explain = #{billExplain,jdbcType=VARCHAR},
187
+      pay_price = #{payPrice,jdbcType=CHAR},
188
+      pay_total_num = #{payTotalNum,jdbcType=INTEGER},
189
+      payed_num = #{payedNum,jdbcType=INTEGER},
190
+      unpayed_num = #{unpayedNum,jdbcType=INTEGER},
191
+      bill_status = #{billStatus,jdbcType=CHAR},
192
+      end_date = #{endDate,jdbcType=TIMESTAMP},
193
+      create_user = #{createUser,jdbcType=INTEGER},
194
+      create_date = #{createDate,jdbcType=TIMESTAMP},
195
+      update_user = #{updateUser,jdbcType=INTEGER},
196
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
197
+    where id = #{id,jdbcType=INTEGER}
198
+  </update>
199
+</mapper>

+ 142
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBillStatementMapper.xml Ver arquivo

@@ -0,0 +1,142 @@
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.TpBillStatementMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBillStatement" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="bill_invoice_id" property="billInvoiceId" jdbcType="INTEGER" />
8
+    <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
9
+    <result column="pay_price" property="payPrice" jdbcType="INTEGER" />
10
+    <result column="pay_name" property="payName" jdbcType="VARCHAR" />
11
+    <result column="pay_remark" property="payRemark" jdbcType="VARCHAR" />
12
+    <result column="pay_type" property="payType" jdbcType="CHAR" />
13
+    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
14
+  </resultMap>
15
+  <sql id="Base_Column_List" >
16
+    id, community_id, bill_invoice_id, ta_user_id, pay_price, pay_name, pay_remark, pay_type, 
17
+    create_time
18
+  </sql>
19
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
20
+    select 
21
+    <include refid="Base_Column_List" />
22
+    from tp_bill_statement
23
+    where id = #{id,jdbcType=INTEGER}
24
+  </select>
25
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
26
+    delete from tp_bill_statement
27
+    where id = #{id,jdbcType=INTEGER}
28
+  </delete>
29
+  <insert id="insert" parameterType="com.community.huiju.model.TpBillStatement" >
30
+    insert into tp_bill_statement (id, community_id, bill_invoice_id, 
31
+      ta_user_id, pay_price, pay_name, 
32
+      pay_remark, pay_type, create_time
33
+      )
34
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{billInvoiceId,jdbcType=INTEGER}, 
35
+      #{taUserId,jdbcType=INTEGER}, #{payPrice,jdbcType=INTEGER}, #{payName,jdbcType=VARCHAR}, 
36
+      #{payRemark,jdbcType=VARCHAR}, #{payType,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}
37
+      )
38
+  </insert>
39
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBillStatement" >
40
+    insert into tp_bill_statement
41
+    <trim prefix="(" suffix=")" suffixOverrides="," >
42
+      <if test="id != null" >
43
+        id,
44
+      </if>
45
+      <if test="communityId != null" >
46
+        community_id,
47
+      </if>
48
+      <if test="billInvoiceId != null" >
49
+        bill_invoice_id,
50
+      </if>
51
+      <if test="taUserId != null" >
52
+        ta_user_id,
53
+      </if>
54
+      <if test="payPrice != null" >
55
+        pay_price,
56
+      </if>
57
+      <if test="payName != null" >
58
+        pay_name,
59
+      </if>
60
+      <if test="payRemark != null" >
61
+        pay_remark,
62
+      </if>
63
+      <if test="payType != null" >
64
+        pay_type,
65
+      </if>
66
+      <if test="createTime != null" >
67
+        create_time,
68
+      </if>
69
+    </trim>
70
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
71
+      <if test="id != null" >
72
+        #{id,jdbcType=INTEGER},
73
+      </if>
74
+      <if test="communityId != null" >
75
+        #{communityId,jdbcType=INTEGER},
76
+      </if>
77
+      <if test="billInvoiceId != null" >
78
+        #{billInvoiceId,jdbcType=INTEGER},
79
+      </if>
80
+      <if test="taUserId != null" >
81
+        #{taUserId,jdbcType=INTEGER},
82
+      </if>
83
+      <if test="payPrice != null" >
84
+        #{payPrice,jdbcType=INTEGER},
85
+      </if>
86
+      <if test="payName != null" >
87
+        #{payName,jdbcType=VARCHAR},
88
+      </if>
89
+      <if test="payRemark != null" >
90
+        #{payRemark,jdbcType=VARCHAR},
91
+      </if>
92
+      <if test="payType != null" >
93
+        #{payType,jdbcType=CHAR},
94
+      </if>
95
+      <if test="createTime != null" >
96
+        #{createTime,jdbcType=TIMESTAMP},
97
+      </if>
98
+    </trim>
99
+  </insert>
100
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBillStatement" >
101
+    update tp_bill_statement
102
+    <set >
103
+      <if test="communityId != null" >
104
+        community_id = #{communityId,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="billInvoiceId != null" >
107
+        bill_invoice_id = #{billInvoiceId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="taUserId != null" >
110
+        ta_user_id = #{taUserId,jdbcType=INTEGER},
111
+      </if>
112
+      <if test="payPrice != null" >
113
+        pay_price = #{payPrice,jdbcType=INTEGER},
114
+      </if>
115
+      <if test="payName != null" >
116
+        pay_name = #{payName,jdbcType=VARCHAR},
117
+      </if>
118
+      <if test="payRemark != null" >
119
+        pay_remark = #{payRemark,jdbcType=VARCHAR},
120
+      </if>
121
+      <if test="payType != null" >
122
+        pay_type = #{payType,jdbcType=CHAR},
123
+      </if>
124
+      <if test="createTime != null" >
125
+        create_time = #{createTime,jdbcType=TIMESTAMP},
126
+      </if>
127
+    </set>
128
+    where id = #{id,jdbcType=INTEGER}
129
+  </update>
130
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBillStatement" >
131
+    update tp_bill_statement
132
+    set community_id = #{communityId,jdbcType=INTEGER},
133
+      bill_invoice_id = #{billInvoiceId,jdbcType=INTEGER},
134
+      ta_user_id = #{taUserId,jdbcType=INTEGER},
135
+      pay_price = #{payPrice,jdbcType=INTEGER},
136
+      pay_name = #{payName,jdbcType=VARCHAR},
137
+      pay_remark = #{payRemark,jdbcType=VARCHAR},
138
+      pay_type = #{payType,jdbcType=CHAR},
139
+      create_time = #{createTime,jdbcType=TIMESTAMP}
140
+    where id = #{id,jdbcType=INTEGER}
141
+  </update>
142
+</mapper>

+ 223
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml Ver arquivo

@@ -0,0 +1,223 @@
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.TpBuildingOwnerInfoMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpBuildingOwnerInfo" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
+    <result column="id_card" property="idCard" jdbcType="VARCHAR" />
8
+    <result column="building" property="building" jdbcType="VARCHAR" />
9
+    <result column="unit" property="unit" jdbcType="VARCHAR" />
10
+    <result column="level" property="level" jdbcType="VARCHAR" />
11
+    <result column="room_no" property="roomNo" jdbcType="VARCHAR" />
12
+    <result column="owner_name" property="ownerName" jdbcType="VARCHAR" />
13
+    <result column="owner_tel" property="ownerTel" jdbcType="VARCHAR" />
14
+    <result column="gender" property="gender" jdbcType="CHAR" />
15
+    <result column="pair_status" property="pairStatus" jdbcType="CHAR" />
16
+    <result column="verify_status" property="verifyStatus" jdbcType="CHAR" />
17
+    <result column="create_user" property="createUser" jdbcType="INTEGER" />
18
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
19
+    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
20
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
21
+  </resultMap>
22
+  <sql id="Base_Column_List" >
23
+    id, community_id, id_card, building, unit, level, room_no, owner_name, owner_tel, 
24
+    gender, pair_status, verify_status, create_user, create_date, update_user, update_date
25
+  </sql>
26
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
27
+    select 
28
+    <include refid="Base_Column_List" />
29
+    from tp_building_owner_info
30
+    where id = #{id,jdbcType=INTEGER}
31
+  </select>
32
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
33
+    delete from tp_building_owner_info
34
+    where id = #{id,jdbcType=INTEGER}
35
+  </delete>
36
+  <insert id="insert" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
37
+    insert into tp_building_owner_info (id, community_id, id_card, 
38
+      building, unit, level, 
39
+      room_no, owner_name, owner_tel, 
40
+      gender, pair_status, verify_status, 
41
+      create_user, create_date, update_user, 
42
+      update_date)
43
+    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{idCard,jdbcType=VARCHAR}, 
44
+      #{building,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, 
45
+      #{roomNo,jdbcType=VARCHAR}, #{ownerName,jdbcType=VARCHAR}, #{ownerTel,jdbcType=VARCHAR}, 
46
+      #{gender,jdbcType=CHAR}, #{pairStatus,jdbcType=CHAR}, #{verifyStatus,jdbcType=CHAR}, 
47
+      #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=INTEGER}, 
48
+      #{updateDate,jdbcType=TIMESTAMP})
49
+  </insert>
50
+  <insert id="insertSelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
51
+    insert into tp_building_owner_info
52
+    <trim prefix="(" suffix=")" suffixOverrides="," >
53
+      <if test="id != null" >
54
+        id,
55
+      </if>
56
+      <if test="communityId != null" >
57
+        community_id,
58
+      </if>
59
+      <if test="idCard != null" >
60
+        id_card,
61
+      </if>
62
+      <if test="building != null" >
63
+        building,
64
+      </if>
65
+      <if test="unit != null" >
66
+        unit,
67
+      </if>
68
+      <if test="level != null" >
69
+        level,
70
+      </if>
71
+      <if test="roomNo != null" >
72
+        room_no,
73
+      </if>
74
+      <if test="ownerName != null" >
75
+        owner_name,
76
+      </if>
77
+      <if test="ownerTel != null" >
78
+        owner_tel,
79
+      </if>
80
+      <if test="gender != null" >
81
+        gender,
82
+      </if>
83
+      <if test="pairStatus != null" >
84
+        pair_status,
85
+      </if>
86
+      <if test="verifyStatus != null" >
87
+        verify_status,
88
+      </if>
89
+      <if test="createUser != null" >
90
+        create_user,
91
+      </if>
92
+      <if test="createDate != null" >
93
+        create_date,
94
+      </if>
95
+      <if test="updateUser != null" >
96
+        update_user,
97
+      </if>
98
+      <if test="updateDate != null" >
99
+        update_date,
100
+      </if>
101
+    </trim>
102
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
103
+      <if test="id != null" >
104
+        #{id,jdbcType=INTEGER},
105
+      </if>
106
+      <if test="communityId != null" >
107
+        #{communityId,jdbcType=INTEGER},
108
+      </if>
109
+      <if test="idCard != null" >
110
+        #{idCard,jdbcType=VARCHAR},
111
+      </if>
112
+      <if test="building != null" >
113
+        #{building,jdbcType=VARCHAR},
114
+      </if>
115
+      <if test="unit != null" >
116
+        #{unit,jdbcType=VARCHAR},
117
+      </if>
118
+      <if test="level != null" >
119
+        #{level,jdbcType=VARCHAR},
120
+      </if>
121
+      <if test="roomNo != null" >
122
+        #{roomNo,jdbcType=VARCHAR},
123
+      </if>
124
+      <if test="ownerName != null" >
125
+        #{ownerName,jdbcType=VARCHAR},
126
+      </if>
127
+      <if test="ownerTel != null" >
128
+        #{ownerTel,jdbcType=VARCHAR},
129
+      </if>
130
+      <if test="gender != null" >
131
+        #{gender,jdbcType=CHAR},
132
+      </if>
133
+      <if test="pairStatus != null" >
134
+        #{pairStatus,jdbcType=CHAR},
135
+      </if>
136
+      <if test="verifyStatus != null" >
137
+        #{verifyStatus,jdbcType=CHAR},
138
+      </if>
139
+      <if test="createUser != null" >
140
+        #{createUser,jdbcType=INTEGER},
141
+      </if>
142
+      <if test="createDate != null" >
143
+        #{createDate,jdbcType=TIMESTAMP},
144
+      </if>
145
+      <if test="updateUser != null" >
146
+        #{updateUser,jdbcType=INTEGER},
147
+      </if>
148
+      <if test="updateDate != null" >
149
+        #{updateDate,jdbcType=TIMESTAMP},
150
+      </if>
151
+    </trim>
152
+  </insert>
153
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
154
+    update tp_building_owner_info
155
+    <set >
156
+      <if test="communityId != null" >
157
+        community_id = #{communityId,jdbcType=INTEGER},
158
+      </if>
159
+      <if test="idCard != null" >
160
+        id_card = #{idCard,jdbcType=VARCHAR},
161
+      </if>
162
+      <if test="building != null" >
163
+        building = #{building,jdbcType=VARCHAR},
164
+      </if>
165
+      <if test="unit != null" >
166
+        unit = #{unit,jdbcType=VARCHAR},
167
+      </if>
168
+      <if test="level != null" >
169
+        level = #{level,jdbcType=VARCHAR},
170
+      </if>
171
+      <if test="roomNo != null" >
172
+        room_no = #{roomNo,jdbcType=VARCHAR},
173
+      </if>
174
+      <if test="ownerName != null" >
175
+        owner_name = #{ownerName,jdbcType=VARCHAR},
176
+      </if>
177
+      <if test="ownerTel != null" >
178
+        owner_tel = #{ownerTel,jdbcType=VARCHAR},
179
+      </if>
180
+      <if test="gender != null" >
181
+        gender = #{gender,jdbcType=CHAR},
182
+      </if>
183
+      <if test="pairStatus != null" >
184
+        pair_status = #{pairStatus,jdbcType=CHAR},
185
+      </if>
186
+      <if test="verifyStatus != null" >
187
+        verify_status = #{verifyStatus,jdbcType=CHAR},
188
+      </if>
189
+      <if test="createUser != null" >
190
+        create_user = #{createUser,jdbcType=INTEGER},
191
+      </if>
192
+      <if test="createDate != null" >
193
+        create_date = #{createDate,jdbcType=TIMESTAMP},
194
+      </if>
195
+      <if test="updateUser != null" >
196
+        update_user = #{updateUser,jdbcType=INTEGER},
197
+      </if>
198
+      <if test="updateDate != null" >
199
+        update_date = #{updateDate,jdbcType=TIMESTAMP},
200
+      </if>
201
+    </set>
202
+    where id = #{id,jdbcType=INTEGER}
203
+  </update>
204
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpBuildingOwnerInfo" >
205
+    update tp_building_owner_info
206
+    set community_id = #{communityId,jdbcType=INTEGER},
207
+      id_card = #{idCard,jdbcType=VARCHAR},
208
+      building = #{building,jdbcType=VARCHAR},
209
+      unit = #{unit,jdbcType=VARCHAR},
210
+      level = #{level,jdbcType=VARCHAR},
211
+      room_no = #{roomNo,jdbcType=VARCHAR},
212
+      owner_name = #{ownerName,jdbcType=VARCHAR},
213
+      owner_tel = #{ownerTel,jdbcType=VARCHAR},
214
+      gender = #{gender,jdbcType=CHAR},
215
+      pair_status = #{pairStatus,jdbcType=CHAR},
216
+      verify_status = #{verifyStatus,jdbcType=CHAR},
217
+      create_user = #{createUser,jdbcType=INTEGER},
218
+      create_date = #{createDate,jdbcType=TIMESTAMP},
219
+      update_user = #{updateUser,jdbcType=INTEGER},
220
+      update_date = #{updateDate,jdbcType=TIMESTAMP}
221
+    where id = #{id,jdbcType=INTEGER}
222
+  </update>
223
+</mapper>

+ 11
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml Ver arquivo

@@ -247,4 +247,15 @@
247 247
         t.id = #{ticketId,jdbcType=INTEGER}
248 248
         AND t.community_id = #{communityId,jdbcType=INTEGER}
249 249
   </select>
250
+
251
+  <select id="getById" resultMap="BaseResultMap" >
252
+    SELECT
253
+    <include refid="Base_Column_List" />
254
+    FROM
255
+    tp_ticket
256
+    WHERE
257
+     ta_user_id = #{userId,jdbcType=INTEGER}
258
+    AND community_id = #{communityId,jdbcType=INTEGER} order by update_date desc  limit 1
259
+  </select>
260
+
250 261
 </mapper>

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

@@ -7,11 +7,6 @@
7 7
     <result column="ta_user_id" property="taUserId" jdbcType="INTEGER" />
8 8
     <result column="transaction_title" property="transactionTitle" jdbcType="VARCHAR" />
9 9
     <result column="transaction_content" property="transactionContent" jdbcType="VARCHAR" />
10
-    <result column="transaction_match_img1" property="transactionMatchImg1" jdbcType="VARCHAR" />
11
-    <result column="activity_match_img3" property="activityMatchImg3" jdbcType="VARCHAR" />
12
-    <result column="activity_match_img4" property="activityMatchImg4" jdbcType="VARCHAR" />
13
-    <result column="activity_match_img5" property="activityMatchImg5" jdbcType="VARCHAR" />
14
-    <result column="activity_match_img6" property="activityMatchImg6" jdbcType="VARCHAR" />
15 10
     <result column="view_count" property="viewCount" jdbcType="INTEGER" />
16 11
     <result column="status" property="status" jdbcType="CHAR" />
17 12
     <result column="type" property="type" jdbcType="CHAR" />
@@ -21,8 +16,7 @@
21 16
     <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
22 17
   </resultMap>
23 18
   <sql id="Base_Column_List" >
24
-    id, community_id, ta_user_id, transaction_title, transaction_content, transaction_match_img1, 
25
-    activity_match_img3, activity_match_img4, activity_match_img5, activity_match_img6, 
19
+    id, community_id, ta_user_id, transaction_title, transaction_content,
26 20
     view_count, status, type, create_user, create_date, update_user, update_date
27 21
   </sql>
28 22
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
@@ -37,15 +31,13 @@
37 31
   </delete>
38 32
   <insert id="insert" parameterType="com.community.huiju.model.TpTransaction" >
39 33
     insert into tp_transaction (id, community_id, ta_user_id, 
40
-      transaction_title, transaction_content, transaction_match_img1, 
41
-      activity_match_img3, activity_match_img4, activity_match_img5, 
42
-      activity_match_img6, view_count, status, 
34
+      transaction_title, transaction_content,
35
+      view_count, status,
43 36
       type, create_user, create_date, 
44 37
       update_user, update_date)
45 38
     values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{taUserId,jdbcType=INTEGER}, 
46
-      #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR}, #{transactionMatchImg1,jdbcType=VARCHAR}, 
47
-      #{activityMatchImg3,jdbcType=VARCHAR}, #{activityMatchImg4,jdbcType=VARCHAR}, #{activityMatchImg5,jdbcType=VARCHAR}, 
48
-      #{activityMatchImg6,jdbcType=VARCHAR}, #{viewCount,jdbcType=INTEGER}, #{status,jdbcType=CHAR}, 
39
+      #{transactionTitle,jdbcType=VARCHAR}, #{transactionContent,jdbcType=VARCHAR},
40
+       #{viewCount,jdbcType=INTEGER}, #{status,jdbcType=CHAR},
49 41
       #{type,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
50 42
       #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
51 43
   </insert>
@@ -67,21 +59,6 @@
67 59
       <if test="transactionContent != null" >
68 60
         transaction_content,
69 61
       </if>
70
-      <if test="transactionMatchImg1 != null" >
71
-        transaction_match_img1,
72
-      </if>
73
-      <if test="activityMatchImg3 != null" >
74
-        activity_match_img3,
75
-      </if>
76
-      <if test="activityMatchImg4 != null" >
77
-        activity_match_img4,
78
-      </if>
79
-      <if test="activityMatchImg5 != null" >
80
-        activity_match_img5,
81
-      </if>
82
-      <if test="activityMatchImg6 != null" >
83
-        activity_match_img6,
84
-      </if>
85 62
       <if test="viewCount != null" >
86 63
         view_count,
87 64
       </if>
@@ -120,21 +97,6 @@
120 97
       <if test="transactionContent != null" >
121 98
         #{transactionContent,jdbcType=VARCHAR},
122 99
       </if>
123
-      <if test="transactionMatchImg1 != null" >
124
-        #{transactionMatchImg1,jdbcType=VARCHAR},
125
-      </if>
126
-      <if test="activityMatchImg3 != null" >
127
-        #{activityMatchImg3,jdbcType=VARCHAR},
128
-      </if>
129
-      <if test="activityMatchImg4 != null" >
130
-        #{activityMatchImg4,jdbcType=VARCHAR},
131
-      </if>
132
-      <if test="activityMatchImg5 != null" >
133
-        #{activityMatchImg5,jdbcType=VARCHAR},
134
-      </if>
135
-      <if test="activityMatchImg6 != null" >
136
-        #{activityMatchImg6,jdbcType=VARCHAR},
137
-      </if>
138 100
       <if test="viewCount != null" >
139 101
         #{viewCount,jdbcType=INTEGER},
140 102
       </if>
@@ -173,21 +135,6 @@
173 135
       <if test="transactionContent != null" >
174 136
         transaction_content = #{transactionContent,jdbcType=VARCHAR},
175 137
       </if>
176
-      <if test="transactionMatchImg1 != null" >
177
-        transaction_match_img1 = #{transactionMatchImg1,jdbcType=VARCHAR},
178
-      </if>
179
-      <if test="activityMatchImg3 != null" >
180
-        activity_match_img3 = #{activityMatchImg3,jdbcType=VARCHAR},
181
-      </if>
182
-      <if test="activityMatchImg4 != null" >
183
-        activity_match_img4 = #{activityMatchImg4,jdbcType=VARCHAR},
184
-      </if>
185
-      <if test="activityMatchImg5 != null" >
186
-        activity_match_img5 = #{activityMatchImg5,jdbcType=VARCHAR},
187
-      </if>
188
-      <if test="activityMatchImg6 != null" >
189
-        activity_match_img6 = #{activityMatchImg6,jdbcType=VARCHAR},
190
-      </if>
191 138
       <if test="viewCount != null" >
192 139
         view_count = #{viewCount,jdbcType=INTEGER},
193 140
       </if>
@@ -218,11 +165,6 @@
218 165
       ta_user_id = #{taUserId,jdbcType=INTEGER},
219 166
       transaction_title = #{transactionTitle,jdbcType=VARCHAR},
220 167
       transaction_content = #{transactionContent,jdbcType=VARCHAR},
221
-      transaction_match_img1 = #{transactionMatchImg1,jdbcType=VARCHAR},
222
-      activity_match_img3 = #{activityMatchImg3,jdbcType=VARCHAR},
223
-      activity_match_img4 = #{activityMatchImg4,jdbcType=VARCHAR},
224
-      activity_match_img5 = #{activityMatchImg5,jdbcType=VARCHAR},
225
-      activity_match_img6 = #{activityMatchImg6,jdbcType=VARCHAR},
226 168
       view_count = #{viewCount,jdbcType=INTEGER},
227 169
       status = #{status,jdbcType=CHAR},
228 170
       type = #{type,jdbcType=CHAR},
@@ -239,4 +181,11 @@
239 181
     from tp_transaction
240 182
     where community_id = #{communityId,jdbcType=INTEGER} and type = #{type,jdbcType=VARCHAR}
241 183
   </select>
184
+
185
+  <select id="selectTransaction" resultMap="BaseResultMap">
186
+    select
187
+    <include refid="Base_Column_List" />
188
+    from tp_transaction
189
+    where community_id = #{communityId,jdbcType=INTEGER} and ta_user_id = #{userId,jdbcType=INTEGER}
190
+  </select>
242 191
 </mapper>

+ 25
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpannouncementTelMapper.xml Ver arquivo

@@ -0,0 +1,25 @@
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.TpannouncementTelMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpannouncementTel" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="community_id" property="communityId" jdbcType="VARCHAR" />
7
+    <result column="name" property="name" jdbcType="VARCHAR" />
8
+    <result column="tel" property="tel" jdbcType="VARCHAR" />
9
+    <result column="remark" property="remark" jdbcType="VARCHAR" />
10
+    <result column="create_user" property="createUser" jdbcType="VARCHAR" />
11
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
12
+    <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
13
+    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
14
+  </resultMap>
15
+  <sql id="Base_Column_List" >
16
+    id, community_id,name,tel,remark,create_user,create_date,update_user,update_date
17
+  </sql>
18
+  <select id="getTpannouncementTel" resultMap="BaseResultMap" resultType="map">
19
+    select
20
+    <include refid="Base_Column_List" />
21
+    from tp_announcement_tel
22
+
23
+
24
+  </select>
25
+</mapper>

+ 3
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/Constant.java Ver arquivo

@@ -59,4 +59,7 @@ public class Constant {
59 59
 
60 60
     /**家属角色**/
61 61
     public static final String FAMILYMEMBER = "familyMember";
62
+    
63
+    /** 工单回复的发起人 **/
64
+    public static final String TICKET_USER_TYPE = "1";
62 65
 }

BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/Constant.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/mode/ResponseBean.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/FastJsonSerializer.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisConfiguration.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisJsonSerializer.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisObjectSerializer.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisSerializer.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/RedisTemplate.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/SerializationFailedException.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/redis/SingleRedisTemplate.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/AccountValidatorUtil.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/BeanTools.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/CommonUtils.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/CookieUtil.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/DESUtils.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/DateUtils.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/HttpClientUtils.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/MD5Utils.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/QRCodeGeneratorUtils.class Ver arquivo


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/StringConverter.class Ver arquivo


+ 0
- 56
CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/HelloWorld.java Ver arquivo

@@ -1,56 +0,0 @@
1
-package com.community.huiju.controller;
2
-
3
-import com.example.userserver.entity.User;
4
-import org.springframework.web.bind.annotation.GetMapping;
5
-import org.springframework.web.bind.annotation.RequestMapping;
6
-import org.springframework.web.bind.annotation.RestController;
7
-
8
-import javax.servlet.http.HttpSession;
9
-import java.util.HashMap;
10
-import java.util.Map;
11
-
12
-@RestController
13
-@RequestMapping("/rest")
14
-public class HelloWorld {
15
-
16
-    @GetMapping("/hello")
17
-    public Map<String,Object> hello (HttpSession session){
18
-
19
-        User user = new User();
20
-        user.setId(1);
21
-        user.setName("张三");
22
-
23
-        Map<String,Object> resultMap = new HashMap<>();
24
-        resultMap.put("code", 200);
25
-        session.setAttribute("user",user);
26
-        if (session.getAttribute("user") != null) {
27
-            resultMap.put("user",user);
28
-        }
29
-
30
-        System.out.println("session ID: " + session.getId());
31
-
32
-        return resultMap;
33
-    }
34
-
35
-
36
-    @GetMapping("/h1")
37
-    public Map<String,Object> h1 (HttpSession session){
38
-
39
-        User user = new User();
40
-        user.setId(1);
41
-        user.setName("张三");
42
-
43
-        Map<String,Object> resultMap = new HashMap<>();
44
-        resultMap.put("code", 200);
45
-        User sessionUser = (User) session.getAttribute("user");
46
-        if (session.getAttribute("user") != null) {
47
-            resultMap.put("data",sessionUser);
48
-        }
49
-
50
-        System.out.println("session ID: " + session.getId());
51
-
52
-        return resultMap;
53
-    }
54
-
55
-
56
-}

+ 207
- 263
文档/MYSQL/smartCommunity.pdb
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 211
- 267
文档/MYSQL/smartCommunity.pdm
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


BIN
文档/需求/app接口需求-第二版.xlsx Ver arquivo