Parcourir la source

Merge branch 'master' of http://git.ycjcjy.com/xiangsong/xs-service

张延森 il y a 4 ans
Parent
révision
dd5ae2b8dc
43 fichiers modifiés avec 1544 ajouts et 132 suppressions
  1. 5
    5
      src/main/java/com/huiju/estateagents/property/controller/AnnouncementTelController.java
  2. 2
    2
      src/main/java/com/huiju/estateagents/property/controller/BillController.java
  3. 11
    12
      src/main/java/com/huiju/estateagents/property/controller/BillInvoiceController.java
  4. 1
    1
      src/main/java/com/huiju/estateagents/property/controller/BillStatementController.java
  5. 6
    6
      src/main/java/com/huiju/estateagents/property/controller/BuildingOwnerInfoController.java
  6. 1
    3
      src/main/java/com/huiju/estateagents/property/controller/CarouselSettingController.java
  7. 8
    8
      src/main/java/com/huiju/estateagents/property/controller/HotelController.java
  8. 1
    1
      src/main/java/com/huiju/estateagents/property/controller/IndexCountController.java
  9. 3
    3
      src/main/java/com/huiju/estateagents/property/controller/MessageController.java
  10. 0
    5
      src/main/java/com/huiju/estateagents/property/controller/RoleController.java
  11. 65
    0
      src/main/java/com/huiju/estateagents/property/controller/SocialController.java
  12. 1
    1
      src/main/java/com/huiju/estateagents/property/controller/TaVisitorLicenseSettingController.java
  13. 2
    2
      src/main/java/com/huiju/estateagents/property/controller/TpAnnouncementController.java
  14. 5
    5
      src/main/java/com/huiju/estateagents/property/controller/TpEquipmentController.java
  15. 5
    6
      src/main/java/com/huiju/estateagents/property/controller/TpRentalHouseController.java
  16. 5
    6
      src/main/java/com/huiju/estateagents/property/controller/TpShopController.java
  17. 1
    1
      src/main/java/com/huiju/estateagents/property/controller/TpShopSettingController.java
  18. 6
    6
      src/main/java/com/huiju/estateagents/property/controller/TpShopTypeController.java
  19. 161
    11
      src/main/java/com/huiju/estateagents/property/controller/TpTicketController.java
  20. 7
    9
      src/main/java/com/huiju/estateagents/property/controller/TransactionController.java
  21. 1
    5
      src/main/java/com/huiju/estateagents/property/controller/UserVerifyController.java
  22. 14
    0
      src/main/java/com/huiju/estateagents/property/dao/TdImagesMapper.java
  23. 2
    0
      src/main/java/com/huiju/estateagents/property/dao/TpAnnouncementMapper.java
  24. 21
    0
      src/main/java/com/huiju/estateagents/property/dao/TpSocialViewMapper.java
  25. 14
    0
      src/main/java/com/huiju/estateagents/property/dao/TpTicketMapper.java
  26. 22
    0
      src/main/java/com/huiju/estateagents/property/dao/TpTicketRecordCommentMapper.java
  27. 4
    0
      src/main/java/com/huiju/estateagents/property/dao/TpTicketRecordMapper.java
  28. 19
    0
      src/main/java/com/huiju/estateagents/property/model/TpAnnouncement.java
  29. 75
    0
      src/main/java/com/huiju/estateagents/property/model/TpSocialView.java
  30. 7
    0
      src/main/java/com/huiju/estateagents/property/model/TpTicket.java
  31. 6
    0
      src/main/java/com/huiju/estateagents/property/model/TpTicketRecord.java
  32. 40
    0
      src/main/java/com/huiju/estateagents/property/service/SocialServiceI.java
  33. 74
    0
      src/main/java/com/huiju/estateagents/property/service/TpTicketService.java
  34. 120
    0
      src/main/java/com/huiju/estateagents/property/service/impl/SocialServiceImpl.java
  35. 543
    9
      src/main/java/com/huiju/estateagents/property/service/impl/TpTicketServiceImpl.java
  36. 49
    22
      src/main/java/com/huiju/estateagents/property/vo/TpTicketVO.java
  37. 1
    3
      src/main/java/com/huiju/estateagents/service/impl/TaNewsServiceImpl.java
  38. 12
    0
      src/main/resources/mapper/property/TdImagesMapper.xml
  39. 26
    0
      src/main/resources/mapper/property/TpAnnouncementMapper.xml
  40. 128
    0
      src/main/resources/mapper/property/TpSocialViewMapper.xml
  41. 34
    0
      src/main/resources/mapper/property/TpTicketMapper.xml
  42. 17
    0
      src/main/resources/mapper/property/TpTicketRecordCommentMapper.xml
  43. 19
    0
      src/main/resources/mapper/property/TpTicketRecordMapper.xml

+ 5
- 5
src/main/java/com/huiju/estateagents/property/controller/AnnouncementTelController.java Voir le fichier

@@ -45,7 +45,7 @@ public class AnnouncementTelController extends BaseController {
45 45
 			@ApiImplicitParam(paramType = "query", dataType = "String", name = "remark", value = "备注(模糊查询)"),
46 46
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
47 47
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
48
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
48
+
49 49
 	})
50 50
 	@RequestMapping(value = "/tels",method = RequestMethod.GET)
51 51
 	public ResponseBean getList(@RequestParam(value = "name", required = false) String name,
@@ -67,7 +67,7 @@ public class AnnouncementTelController extends BaseController {
67 67
 	// @ApiOperation(value = "添加物业端号码", notes = "添加物业端号码")
68 68
 	@ApiImplicitParams({
69 69
 			@ApiImplicitParam(dataTypeClass = String.class, paramType = "AnnouncementTel", name = "announcementTel", value = "电话号码实体类"),
70
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
70
+
71 71
 	})
72 72
 	@RequestMapping(value = "/tel/add",method = RequestMethod.POST)
73 73
 	public ResponseBean addTel(@Valid @RequestBody AnnouncementTel announcementTel, HttpServletRequest request){
@@ -105,7 +105,7 @@ public class AnnouncementTelController extends BaseController {
105 105
 	// @ApiOperation(value = "根据ID修改物业端号码", notes = "根据ID修改物业端号码")
106 106
 	@ApiImplicitParams({
107 107
 			@ApiImplicitParam(paramType = "body", dataType = "AnnouncementTel", name = "announcementTel", value = "电话号码实体类"),
108
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
108
+
109 109
 	})
110 110
 	@RequestMapping(value = "/tel/update", method = RequestMethod.PUT)
111 111
 	public ResponseBean updateTel(@Valid @RequestBody AnnouncementTel announcementTel, HttpServletRequest request) {
@@ -156,7 +156,7 @@ public class AnnouncementTelController extends BaseController {
156 156
 	// @ApiOperation(value = "获取Id获取物业端号码详情", notes = "获取Id获取物业端号码详情")
157 157
 	@ApiImplicitParams({
158 158
 			@ApiImplicitParam(paramType = "Path", dataType = "integer", name = "id", value = "主键Id"),
159
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
159
+
160 160
 	})
161 161
 	@RequestMapping(value = "/tel/{id}",method = RequestMethod.GET)
162 162
 	public ResponseBean getNoticeById(@PathVariable(value ="id") Integer id, HttpServletRequest request){
@@ -169,7 +169,7 @@ public class AnnouncementTelController extends BaseController {
169 169
 	// @ApiOperation(value = "根据ID批量删除物业端号码", notes = "根据ID批量删除物业端号码")
170 170
 	@ApiImplicitParams({
171 171
 			@ApiImplicitParam(paramType = "body", dataType = "integer", name = "ids", value = "主键Id"),
172
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
172
+
173 173
 	})
174 174
 	@RequestMapping(value = "/tel/delete", method = RequestMethod.POST)
175 175
 	public ResponseBean deleteNotice(@RequestBody List<Integer> ids, HttpServletRequest request) {

+ 2
- 2
src/main/java/com/huiju/estateagents/property/controller/BillController.java Voir le fichier

@@ -131,7 +131,7 @@ public class BillController extends BaseController {
131 131
     // @ApiOperation(value = "根据 id集合 删除缴费项", notes = "根据 id集合 删除缴费项")
132 132
     @ApiImplicitParams({
133 133
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "ids", value = "id编号集合"),
134
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
134
+
135 135
     })
136 136
     @RequestMapping(value = "/bill/deleteBillBeach", method = RequestMethod.POST)
137 137
     public ResponseBean deleteBillBeach(HttpServletRequest request,
@@ -146,7 +146,7 @@ public class BillController extends BaseController {
146 146
     // @ApiOperation(value = "下载Excel模板", notes = "下载Excel模板")
147 147
     @ApiImplicitParams({
148 148
 //            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billExplain收费组说明"),
149
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
149
+
150 150
     })
151 151
     @RequestMapping(value = "/bill/downloadExcel", method = RequestMethod.GET)
152 152
     public void exportExcel(HttpServletResponse response, HttpServletRequest request) {

+ 11
- 12
src/main/java/com/huiju/estateagents/property/controller/BillInvoiceController.java Voir le fichier

@@ -49,7 +49,6 @@ public class BillInvoiceController extends BaseController {
49 49
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billId: 缴费项目id," +
50 50
                     "phase: 期,building: 栋,unit: 单元,roomNo: 户号,ownerName: 业主姓名," +
51 51
                     "billStatus: 缴费状态,payName: 缴费人,pageSize: 一页多少行,pageNum: 第几页"),
52
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
53 52
     })
54 53
     @RequestMapping(value = "/bill/invoice/list", method = RequestMethod.POST)
55 54
     public ResponseBean getBillList(HttpServletRequest request, @RequestBody String parameter) {
@@ -62,7 +61,7 @@ public class BillInvoiceController extends BaseController {
62 61
     // @ApiOperation(value = "修改缴费项 收费项名称,缴费项说明,截止时间", notes = "修改缴费项 收费项名称,缴费项说明,截止时间")
63 62
     @ApiImplicitParams({
64 63
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billName收费项名称,billExplain缴费项说明,endDate截止时间"),
65
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
64
+
66 65
     })
67 66
     @RequestMapping(value = "/bill/invoice/updateBill", method = RequestMethod.PUT)
68 67
     public ResponseBean updateBill(HttpServletRequest request, @RequestBody String parameter) {
@@ -76,7 +75,7 @@ public class BillInvoiceController extends BaseController {
76 75
     // @ApiOperation(value = "根据 id集合 删除缴费单", notes = "根据 id集合 删除缴费单")
77 76
     @ApiImplicitParams({
78 77
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "ids", value = "id集合"),
79
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
78
+
80 79
     })
81 80
     @RequestMapping(value = "/bill/invoice/delete", method = RequestMethod.POST)
82 81
     public ResponseBean delete(HttpServletRequest request, @RequestBody List<Integer> ids) {
@@ -90,7 +89,7 @@ public class BillInvoiceController extends BaseController {
90 89
     // @ApiOperation(value = "设置线下缴费", notes = "设置线下缴费")
91 90
     @ApiImplicitParams({
92 91
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "ids", value = "id集合"),
93
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
92
+
94 93
     })
95 94
     @RequestMapping(value = "/bill/invoice/offlinePayment", method = RequestMethod.POST)
96 95
     public ResponseBean offlinePayment(HttpServletRequest request, @RequestBody List<Integer> ids) {
@@ -105,7 +104,7 @@ public class BillInvoiceController extends BaseController {
105 104
     @ApiImplicitParams({
106 105
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billId缴费项编号,phase期/区," +
107 106
                     "building栋,unit单元,roomNo户号,worthOf截止时间(催缴日期),billInvoiceExplain收费单说明,payPrice收费金额"),
108
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
107
+
109 108
     })
110 109
     @RequestMapping(value = "/bill/invoice/addTempBillInvoice", method = RequestMethod.POST)
111 110
     public ResponseBean addTempBillInvoice(HttpServletRequest request, @RequestBody String parameter) {
@@ -118,7 +117,7 @@ public class BillInvoiceController extends BaseController {
118 117
     // @ApiOperation(value = "由前台批量添加收费单, 进行统一的提交, 修改为有效", notes = "由前台批量添加收费单, 进行统一的提交, 修改为有效")
119 118
     @ApiImplicitParams({
120 119
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "ids", value = "id集合"),
121
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
120
+
122 121
     })
123 122
     @RequestMapping(value = "/bill/invoice/updateBillInvoiceStatus", method = RequestMethod.POST)
124 123
     public ResponseBean updateBillInvoiceStatus(HttpServletRequest request, @RequestBody List<Integer> ids) {
@@ -131,7 +130,7 @@ public class BillInvoiceController extends BaseController {
131 130
     // @ApiOperation(value = "查询前台批量添加的收费单, 状态是作废", notes = "查询前台批量添加的收费单, 状态是作废")
132 131
     @ApiImplicitParams({
133 132
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
134
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
133
+
135 134
     })
136 135
     @RequestMapping(value = "/bill/invoice/getTempBillInvoice/{billId}", method = RequestMethod.GET)
137 136
     public ResponseBean getTempBillInvoice(HttpServletRequest request, @PathVariable("billId") Integer billId) {
@@ -144,7 +143,7 @@ public class BillInvoiceController extends BaseController {
144 143
     // @ApiOperation(value = "根据id删除收费单, 只能删除作废的", notes = "根据id删除收费单, 只能删除作废的")
145 144
     @ApiImplicitParams({
146 145
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
147
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
146
+
148 147
     })
149 148
     @RequestMapping(value = "/bill/invoice/deleteTempBillInvoice/{billId}", method = RequestMethod.DELETE)
150 149
     public ResponseBean deleteTempBillInvoice(HttpServletRequest request, @PathVariable("billId") Integer billId) {
@@ -158,7 +157,7 @@ public class BillInvoiceController extends BaseController {
158 157
     @ApiImplicitParams({
159 158
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
160 159
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "payPrice金额"),
161
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
160
+
162 161
     })
163 162
     @RequestMapping(value = "/bill/invoice/updateBillInvoiceIdPayPrice/{billId}", method = RequestMethod.POST)
164 163
     public ResponseBean updateBillInvoiceIdPayPrice(HttpServletRequest request, @PathVariable Integer billId, @RequestBody String parameter) {
@@ -173,7 +172,7 @@ public class BillInvoiceController extends BaseController {
173 172
     @ApiImplicitParams({
174 173
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
175 174
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billInvoiceExplain收费说明"),
176
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
175
+
177 176
     })
178 177
     @RequestMapping(value = "/bill/invoice/updateBillInvoiceIdBillInvoiceExplain/{billId}", method = RequestMethod.POST)
179 178
     public ResponseBean updateBillInvoiceIdBillInvoiceExplain(HttpServletRequest request, @PathVariable Integer billId, @RequestBody String parameter) {
@@ -199,7 +198,7 @@ public class BillInvoiceController extends BaseController {
199 198
     // @ApiOperation(value = "导出Excel", notes = "导出Excel")
200 199
     @ApiImplicitParams({
201 200
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
202
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
201
+
203 202
     })
204 203
     @RequestMapping(value = "/bill/invoice/exportExcel/{billId}", method = RequestMethod.GET)
205 204
     public void exportExcel(HttpServletResponse response, HttpServletRequest request, @PathVariable("billId") Integer billId) {
@@ -223,7 +222,7 @@ public class BillInvoiceController extends BaseController {
223 222
     // @ApiOperation(value = "根据缴费项id, 查询草稿", notes = "根据缴费项id, 查询草稿")
224 223
     @ApiImplicitParams({
225 224
             @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "billId缴费项id,pageNum当前页,pageSize一页多少行"),
226
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
225
+
227 226
     })
228 227
     @RequestMapping(value = "/bill/invoice/getInvoiceInvalid", method = RequestMethod.POST)
229 228
     public ResponseBean getInvoiceInvalid(HttpServletRequest request, @RequestBody String parameter) {

+ 1
- 1
src/main/java/com/huiju/estateagents/property/controller/BillStatementController.java Voir le fichier

@@ -55,7 +55,7 @@ public class BillStatementController extends BaseController {
55 55
 
56 56
     // @ApiOperation(value = "导出Excel", notes = "导出Excel")
57 57
     @ApiImplicitParams({
58
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
58
+
59 59
     })
60 60
     @RequestMapping(value = "/bill/statement/exportExcel", method = RequestMethod.GET)
61 61
     public void exportExcel(HttpServletResponse response, HttpServletRequest request) {

+ 6
- 6
src/main/java/com/huiju/estateagents/property/controller/BuildingOwnerInfoController.java Voir le fichier

@@ -120,7 +120,7 @@ public class BuildingOwnerInfoController extends BaseController {
120 120
     // @ApiOperation(value = "修改楼栋业务信息", notes = "修改楼栋业主信息")
121 121
     @ApiImplicitParams({
122 122
             @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter",value = "userVerifyId审核编号;roleId角色编号;verifyStatus审核 true通过;false不通过;remark备注"),
123
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
123
+
124 124
     })
125 125
     @RequestMapping(value = "/building/update", method = RequestMethod.PUT)
126 126
     public ResponseBean update(@RequestBody String parameter, HttpServletRequest request){
@@ -136,7 +136,7 @@ public class BuildingOwnerInfoController extends BaseController {
136 136
                     "unitId单元;levelId楼层;roomNoId户号;" +
137 137
                     "ownerName业主姓名;" +
138 138
                     "ownerTel业主手机号;roleId角色id;gender性别 1:男   2:女;"),
139
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
139
+
140 140
     })
141 141
     @RequestMapping(value = "/building/add", method = RequestMethod.POST)
142 142
     public ResponseBean add(@RequestBody String parameter, HttpServletRequest request){
@@ -149,7 +149,7 @@ public class BuildingOwnerInfoController extends BaseController {
149 149
     // @ApiOperation(value = "批量删除楼栋业主信息", notes = "批量删除楼栋业主信息")
150 150
     @ApiImplicitParams({
151 151
             @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "ids",value = "id集合"),
152
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
152
+
153 153
     })
154 154
     @RequestMapping(value = "/building/delete", method = RequestMethod.DELETE)
155 155
     public ResponseBean delete(@RequestBody List<Integer> ids, HttpServletRequest request){
@@ -265,7 +265,7 @@ public class BuildingOwnerInfoController extends BaseController {
265 265
     // @ApiOperation(value = "小区楼栋资料表",nickname ="小区楼栋资料表")
266 266
     @ApiImplicitParams({
267 267
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="phase:期,building:楼栋 ,unit:单元,level:楼层,roomNo:户号, pageNum:每页显示多少条,pageSzie:当前页数"),
268
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")})
268
+            })
269 269
     @RequestMapping(value="/buildinglist",method = RequestMethod.POST)
270 270
     public ResponseBean buildinglist(@RequestBody String paramets, HttpServletRequest request){
271 271
         TaUser userElement = getTaUser(request);
@@ -300,7 +300,7 @@ public class BuildingOwnerInfoController extends BaseController {
300 300
     // @ApiOperation(value = "下载Excel模板(小区楼栋信息)", notes = "下载Excel模板(小区楼栋信息)")
301 301
     @ApiImplicitParams({
302 302
 //            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billExplain收费组说明"),
303
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
303
+
304 304
     })
305 305
     @RequestMapping(value = "/building/downloadExcel", method = RequestMethod.GET)
306 306
     public void exportExcel(HttpServletResponse response, HttpServletRequest request) {
@@ -320,7 +320,7 @@ public class BuildingOwnerInfoController extends BaseController {
320 320
     // @ApiOperation(value = "住户资料详情",nickname ="住户资料详情")
321 321
     @ApiImplicitParams({
322 322
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:楼栋住户ID"),
323
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")})
323
+            })
324 324
     @RequestMapping(value="/building/details",method = RequestMethod.POST)
325 325
     public ResponseBean buildingDetails(@RequestBody String paramets, HttpServletRequest request){
326 326
         TaUser userElement = getTaUser(request);

+ 1
- 3
src/main/java/com/huiju/estateagents/property/controller/CarouselSettingController.java Voir le fichier

@@ -42,7 +42,6 @@ public class CarouselSettingController extends BaseController {
42 42
 
43 43
     // @ApiOperation(value = "添加/修改公告的Banner数量", notes = "添加/修改公告的Banner数量")
44 44
     @ApiImplicitParams({
45
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
46 45
             @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "parameter", value = "carouselNum数量值")
47 46
     })
48 47
     @RequestMapping(value = "/carousel/announcement/banner", method = RequestMethod.PUT)
@@ -79,7 +78,6 @@ public class CarouselSettingController extends BaseController {
79 78
 
80 79
     // @ApiOperation(value = "添加/修改活动的Banner数量", notes = "添加/修改活动的Banner数量")
81 80
     @ApiImplicitParams({
82
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
83 81
             @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "parameter", value = "carouselNum数量值")
84 82
     })
85 83
     @RequestMapping(value = "/carousel/activity/banner", method = RequestMethod.PUT)
@@ -114,7 +112,7 @@ public class CarouselSettingController extends BaseController {
114 112
 
115 113
     // @ApiOperation(value = "获取Banner数量", notes = "获取Banner数量")
116 114
     @ApiImplicitParams({
117
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
115
+            ,
118 116
     })
119 117
     @RequestMapping(value = "/carousel/getBanner", method = RequestMethod.GET)
120 118
     public ResponseBean getBannerNum(HttpServletRequest request) {

+ 8
- 8
src/main/java/com/huiju/estateagents/property/controller/HotelController.java Voir le fichier

@@ -52,7 +52,7 @@ public class HotelController extends BaseController {
52 52
                     "endTime:结束时间"+
53 53
                     "sort:权重")
54 54
     })
55
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
55
+
56 56
     @RequestMapping(value = "/hotelRoomList", method = RequestMethod.POST)
57 57
     public ResponseBean hotelRoom(@RequestBody String parameter, HttpServletRequest request){
58 58
         TaUser userElement = getTaUser(request);
@@ -69,7 +69,7 @@ public class HotelController extends BaseController {
69 69
                     "remark:(描述)"+
70 70
                     "sort:权重")
71 71
     })
72
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
72
+
73 73
     @RequestMapping(value = "/hotelRoomAdd", method = RequestMethod.POST)
74 74
     public ResponseBean hotelRoomAdd(@RequestBody String parameter, HttpServletRequest request){
75 75
         TaUser userElement = getTaUser(request);
@@ -80,7 +80,7 @@ public class HotelController extends BaseController {
80 80
     // @ApiOperation(value = "查询当前房间信息", notes = "查询当前房间信息")
81 81
     @ApiImplicitParams({
82 82
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:房间ID")})
83
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
83
+
84 84
     @RequestMapping(value = "/getRoom", method = RequestMethod.POST)
85 85
     public ResponseBean getRoom(@RequestBody String parameter, HttpServletRequest request){
86 86
         TaUser userElement = getTaUser(request);
@@ -101,7 +101,7 @@ public class HotelController extends BaseController {
101 101
                     "remark:(描述)"+
102 102
                     "sort:权重")
103 103
     })
104
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
104
+
105 105
     @RequestMapping(value = "/hotelRoomEdit", method = RequestMethod.POST)
106 106
     public ResponseBean hotelRoomEdit(@RequestBody String parameter, HttpServletRequest request){
107 107
         TaUser userElement = getTaUser(request);
@@ -113,7 +113,7 @@ public class HotelController extends BaseController {
113 113
     @ApiImplicitParams({
114 114
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:[]房间ID,roomStatus:(1:是已上架 2:是已下架)"
115 115
             )})
116
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
116
+
117 117
     @RequestMapping(value = "/hotelRoomRoomStatus", method = RequestMethod.POST)
118 118
     public ResponseBean hotelRoomRoomStatus(@RequestBody String parameter, HttpServletRequest request){
119 119
         TaUser userElement = getTaUser(request);
@@ -123,7 +123,7 @@ public class HotelController extends BaseController {
123 123
     
124 124
     // @ApiOperation(value = "根据小区获取酒店数据", notes = "根据搜索条件获取角色列表")
125 125
     @ApiImplicitParams({
126
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
126
+            ,
127 127
     })
128 128
     @RequestMapping(value = "/getHotelData",method = RequestMethod.GET)
129 129
     public ResponseBean getHotelData(HttpServletRequest request) {
@@ -137,9 +137,9 @@ public class HotelController extends BaseController {
137 137
     // @ApiOperation(value = "添加酒店", notes = "添加酒店")
138 138
     @ApiImplicitParams({
139 139
             @ApiImplicitParam(paramType = "body", dataType = "Hotel", name = "hotel", value = "酒店"),
140
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
140
+
141 141
     })
142
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
142
+
143 143
     @RequestMapping(value = "/addHotel", method = RequestMethod.POST)
144 144
     public ResponseBean addHotel(@RequestBody Hotel hotel, HttpServletRequest request){
145 145
         TaUser userElement = getTaUser(request);

+ 1
- 1
src/main/java/com/huiju/estateagents/property/controller/IndexCountController.java Voir le fichier

@@ -31,7 +31,7 @@ public class IndexCountController extends BaseController {
31 31
 	
32 32
 	// @ApiOperation(value = "获取物业端首页所有统计数据", notes = "获取物业端首页所有统计数据")
33 33
 	@ApiImplicitParams({
34
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
34
+
35 35
 	})
36 36
 	@RequestMapping(value = "/index/count", method = RequestMethod.GET)
37 37
 	public ResponseBean getIndexCount(HttpServletRequest request){

+ 3
- 3
src/main/java/com/huiju/estateagents/property/controller/MessageController.java Voir le fichier

@@ -37,7 +37,7 @@ public class MessageController extends BaseController {
37 37
     @ApiImplicitParams({
38 38
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "messageType:待办消息类型(-1:论坛,-2:工单,-3:缴费),status:(0:无效,1:有效),createDate:时间,messageContent:内容 ")
39 39
     })
40
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
40
+
41 41
     @RequestMapping(value = "/messageLiset", method = RequestMethod.POST)
42 42
     public ResponseBean messageLiset(@RequestBody String parameter, HttpServletRequest request){
43 43
         TaUser userElement = getTaUser(request);
@@ -49,7 +49,7 @@ public class MessageController extends BaseController {
49 49
     @ApiImplicitParams({
50 50
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "messageType:消息类型(-1:论坛,-2:工单,-3:缴费),readStatus:(0:未读,1:已读),createDate:时间,messageContent:内容 ")
51 51
     })
52
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
52
+
53 53
     @RequestMapping(value = "/myMessageList", method = RequestMethod.POST)
54 54
     public ResponseBean myMessageList(@RequestBody String parameter, HttpServletRequest request){
55 55
         TaUser userElement = getTaUser(request);
@@ -61,7 +61,7 @@ public class MessageController extends BaseController {
61 61
     @ApiImplicitParams({
62 62
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:(多个) ")
63 63
     })
64
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
64
+
65 65
     @RequestMapping(value = "/delectRead", method = RequestMethod.POST)
66 66
     public ResponseBean delectRead(@RequestBody String parameter, HttpServletRequest request){
67 67
         TaUser userElement = getTaUser(request);

+ 0
- 5
src/main/java/com/huiju/estateagents/property/controller/RoleController.java Voir le fichier

@@ -34,7 +34,6 @@ public class RoleController extends BaseController {
34 34
 			@ApiImplicitParam(paramType = "query", dataType = "String", name = "roleName", value = "帖子标题(模糊查询)"),
35 35
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
36 36
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
37
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
38 37
 	})
39 38
 	@RequestMapping(value = "/roles",method = RequestMethod.GET)
40 39
 	public ResponseBean getRoleList(@RequestParam(value = "roleName", required = false) String roleName,
@@ -49,7 +48,6 @@ public class RoleController extends BaseController {
49 48
 	
50 49
 	// @ApiOperation(value = "添加角色", notes = "添加角色")
51 50
 	@ApiImplicitParams({
52
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
53 51
 			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
54 52
 			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "sysRole", value = "roleName角色名称;description角色描述;menuArray菜单id集合")
55 53
 	})
@@ -64,7 +62,6 @@ public class RoleController extends BaseController {
64 62
 	// @ApiOperation(value = "获取角色详情", notes = "获取角色详情")
65 63
 	@ApiImplicitParams({
66 64
 			@ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "角色id"),
67
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
68 65
 			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
69 66
 			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "sysRole", value = "roleName角色名称;description角色描述;menuArray菜单id集合")
70 67
 	})
@@ -80,7 +77,6 @@ public class RoleController extends BaseController {
80 77
 	// @ApiOperation(value = "修改角色", notes = "修改角色")
81 78
 	@ApiImplicitParams({
82 79
 			@ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "角色id"),
83
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
84 80
 			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
85 81
 			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "sysRole", value = "roleName角色名称;description角色描述;menuArray菜单id集合")
86 82
 	})
@@ -95,7 +91,6 @@ public class RoleController extends BaseController {
95 91
 	
96 92
 	// @ApiOperation(value = "删除角色", notes = "删除角色")
97 93
 	@ApiImplicitParams({
98
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
99 94
 			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
100 95
 			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "sysRole", value = "idArray角色id集合")
101 96
 	})

+ 65
- 0
src/main/java/com/huiju/estateagents/property/controller/SocialController.java Voir le fichier

@@ -0,0 +1,65 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import com.huiju.estateagents.base.BaseController;
5
+import com.huiju.estateagents.base.ResponseBean;
6
+import com.huiju.estateagents.center.taUser.entity.TaUser;
7
+import com.huiju.estateagents.property.common.Constant;
8
+import com.huiju.estateagents.property.common.UserElement;
9
+import com.huiju.estateagents.property.model.TpActivity;
10
+import com.huiju.estateagents.property.model.TpAnnouncement;
11
+import com.huiju.estateagents.property.model.TpTicket;
12
+import com.huiju.estateagents.property.model.TpTransaction;
13
+import com.huiju.estateagents.property.service.SocialServiceI;
14
+import io.swagger.annotations.Api;
15
+import io.swagger.annotations.ApiImplicitParam;
16
+import io.swagger.annotations.ApiImplicitParams;
17
+import io.swagger.annotations.ApiOperation;
18
+import org.springframework.beans.factory.annotation.Autowired;
19
+import org.springframework.web.bind.annotation.*;
20
+
21
+import javax.servlet.http.HttpServletRequest;
22
+/**
23
+ * @author weichaochao11
24
+ * @Title: SocialController
25
+ * @date 2018/10/23
26
+ */
27
+@RestController
28
+@RequestMapping("/api")
29
+@Api(value = "公告相关的API", tags = "公告相关的API")
30
+public class SocialController extends BaseController {
31
+
32
+    @Autowired
33
+    private SocialServiceI socialServiceI;
34
+
35
+    @RequestMapping(value = "/wx/announcement/{orgId}", method = RequestMethod.GET)
36
+    @ApiOperation(value = "论坛公告帖子详情", notes = "获取论坛公告帖子详情")
37
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "orgId", value = "小区Id"),
38
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "id", value = "公告帖子id")})
39
+    public ResponseBean findAnnouncementDetail(@PathVariable(value = "orgId") Integer orgId, @RequestParam("id") Integer id, HttpServletRequest request) {
40
+        TaUser userElement = getTaUser(request);
41
+        Integer userId = userElement.getUserId();
42
+        ResponseBean responseBean = new ResponseBean();
43
+
44
+        TpAnnouncement tpAnnouncement = socialServiceI.findAnnouncementDetail(id, orgId, userId);
45
+        responseBean.addSuccess(tpAnnouncement);
46
+        return responseBean;
47
+    }
48
+
49
+    @ApiOperation(value = "按小区获取分页公告列表", notes = "按小区获取分页公告列表,公告标题模糊查询")
50
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "String", name = "orgId", value = "小区Id"),
51
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "title", value = "公告标题"),
52
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
53
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
54
+    @RequestMapping(value = "/wx/announcements/{orgId}", method = RequestMethod.GET)
55
+    public ResponseBean getAnnouncements(@PathVariable Integer orgId,
56
+                                         @RequestParam(required = false) String title,
57
+                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
58
+                                         @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
59
+        ResponseBean responseBean = new ResponseBean();
60
+
61
+        ResponseBean announcementList = socialServiceI.getAnnouncements(orgId, title, pageNum, pageSize);
62
+        return announcementList;
63
+    }
64
+
65
+}

+ 1
- 1
src/main/java/com/huiju/estateagents/property/controller/TaVisitorLicenseSettingController.java Voir le fichier

@@ -52,7 +52,7 @@ public class TaVisitorLicenseSettingController extends BaseController {
52 52
 
53 53
     // @ApiOperation(value = "查看是否开启访客车辆邀请", notes = "查看是否开启访客车辆邀请")
54 54
     @ApiImplicitParams({
55
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
55
+
56 56
     })
57 57
     @RequestMapping(value = "/visitor", method = RequestMethod.GET)
58 58
     public ResponseBean getVisitorLicense(HttpServletRequest request) {

+ 2
- 2
src/main/java/com/huiju/estateagents/property/controller/TpAnnouncementController.java Voir le fichier

@@ -29,7 +29,7 @@ public class TpAnnouncementController extends BaseController {
29 29
     // @ApiOperation(value = "获取公告管理列表",nickname ="获取公告管理列表")
30 30
     @ApiImplicitParams({
31 31
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:公告编号,announcementTitle:公告标题 ,current:每页显示多少条,current:每页显示多少条,pageSzie:当前页数")})
32
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
32
+
33 33
     @RequestMapping(value="/tpAnnouncement",method = RequestMethod.POST)
34 34
     public ResponseBean tpAnnouncement(@RequestBody String paramets, HttpServletRequest request){
35 35
         TaUser userElement = getTaUser(request);
@@ -41,7 +41,7 @@ public class TpAnnouncementController extends BaseController {
41 41
     @ApiImplicitParams({
42 42
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="announcementTitle:公告标题," +
43 43
                     "announcementCarouselImg:轮播图,announcementContent:内容,contentImg:内容图片,sort:权重值,status:'0 是已作废 1 是已发布   2 是草稿 3 是已修改',")})
44
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
44
+
45 45
     @RequestMapping(value="/addAnnouncement",method = RequestMethod.POST)
46 46
     public ResponseBean addAnnouncement(@RequestBody String paramets, HttpServletRequest request){
47 47
         TaUser userElement = getTaUser(request);

+ 5
- 5
src/main/java/com/huiju/estateagents/property/controller/TpEquipmentController.java Voir le fichier

@@ -37,7 +37,7 @@ public class TpEquipmentController extends BaseController {
37 37
     // @ApiOperation(value = "根据类型查询设备表", notes = "根据类型查询设备表")
38 38
     @ApiImplicitParams({
39 39
         @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "type", value = "1 监控 2 访客机 3 可是对讲"),
40
-        @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
40
+
41 41
     })
42 42
     public ResponseBean getAll(@RequestParam("type") Integer type, HttpServletRequest request) {
43 43
         ResponseBean responseBean = new ResponseBean();
@@ -51,7 +51,7 @@ public class TpEquipmentController extends BaseController {
51 51
     // @ApiOperation(value = "添加或修改监控设备", notes = "添加或修改监控设备")
52 52
     @ApiImplicitParams({
53 53
             @ApiImplicitParam(paramType = "body", dataTypeClass = Integer.class, name = "parameter", value = "监控设备数据"),
54
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
54
+
55 55
     })
56 56
     public ResponseBean saveOrUpdateMonitoring(@RequestBody String parameter, HttpServletRequest request) {
57 57
         ResponseBean responseBean = new ResponseBean();
@@ -64,7 +64,7 @@ public class TpEquipmentController extends BaseController {
64 64
     // @ApiOperation(value = "删除设备", notes = "删除设备")
65 65
     @ApiImplicitParams({
66 66
             @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "设备id"),
67
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
67
+
68 68
     })
69 69
     public ResponseBean deleteEquipmentById(@PathVariable("id") Integer id, HttpServletRequest request){
70 70
         ResponseBean responseBean = new ResponseBean();
@@ -76,7 +76,7 @@ public class TpEquipmentController extends BaseController {
76 76
     // @ApiOperation(value = "批量删除设备", notes = "批量删除设备")
77 77
     @ApiImplicitParams({
78 78
             @ApiImplicitParam(paramType = "body", dataTypeClass = Integer.class, name = "ids", value = "设备id"),
79
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
79
+
80 80
     })
81 81
     public ResponseBean deleteBachEquipmentById(@RequestBody List<Integer> ids, HttpServletRequest request){
82 82
         ResponseBean responseBean = new ResponseBean();
@@ -90,7 +90,7 @@ public class TpEquipmentController extends BaseController {
90 90
     @ApiImplicitParams({
91 91
             @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "type", value = "1 监控 2 访客机 3 可是对讲"),
92 92
             @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "设备id"),
93
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
93
+
94 94
     })
95 95
     public ResponseBean getMonitoringById(@RequestParam("type") Integer type, @PathVariable("id") Integer id, HttpServletRequest request) {
96 96
         ResponseBean responseBean = new ResponseBean();

+ 5
- 6
src/main/java/com/huiju/estateagents/property/controller/TpRentalHouseController.java Voir le fichier

@@ -50,7 +50,6 @@ public class TpRentalHouseController extends BaseController {
50 50
 			@ApiImplicitParam(paramType = "query", dataType = "String", name = "houseStatus", value = "上架状态"),
51 51
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
52 52
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
53
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
54 53
 	})
55 54
 	@RequestMapping(value = "/rentals",method = RequestMethod.GET)
56 55
 	public ResponseBean getRentalList(@RequestParam(value = "id") Integer id,
@@ -72,7 +71,7 @@ public class TpRentalHouseController extends BaseController {
72 71
 	// @ApiOperation(value = "添加公寓", notes = "添加公寓")
73 72
 	@ApiImplicitParams({
74 73
 			@ApiImplicitParam(paramType = "body", dataType = "TpRentalHouse", name = "rentalHouse", value = "公寓"),
75
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
74
+
76 75
 	})
77 76
 	@RequestMapping(value = "/rental/add",method = RequestMethod.POST)
78 77
 	public ResponseBean saveRental(@RequestBody TpRentalHouse rentalHouse, HttpServletRequest request){
@@ -85,7 +84,7 @@ public class TpRentalHouseController extends BaseController {
85 84
 	// @ApiOperation(value = "更新公寓", notes = "更新公寓")
86 85
 	@ApiImplicitParams({
87 86
 			@ApiImplicitParam(paramType = "body", dataType = "TpRentalHouse", name = "rentalHouse", value = "公寓"),
88
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
87
+
89 88
 	})
90 89
 	@RequestMapping(value = "/rental/update",method = RequestMethod.POST)
91 90
 	public ResponseBean updateRental(@RequestBody TpRentalHouse rentalHouse, HttpServletRequest request){
@@ -98,7 +97,7 @@ public class TpRentalHouseController extends BaseController {
98 97
 	// @ApiOperation(value = "获取公寓信息", notes = "获取公寓信息")
99 98
 	@ApiImplicitParams({
100 99
 			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "公寓Id"),
101
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
100
+
102 101
 	})
103 102
 	@RequestMapping(value = "/rental/get/{id}",method = RequestMethod.GET)
104 103
 	public ResponseBean getRental(@PathVariable Integer id, HttpServletRequest request){
@@ -112,7 +111,7 @@ public class TpRentalHouseController extends BaseController {
112 111
 	// @ApiOperation(value = "上架房间", notes = "上架房间")
113 112
 	@ApiImplicitParams({
114 113
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "房间id集合"),
115
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
114
+
116 115
 	})
117 116
 	@RequestMapping(value = "/rental/shelf",method = RequestMethod.POST)
118 117
 	public ResponseBean shelfRental(@RequestBody String jsonString, HttpServletRequest request){
@@ -142,7 +141,7 @@ public class TpRentalHouseController extends BaseController {
142 141
 	// @ApiOperation(value = "下架房间", notes = "下架房间")
143 142
 	@ApiImplicitParams({
144 143
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "房间id集合"),
145
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
144
+
146 145
 	})
147 146
 	@RequestMapping(value = "/rental/obtained",method = RequestMethod.POST)
148 147
 	public ResponseBean obtainedRental(@RequestBody String jsonString, HttpServletRequest request){

+ 5
- 6
src/main/java/com/huiju/estateagents/property/controller/TpShopController.java Voir le fichier

@@ -47,7 +47,6 @@ public class TpShopController extends BaseController {
47 47
 			@ApiImplicitParam(paramType = "query", dataType = "String", name = "shopStatus", value = "上架状态"),
48 48
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
49 49
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
50
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
51 50
 	})
52 51
 	@RequestMapping(value = "/shops",method = RequestMethod.GET)
53 52
 	public ResponseBean getShopList(@RequestParam(value = "id") Integer id,
@@ -66,7 +65,7 @@ public class TpShopController extends BaseController {
66 65
 	// @ApiOperation(value = "添加商铺", notes = "添加商铺")
67 66
 	@ApiImplicitParams({
68 67
 			@ApiImplicitParam(paramType = "body", dataType = "TpShop", name = "shop", value = "商铺"),
69
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
68
+
70 69
 	})
71 70
 	@RequestMapping(value = "/shop/add",method = RequestMethod.POST)
72 71
 	public ResponseBean saveShop(@RequestBody TpShop shop, HttpServletRequest request){
@@ -79,7 +78,7 @@ public class TpShopController extends BaseController {
79 78
 	// @ApiOperation(value = "获取商铺信息", notes = "获取商铺信息")
80 79
 	@ApiImplicitParams({
81 80
 			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "商铺Id"),
82
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
81
+
83 82
 	})
84 83
 	@RequestMapping(value = "/shop/get/{id}",method = RequestMethod.GET)
85 84
 	public ResponseBean getShop(@PathVariable Integer id, HttpServletRequest request){
@@ -93,7 +92,7 @@ public class TpShopController extends BaseController {
93 92
 	// @ApiOperation(value = "更新商铺", notes = "更新商铺")
94 93
 	@ApiImplicitParams({
95 94
 			@ApiImplicitParam(paramType = "body", dataType = "TpShop", name = "shop", value = "商铺"),
96
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
95
+
97 96
 	})
98 97
 	@RequestMapping(value = "/shop/update",method = RequestMethod.POST)
99 98
 	public ResponseBean updateShop(@RequestBody TpShop shop, HttpServletRequest request){
@@ -106,7 +105,7 @@ public class TpShopController extends BaseController {
106 105
 	// @ApiOperation(value = "上架商铺", notes = "上架商铺")
107 106
 	@ApiImplicitParams({
108 107
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺id集合"),
109
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
108
+
110 109
 	})
111 110
 	@RequestMapping(value = "/shop/shelf",method = RequestMethod.POST)
112 111
 	public ResponseBean shelfShop(@RequestBody String jsonString, HttpServletRequest request){
@@ -136,7 +135,7 @@ public class TpShopController extends BaseController {
136 135
 	// @ApiOperation(value = "下架商铺", notes = "下架商铺")
137 136
 	@ApiImplicitParams({
138 137
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺id集合"),
139
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
138
+
140 139
 	})
141 140
 	@RequestMapping(value = "/shop/obtained",method = RequestMethod.POST)
142 141
 	public ResponseBean obtainedShop(@RequestBody String jsonString, HttpServletRequest request){

+ 1
- 1
src/main/java/com/huiju/estateagents/property/controller/TpShopSettingController.java Voir le fichier

@@ -39,7 +39,7 @@ public class TpShopSettingController extends BaseController {
39 39
 	// @ApiOperation(value = "商铺配置启动和关闭", notes = "商铺配置启动和关闭")
40 40
 	@ApiImplicitParams({
41 41
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺配置值"),
42
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
42
+
43 43
 	})
44 44
 	@RequestMapping(value = "/shop/add/setting",method = RequestMethod.POST)
45 45
 	public ResponseBean changeShopSetting(@RequestBody String jsonString, HttpServletRequest request){

+ 6
- 6
src/main/java/com/huiju/estateagents/property/controller/TpShopTypeController.java Voir le fichier

@@ -41,7 +41,7 @@ public class TpShopTypeController extends BaseController {
41 41
 	@ApiImplicitParams({
42 42
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
43 43
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
44
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
44
+
45 45
 	})
46 46
 	@RequestMapping(value = "/shop/types",method = RequestMethod.GET)
47 47
 	public ResponseBean getTypesList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
@@ -55,7 +55,7 @@ public class TpShopTypeController extends BaseController {
55 55
 	// @ApiOperation(value = "添加商铺类型", notes = "添加商铺类型")
56 56
 	@ApiImplicitParams({
57 57
 			@ApiImplicitParam(paramType = "body", dataType = "TpShopType", name = "shopType", value = "商铺类型"),
58
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
58
+
59 59
 	})
60 60
 	@RequestMapping(value = "/shop/add/type",method = RequestMethod.POST)
61 61
 	public ResponseBean saveShopType(@RequestBody TpShopType shopType, HttpServletRequest request){
@@ -86,7 +86,7 @@ public class TpShopTypeController extends BaseController {
86 86
 	// @ApiOperation(value = "获取商铺类型", notes = "获取商铺类型")
87 87
 	@ApiImplicitParams({
88 88
 			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "商铺类型Id"),
89
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
89
+
90 90
 	})
91 91
 	@RequestMapping(value = "/shop/get/type/{id}",method = RequestMethod.GET)
92 92
 	public ResponseBean getShopType(@PathVariable Integer id, HttpServletRequest request){
@@ -100,7 +100,7 @@ public class TpShopTypeController extends BaseController {
100 100
 	// @ApiOperation(value = "更新商铺类型", notes = "更新商铺类型")
101 101
 	@ApiImplicitParams({
102 102
 			@ApiImplicitParam(paramType = "body", dataType = "TpShopType", name = "shopType", value = "商铺类型"),
103
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
103
+
104 104
 	})
105 105
 	@RequestMapping(value = "/shop/update/type",method = RequestMethod.POST)
106 106
 	public ResponseBean updateShopType(@RequestBody TpShopType shopType, HttpServletRequest request){
@@ -129,7 +129,7 @@ public class TpShopTypeController extends BaseController {
129 129
 	// @ApiOperation(value = "删除商铺类型", notes = "删除商铺类型")
130 130
 	@ApiImplicitParams({
131 131
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺id集合"),
132
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
132
+
133 133
 	})
134 134
 	@RequestMapping(value = "/shop/delete/type",method = RequestMethod.DELETE)
135 135
 	public ResponseBean deleteShopType(@RequestBody String jsonString, HttpServletRequest request){
@@ -142,7 +142,7 @@ public class TpShopTypeController extends BaseController {
142 142
 	@ApiImplicitParams({
143 143
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
144 144
 			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
145
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
145
+
146 146
 	})
147 147
 	@RequestMapping(value = "/shop/type/select",method = RequestMethod.GET)
148 148
 	public ResponseBean getTypesSelect(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,

+ 161
- 11
src/main/java/com/huiju/estateagents/property/controller/TpTicketController.java Voir le fichier

@@ -4,7 +4,10 @@ package com.huiju.estateagents.property.controller;
4 4
 import com.huiju.estateagents.base.BaseController;
5 5
 import com.huiju.estateagents.base.ResponseBean;
6 6
 import com.huiju.estateagents.center.taUser.entity.TaUser;
7
+import com.huiju.estateagents.property.common.Constant;
7 8
 import com.huiju.estateagents.property.common.UserElement;
9
+import com.huiju.estateagents.property.model.TpTicket;
10
+import com.huiju.estateagents.property.model.TpTicketRecordComment;
8 11
 import com.huiju.estateagents.property.service.IUserService;
9 12
 import com.huiju.estateagents.property.service.TpTicketService;
10 13
 import io.swagger.annotations.Api;
@@ -12,13 +15,11 @@ import io.swagger.annotations.ApiImplicitParam;
12 15
 import io.swagger.annotations.ApiImplicitParams;
13 16
 import io.swagger.annotations.ApiOperation;
14 17
 import org.springframework.beans.factory.annotation.Autowired;
15
-import org.springframework.web.bind.annotation.RequestBody;
16
-import org.springframework.web.bind.annotation.RequestMapping;
17
-import org.springframework.web.bind.annotation.RequestMethod;
18
-import org.springframework.web.bind.annotation.RestController;
18
+import org.springframework.web.bind.annotation.*;
19 19
 
20 20
 import javax.servlet.http.HttpServletRequest;
21 21
 import javax.servlet.http.HttpSession;
22
+import java.io.IOException;
22 23
 
23 24
 /**
24 25
  * <p>
@@ -30,7 +31,7 @@ import javax.servlet.http.HttpSession;
30 31
  */
31 32
 @RestController
32 33
 @RequestMapping("/")
33
-@Api(value = "工单列表API", description = "工单列表API")
34
+@Api(value = "工单列表API", tags = "工单列表API")
34 35
 public class TpTicketController extends BaseController {
35 36
     @Autowired
36 37
     private IUserService userService;
@@ -45,7 +46,6 @@ public class TpTicketController extends BaseController {
45 46
                     "status:流转状态(0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:已终止')" +
46 47
                     "tpUserId:当前处理人" )
47 48
     })
48
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
49 49
     @RequestMapping(value = "/ticketLiset", method = RequestMethod.POST)
50 50
     public ResponseBean ticketLiset(@RequestBody String parameter, HttpServletRequest request){
51 51
         TaUser userElement = getTaUser(request);
@@ -57,7 +57,7 @@ public class TpTicketController extends BaseController {
57 57
     @ApiImplicitParams({
58 58
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:工单编号")
59 59
     })
60
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
60
+
61 61
     @RequestMapping(value = "/ticketDetails", method = RequestMethod.POST)
62 62
     public ResponseBean ticketDetails(@RequestBody String parameter, HttpServletRequest request){
63 63
         TaUser userElement = getTaUser(request);
@@ -69,7 +69,7 @@ public class TpTicketController extends BaseController {
69 69
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "content:对话内容,imageUrl:[]图片,ticketId:工单id," +
70 70
                     "status:工单状态(0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:已终止)")
71 71
     })
72
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
72
+
73 73
     @RequestMapping(value = "/addRecordComment", method = RequestMethod.POST)
74 74
     public ResponseBean addRecordComment(@RequestBody String parameter, HttpServletRequest request){
75 75
         TaUser userElement = getTaUser(request);
@@ -81,7 +81,7 @@ public class TpTicketController extends BaseController {
81 81
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "ticketId:工单id," +
82 82
                     "id:当前处理人id")
83 83
     })
84
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
84
+
85 85
     @RequestMapping(value = "/addRecord", method = RequestMethod.POST)
86 86
     public ResponseBean addRecord(@RequestBody String parameter, HttpServletRequest request){
87 87
         TaUser userElement = getTaUser(request);
@@ -92,7 +92,7 @@ public class TpTicketController extends BaseController {
92 92
     @ApiImplicitParams({
93 93
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "ticketId:工单id,textContent:拒绝的内容" )
94 94
     })
95
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
95
+
96 96
     @RequestMapping(value = "/updateTicketStatus", method = RequestMethod.POST)
97 97
     public ResponseBean updateTicketStatus(@RequestBody String parameter, HttpServletRequest request){
98 98
         TaUser userElement = getTaUser(request);
@@ -104,11 +104,161 @@ public class TpTicketController extends BaseController {
104 104
     @ApiImplicitParams({
105 105
             @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "content:对话内容,imageUrl:[]图片,ticketId:工单id" )
106 106
     })
107
-    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
107
+
108 108
     @RequestMapping(value = "/updateTicket", method = RequestMethod.POST)
109 109
     public ResponseBean updateTicket(@RequestBody String parameter, HttpServletRequest request){
110 110
         TaUser userElement = getTaUser(request);
111 111
         ResponseBean  responseBean = tpTicketService.updateTicket(parameter,userElement.getUserId(),userElement.getOrgId(),userElement.getUserName(),userElement.getLoginName());
112 112
         return responseBean;
113 113
     }
114
+
115
+
116
+    @RequestMapping(value = "/wx/tickets/{orgId}", method = RequestMethod.GET)
117
+    @ApiOperation(value = "获取 报修/投诉/联系单 各3条数据", notes = "根据 小区编号,第几页,一页多少行")
118
+    @ApiImplicitParams({
119
+            @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "orgId",value = "小区编号"),
120
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum",value = "第几页"),
121
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize",value = "一页多少数据"),
122
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
123
+    })
124
+    @Deprecated
125
+    public ResponseBean getService(@PathVariable(value = "orgId") Integer orgId,
126
+                                   @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
127
+                                   @RequestParam(value = "pageSize", defaultValue = "3") Integer pageSize,
128
+                                   HttpServletRequest request) {
129
+        ResponseBean response = new ResponseBean();
130
+        
131
+        TaUser userElement = getTaUser(request);
132
+
133
+        TpTicket tpTicket = new TpTicket();
134
+        tpTicket.setOrgId(Integer.valueOf(orgId));
135
+        tpTicket.setTaUserId(userElement.getUserId());
136
+
137
+        response = tpTicketService.getList(tpTicket, pageNum, pageSize);
138
+        return response;
139
+    }
140
+
141
+    @ApiOperation(value = "获取报修/投诉/联系单进度详情数据", notes = "获取报修/投诉/联系单进度详情数据")
142
+    @ApiImplicitParams({
143
+            @ApiImplicitParam(paramType = "path", dataType = "Integer", name = "orgId", value = "小区编号"),
144
+            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "ticketId", value = "报修id")
145
+    })
146
+    @RequestMapping(value = "/wx/ticket/schedule/{orgId}", method = RequestMethod.GET)
147
+    public ResponseBean getTicketSchedule(@PathVariable(value = "orgId") Integer orgId, @RequestParam Integer ticketId) {
148
+        ResponseBean responseBean = new ResponseBean();
149
+        TpTicket ticket = tpTicketService.getTicketSchedule(String.valueOf(orgId), ticketId);
150
+        if (null != ticket) {
151
+            responseBean.addSuccess(ticket);
152
+        }else {
153
+            responseBean.addError("没有该工单!");
154
+        }
155
+
156
+        return responseBean;
157
+    }
158
+
159
+    @RequestMapping(value = "/wx/tickets/list/{orgId}", method = RequestMethod.GET)
160
+    @ApiOperation(value = "获取 报修/投诉/联系单 数据列表", notes = "根据 小区编号,工单类型,第几页,一页多少行")
161
+    @ApiImplicitParams({
162
+            @ApiImplicitParam(paramType = "path",dataType = "Integer",name = "orgId", value = "小区编号"),
163
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum", value = "第几页"),
164
+            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
165
+            @ApiImplicitParam(paramType = "query",dataType = "String",name = "type", value = "工单类型 (1:投诉   2:报修 3:联系物业)"),
166
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
167
+
168
+    })
169
+    public ResponseBean getServiceList(@PathVariable(value = "orgId") Integer orgId,
170
+                                       @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
171
+                                       @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
172
+                                       @RequestParam(value = "type") String type,
173
+                                       HttpServletRequest request) {
174
+        ResponseBean responseBean = new ResponseBean();
175
+
176
+        TaUser userElement = getTaUser(request);
177
+
178
+        TpTicket tpTicket = new TpTicket();
179
+        tpTicket.setOrgId(Integer.valueOf(orgId));
180
+        tpTicket.setTaUserId(userElement.getUserId());
181
+        tpTicket.setType(type);
182
+
183
+        responseBean = tpTicketService.getByTypeList(tpTicket, pageNum, pageSize);
184
+
185
+        return responseBean;
186
+
187
+    }
188
+
189
+    @ApiOperation(value = "回复 报修/投诉/联系单 追问接口", notes = "回复 报修/投诉/联系单 追问接口")
190
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "orgId", value = "小区Id"),
191
+            @ApiImplicitParam(name = "tpTicketRecordComment", value = "回复记录参数(ticketId:工单id,content:回复时间,ticketRecordCommentId:需要回复的id)", paramType = "body"),
192
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")})
193
+    @RequestMapping(value = "/wx/ticket/reply/{orgId}", method = RequestMethod.POST)
194
+    public ResponseBean updateTicketsReply(@PathVariable(value = "orgId") Integer orgId, @RequestBody TpTicketRecordComment tpTicketRecordComment, HttpServletRequest request){
195
+        TaUser userElement = getTaUser(request);
196
+        Integer userId = userElement.getUserId();
197
+        ResponseBean responseBean = new ResponseBean();
198
+
199
+        tpTicketRecordComment.setOrgId(orgId);
200
+        Integer size = tpTicketService.updateTicketsReply(tpTicketRecordComment, userId);
201
+        if (size > 0){
202
+            responseBean.addSuccess(size);
203
+        } else {
204
+            responseBean.addError("更新失败");
205
+        }
206
+        return responseBean;
207
+    }
208
+
209
+    @ApiOperation(value = "添加 报修/投诉/联系单", notes = "添加 报修/投诉/联系单")
210
+    @ApiImplicitParams({
211
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =
212
+                    "ticketTitle:工单标题,ticketContent:工单内容,type: 1:投诉   2:报修 3:联系物业 , repairType:0:公共区域  1: 房屋质量  2:户内设施, imageUrl:图片地址 "),
213
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
214
+    })
215
+    @RequestMapping(value = "/wx/addtpTicket", method = RequestMethod.POST)
216
+    @ResponseBody
217
+    public ResponseBean addTransaction(@RequestBody String paramets, HttpServletRequest request) throws IOException {
218
+        ResponseBean responseBean = new ResponseBean();
219
+        TaUser userElement = getTaUser(request);
220
+        ResponseBean response = tpTicketService.addAiTicketService(userElement, paramets);
221
+        return response;
222
+    }
223
+
224
+    @ApiOperation(value = "修改 报修/投诉/联系单", notes = "修改 报修/投诉/联系单")
225
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "ticketId", value = "工单Id"),
226
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "parameter", value =
227
+                    "ticketTitle:工单标题,ticketContent:工单内容,type: 1:投诉   2:报修 3:联系物业 , imageUrl:图片地址 "),
228
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
229
+    })
230
+    @RequestMapping(value = "/wx/updateTicket/{ticketId}", method = RequestMethod.POST)
231
+    public ResponseBean updateTicketContent(@PathVariable("ticketId") Integer ticketId,
232
+                                            @RequestBody String parameter,
233
+                                            HttpServletRequest request) {
234
+        ResponseBean responseBean = new ResponseBean();
235
+        TaUser userElement = getTaUser(request);
236
+        responseBean = tpTicketService.updateTicketContent(ticketId, parameter,userElement);
237
+        return responseBean;
238
+    }
239
+
240
+    @ApiOperation(value = "报修进度终止", notes = "报修进度终止")
241
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "orgId", value = "小区Id"),
242
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "帖子Id"),
243
+            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")})
244
+    @RequestMapping(value = "/wx/stopTicket/{orgId}", method = RequestMethod.GET)
245
+    public ResponseBean stopTicket(@PathVariable("orgId") Integer orgId, @RequestParam("ticketId") Integer ticketId, HttpServletRequest request) {
246
+        TaUser userElement = getTaUser(request);
247
+
248
+        ResponseBean responseBean = new ResponseBean();
249
+        responseBean = tpTicketService.stopTpTicketRecord(orgId, ticketId, userElement);
250
+        return responseBean;
251
+    }
252
+
253
+    @ApiOperation(value = "添加工单对话", notes = "添加工单对话")
254
+    @ApiImplicitParams({
255
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "content:对话内容,imageUrl:[]图片,ticketId:工单id," )
256
+    })
257
+
258
+    @RequestMapping(value = "/wx/addWxRecordComment", method = RequestMethod.POST)
259
+    public ResponseBean addWxRecordComment(@RequestBody String parameter, HttpServletRequest request){
260
+        TaUser userElement = getTaUser(request);
261
+        ResponseBean  responseBean = tpTicketService.addWxRecordComment(parameter,userElement.getUserId(),userElement.getOrgId(),userElement.getUserName());
262
+        return responseBean;
263
+    }
114 264
 }

+ 7
- 9
src/main/java/com/huiju/estateagents/property/controller/TransactionController.java Voir le fichier

@@ -39,7 +39,7 @@ public class TransactionController extends BaseController {
39 39
 					"userName:发布人,status:状态,pageNum:总数,pageSize当前页"
40 40
 					)
41 41
 	})
42
-	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
42
+
43 43
 	@RequestMapping(value = "/transactions",method = RequestMethod.POST)
44 44
 	public ResponseBean getList(@RequestBody String parameter, HttpServletRequest request){
45 45
 		TaUser userElement = getTaUser(request);
@@ -49,7 +49,6 @@ public class TransactionController extends BaseController {
49 49
 	
50 50
 	// @ApiOperation(value = "获取二手租赁详情", notes = "获取二手租赁详情")
51 51
 	@ApiImplicitParams({
52
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
53 52
 			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
54 53
 			@ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "交易id")
55 54
 	})
@@ -63,7 +62,6 @@ public class TransactionController extends BaseController {
63 62
 	
64 63
 	// @ApiOperation(value = "作废二手租赁", notes = "作废二手租赁")
65 64
 	@ApiImplicitParams({
66
-			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
67 65
 			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
68 66
 			@ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "交易id")
69 67
 	})
@@ -79,7 +77,7 @@ public class TransactionController extends BaseController {
79 77
 	@ApiImplicitParams({
80 78
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="transactionTitle:话题标题," +
81 79
 					"type:0 代表 二手(卖二手物品)  1 是代表 求购 (买二手物品) 2 是代表 租赁(租二手物品)3其他话题,contentImg:图片,sort:权重值,status:'0 是已作废 1 是已发布  2 是草稿 ")})
82
-	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
80
+
83 81
 	@RequestMapping(value="/transactions/add",method = RequestMethod.POST)
84 82
 	public ResponseBean transactionsAdd(@RequestBody String paramets, HttpServletRequest request){
85 83
 		TaUser userElement = getTaUser(request);
@@ -91,7 +89,7 @@ public class TransactionController extends BaseController {
91 89
 	@ApiImplicitParams({
92 90
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="transactionTitle:话题标题," +
93 91
 					"type:0 代表 二手(卖二手物品)  1 是代表 求购 (买二手物品) 2 是代表 租赁(租二手物品)3其他话题,contentImg:图片,sort:权重值,status:'0 是已作废 1 是已发布  2 是草稿 ")})
94
-	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
92
+
95 93
 	@RequestMapping(value="/transactions/updata",method = RequestMethod.POST)
96 94
 	public ResponseBean transactionsUpdata(@RequestBody String paramets, HttpServletRequest request){
97 95
 		TaUser userElement = getTaUser(request);
@@ -101,7 +99,7 @@ public class TransactionController extends BaseController {
101 99
 	// @ApiOperation(value = "删除二手租赁",nickname ="删除二手租赁")
102 100
 	@ApiImplicitParams({
103 101
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id(多个)" )})
104
-	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
102
+
105 103
 	@RequestMapping(value="/transactions/delete",method = RequestMethod.POST)
106 104
 	public ResponseBean transactionsDelete(@RequestBody String paramets, HttpServletRequest request){
107 105
 		TaUser userElement = getTaUser(request);
@@ -113,7 +111,7 @@ public class TransactionController extends BaseController {
113 111
 	@ApiImplicitParams({
114 112
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id,replyTaUserName:被回复人,taUserName:回复人," +
115 113
 					"status:(0回复我的,1回复全部物业人员的,2全部物业人员回复的,3话题发起人回复的),createDate:时间" )})
116
-	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
114
+
117 115
 	@RequestMapping(value="/transactionReplyList",method = RequestMethod.POST)
118 116
 	public ResponseBean transactionReplyList(@RequestBody String paramets, HttpServletRequest request){
119 117
 		TaUser userElement = getTaUser(request);
@@ -133,7 +131,7 @@ public class TransactionController extends BaseController {
133 131
 	// @ApiOperation(value = "添加二手帖子评论",nickname ="添加二手帖子评论")
134 132
 	@ApiImplicitParams({
135 133
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id,contentImg:评论所带图片,replyContent:评论内容" )})
136
-	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
134
+
137 135
 	@RequestMapping(value="/transactionReply/add",method = RequestMethod.POST)
138 136
 	public ResponseBean transactionReplyAdd(@RequestBody String paramets, HttpServletRequest request){
139 137
 		TaUser userElement = getTaUser(request);
@@ -144,7 +142,7 @@ public class TransactionController extends BaseController {
144 142
 	// @ApiOperation(value = "二手帖子举报列表",nickname ="二手帖子举报列表")
145 143
 	@ApiImplicitParams({
146 144
 			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =":举报人姓名,reportPhone:举报人电话,transactionId:帖子ID" )})
147
-	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
145
+
148 146
 	@RequestMapping(value="/transactionReportList",method = RequestMethod.POST)
149 147
 	public ResponseBean transactionReportList(@RequestBody String paramets, HttpServletRequest request){
150 148
 		TaUser userElement = getTaUser(request);

+ 1
- 5
src/main/java/com/huiju/estateagents/property/controller/UserVerifyController.java Voir le fichier

@@ -39,7 +39,6 @@ public class UserVerifyController extends BaseController {
39 39
             @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "idCard", value = "身份证"),
40 40
             @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "pageNum", value = "第几页"),
41 41
             @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "pageSize", value = "一页多少行"),
42
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
43 42
     })
44 43
     public ResponseBean getAll(@RequestParam(value = "phone", required = false) String phone,
45 44
                                @RequestParam(value = "userName", required = false) String userName,
@@ -57,7 +56,6 @@ public class UserVerifyController extends BaseController {
57 56
     @RequestMapping(value = "/user/verify/audit/{userVerifyId}", method = RequestMethod.PUT)
58 57
     // @ApiOperation(value = "审核用户", notes = "审核用户")
59 58
     @ApiImplicitParams({
60
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
61 59
             @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "userVerifyId", value = "审核id"),
62 60
             @ApiImplicitParam(paramType = "query", dataTypeClass = Boolean.class, name = "verifyStatus", value = "true通过;false不通过"),
63 61
             @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "remark", value = "审核不通过的原因"),
@@ -76,7 +74,6 @@ public class UserVerifyController extends BaseController {
76 74
     @RequestMapping(value = "/ta/user/has", method = RequestMethod.GET)
77 75
     // @ApiOperation(value = "校验移动端手机号是否注册", notes = "校验移动端手机号是否注册")
78 76
     @ApiImplicitParams({
79
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
80 77
             @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "ownerTel", value = "手机号"),
81 78
     })
82 79
     public ResponseBean taUserHas(@RequestParam("ownerTel") String ownerTel,
@@ -102,7 +99,6 @@ public class UserVerifyController extends BaseController {
102 99
     @RequestMapping(value = "/ta/user/hasOwner", method = RequestMethod.GET)
103 100
     // @ApiOperation(value = "根据 期/栋/单元/楼层/户号 校验是否有业主", notes = "根据 期/栋/单元/楼层/户号 校验是否有业主")
104 101
     @ApiImplicitParams({
105
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
106 102
             @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "ownerTel", value = "审核id"),
107 103
     })
108 104
     public ResponseBean taUserHasOwner(@RequestParam("phaseId") Integer phaseId,
@@ -154,7 +150,7 @@ public class UserVerifyController extends BaseController {
154 150
     @RequestMapping(value = "/user/verifyinfo/{userVerifyId}", method = RequestMethod.PUT)
155 151
     // @ApiOperation(value = "楼栋详情页面审核", notes = "楼栋详情页面审核")
156 152
     @ApiImplicitParams({
157
-            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
153
+
158 154
             @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "userVerifyId", value = "审核id"),
159 155
             @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "roleState", value = "1:业主,2:租客,3:家属"),
160 156
             @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "verifyStatus", value = "0 是未审核1是审核通过2是审核不通过"),

+ 14
- 0
src/main/java/com/huiju/estateagents/property/dao/TdImagesMapper.java Voir le fichier

@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.huiju.estateagents.property.model.TdImages;
5 5
 import org.apache.ibatis.annotations.Mapper;
6 6
 
7
+import java.util.List;
8
+import java.util.Map;
9
+
7 10
 /**
8 11
  * <p>
9 12
  * 图片表 Mapper 接口
@@ -15,4 +18,15 @@ import org.apache.ibatis.annotations.Mapper;
15 18
 @Mapper
16 19
 public interface TdImagesMapper extends BaseMapper<TdImages> {
17 20
 
21
+    List<TdImages> getByUUIDAndByType(Map<String,Object> map);
22
+
23
+
24
+    /**
25
+     * 批量删除
26
+     *  根据 uuid 和 type
27
+     * @param map
28
+     * @return
29
+     */
30
+    int deleteByUuidAndType(Map map);
31
+
18 32
 }

+ 2
- 0
src/main/java/com/huiju/estateagents/property/dao/TpAnnouncementMapper.java Voir le fichier

@@ -33,4 +33,6 @@ public interface TpAnnouncementMapper extends BaseMapper<TpAnnouncement> {
33 33
      * @return
34 34
      */
35 35
     List<TpAnnouncement> getAnnouncement(@Param("orgId") Integer orgId, @Param("sum") Integer sum);
36
+
37
+    IPage<TpAnnouncement> getWxAnnouncements(Page page, @Param("orgId") Integer orgId,@Param("title") String title);
36 38
 }

+ 21
- 0
src/main/java/com/huiju/estateagents/property/dao/TpSocialViewMapper.java Voir le fichier

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

+ 14
- 0
src/main/java/com/huiju/estateagents/property/dao/TpTicketMapper.java Voir le fichier

@@ -8,6 +8,9 @@ import com.huiju.estateagents.property.vo.TpTicketVO;
8 8
 import org.apache.ibatis.annotations.Mapper;
9 9
 import org.apache.ibatis.annotations.Param;
10 10
 
11
+import java.util.List;
12
+import java.util.Map;
13
+
11 14
 /**
12 15
  * <p>
13 16
  * 工单表 Mapper 接口
@@ -21,4 +24,15 @@ public interface TpTicketMapper extends BaseMapper<TpTicket> {
21 24
 
22 25
     IPage<TpTicket> ticketList(Page page, @Param("ticket") TpTicket ticket, @Param("userName") String UserNmae, @Param("updateUserNmae") String updateUserNmae, @Param("orgId") Integer orgId);
23 26
     TpTicketVO ticketDetails(@Param("id") Integer id);
27
+
28
+    /**
29
+     * 根据 小区ID 用户ID 类型 查询数据
30
+     * @param map
31
+     * @return
32
+     */
33
+    IPage<TpTicket> selectByCommuniytIdAndByTaUserIdAndByType(Page page,Map map);
34
+
35
+    TpTicket selectTpTicketName(@Param("communityId")Integer communityId, @Param("type")String type, @Param("ticketTitle")String ticketTitle);
36
+
37
+    void updateTpUserId(@Param("ticketId") Integer ticketId);
24 38
 }

+ 22
- 0
src/main/java/com/huiju/estateagents/property/dao/TpTicketRecordCommentMapper.java Voir le fichier

@@ -1,9 +1,13 @@
1 1
 package com.huiju.estateagents.property.dao;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpTicketRecord;
4 5
 import com.huiju.estateagents.property.model.TpTicketRecordComment;
5 6
 import org.apache.ibatis.annotations.Mapper;
6 7
 
8
+import java.util.List;
9
+import java.util.Map;
10
+
7 11
 /**
8 12
  * <p>
9 13
  * 物业端工单追问表 Mapper 接口
@@ -15,4 +19,22 @@ import org.apache.ibatis.annotations.Mapper;
15 19
 @Mapper
16 20
 public interface TpTicketRecordCommentMapper extends BaseMapper<TpTicketRecordComment> {
17 21
 
22
+    /**
23
+     * 根据工单ID,最新的几条 查询出最新的追答记录
24
+     *
25
+     *  size 表示最新几条
26
+     *  tickerId 工单ID
27
+     *
28
+     * @param map
29
+     * @return
30
+     */
31
+    List<TpTicketRecordComment> selectByTicketId(Map map);
32
+
33
+    /**
34
+     * 查询出这个处理撞他下所有的回复数据
35
+     * @param tpTicketRecord
36
+     * @return
37
+     */
38
+    List<TpTicketRecordComment> selectByTicketRecordId(TpTicketRecord tpTicketRecord);
39
+
18 40
 }

+ 4
- 0
src/main/java/com/huiju/estateagents/property/dao/TpTicketRecordMapper.java Voir le fichier

@@ -5,6 +5,8 @@ import com.huiju.estateagents.property.model.TpTicketRecord;
5 5
 import org.apache.ibatis.annotations.Mapper;
6 6
 import org.apache.ibatis.annotations.Param;
7 7
 
8
+import java.util.List;
9
+
8 10
 /**
9 11
  * <p>
10 12
  * 工单处理表 Mapper 接口
@@ -25,4 +27,6 @@ public interface TpTicketRecordMapper extends BaseMapper<TpTicketRecord> {
25 27
     void updateTicketRecord(TpTicketRecord tpTicketRecord);
26 28
 
27 29
     String statusName(@Param("status") String status);
30
+
31
+    List<TpTicketRecord> getTicketRecordByTicketId(@Param("orgId") String orgId, @Param("ticketId") Integer ticketId);
28 32
 }

+ 19
- 0
src/main/java/com/huiju/estateagents/property/model/TpAnnouncement.java Voir le fichier

@@ -1,5 +1,6 @@
1 1
 package com.huiju.estateagents.property.model;
2 2
 import com.baomidou.mybatisplus.annotation.IdType;
3
+import com.baomidou.mybatisplus.annotation.TableField;
3 4
 import com.baomidou.mybatisplus.annotation.TableId;
4 5
 import com.baomidou.mybatisplus.annotation.TableName;
5 6
 import lombok.Data;
@@ -8,6 +9,7 @@ import lombok.experimental.Accessors;
8 9
 
9 10
 import java.io.Serializable;
10 11
 import java.util.Date;
12
+import java.util.List;
11 13
 
12 14
 @Data
13 15
 @EqualsAndHashCode(callSuper = false)
@@ -55,4 +57,21 @@ public class TpAnnouncement implements Serializable {
55 57
 
56 58
     /**更新时间**/
57 59
     private Date updateDate;
60
+
61
+
62
+    /**
63
+     * 报名状态
64
+     */
65
+    @TableField(exist = false)
66
+    private String signStatus;
67
+    /**
68
+     * 签到状态
69
+     * 0已签到,1未签到
70
+     */
71
+    @TableField(exist = false)
72
+    private  Integer signType;
73
+
74
+    @TableField(exist = false)
75
+    private List<String> imgList;
76
+
58 77
 }

+ 75
- 0
src/main/java/com/huiju/estateagents/property/model/TpSocialView.java Voir le fichier

@@ -0,0 +1,75 @@
1
+package com.huiju.estateagents.property.model;
2
+
3
+import java.util.Date;
4
+
5
+public class TpSocialView {
6
+    private Integer id;
7
+
8
+    private Integer communityId;
9
+
10
+    private Integer uuid;
11
+
12
+    private String socialType;
13
+
14
+    private Integer taUserId;
15
+
16
+    private String remark;
17
+
18
+    private Date createDate;
19
+
20
+    public Integer getId() {
21
+        return id;
22
+    }
23
+
24
+    public void setId(Integer id) {
25
+        this.id = id;
26
+    }
27
+
28
+    public Integer getCommunityId() {
29
+        return communityId;
30
+    }
31
+
32
+    public void setCommunityId(Integer communityId) {
33
+        this.communityId = communityId;
34
+    }
35
+
36
+    public Integer getUuid() {
37
+        return uuid;
38
+    }
39
+
40
+    public void setUuid(Integer uuid) {
41
+        this.uuid = uuid;
42
+    }
43
+
44
+    public String getSocialType() {
45
+        return socialType;
46
+    }
47
+
48
+    public void setSocialType(String socialType) {
49
+        this.socialType = socialType == null ? null : socialType.trim();
50
+    }
51
+
52
+    public Integer getTaUserId() {
53
+        return taUserId;
54
+    }
55
+
56
+    public void setTaUserId(Integer taUserId) {
57
+        this.taUserId = taUserId;
58
+    }
59
+
60
+    public String getRemark() {
61
+        return remark;
62
+    }
63
+
64
+    public void setRemark(String remark) {
65
+        this.remark = remark == null ? null : remark.trim();
66
+    }
67
+
68
+    public Date getCreateDate() {
69
+        return createDate;
70
+    }
71
+
72
+    public void setCreateDate(Date createDate) {
73
+        this.createDate = createDate;
74
+    }
75
+}

+ 7
- 0
src/main/java/com/huiju/estateagents/property/model/TpTicket.java Voir le fichier

@@ -1,6 +1,7 @@
1 1
 package com.huiju.estateagents.property.model;
2 2
 
3 3
 import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableField;
4 5
 import com.baomidou.mybatisplus.annotation.TableId;
5 6
 import com.baomidou.mybatisplus.annotation.TableName;
6 7
 import lombok.Data;
@@ -9,6 +10,7 @@ import lombok.experimental.Accessors;
9 10
 
10 11
 import java.io.Serializable;
11 12
 import java.time.LocalDateTime;
13
+import java.util.List;
12 14
 
13 15
 /**
14 16
  * <p>
@@ -102,4 +104,9 @@ public class TpTicket implements Serializable {
102 104
     private LocalDateTime updateDate;
103 105
 
104 106
 
107
+    @TableField(exist = false)
108
+    private String [] tdImagesList;
109
+
110
+    @TableField(exist = false)
111
+    private List<TpTicketRecord> ticketRecordList;
105 112
 }

+ 6
- 0
src/main/java/com/huiju/estateagents/property/model/TpTicketRecord.java Voir le fichier

@@ -72,4 +72,10 @@ public class TpTicketRecord implements Serializable {
72 72
      */
73 73
     @TableField(exist = false)
74 74
     private String statusName;
75
+
76
+    @TableField(exist = false)
77
+    private String ticketStatusName;
78
+
79
+    @TableField(exist = false)
80
+    private List<TpTicketRecordComment> ticketRecordCommentList;
75 81
 }

+ 40
- 0
src/main/java/com/huiju/estateagents/property/service/SocialServiceI.java Voir le fichier

@@ -0,0 +1,40 @@
1
+package com.huiju.estateagents.property.service;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.model.TpActivity;
7
+import com.huiju.estateagents.property.model.TpAnnouncement;
8
+import com.huiju.estateagents.property.model.TpTicket;
9
+import com.huiju.estateagents.property.model.TpTransaction;
10
+
11
+import java.util.List;
12
+import java.util.Map;
13
+
14
+/**
15
+ * @author weichaochao
16
+ * @Title: SocialServiceI
17
+ * @date 2018/10/23
18
+ */
19
+public interface SocialServiceI {
20
+
21
+	/**
22
+	 * 查看公告详情
23
+	 * @param id
24
+	 * @param orgId
25
+	 * @param userId
26
+	 * @return
27
+	 */
28
+    TpAnnouncement findAnnouncementDetail(Integer id, Integer orgId, Integer userId);
29
+
30
+
31
+	/**
32
+	 * 分页获取公告列表
33
+	 * @param orgId
34
+	 * @param title
35
+	 * @param pageNum
36
+	 * @param pageSize
37
+	 * @return
38
+	 */
39
+	ResponseBean getAnnouncements(Integer orgId, String title, Integer pageNum, Integer pageSize);
40
+}

+ 74
- 0
src/main/java/com/huiju/estateagents/property/service/TpTicketService.java Voir le fichier

@@ -2,7 +2,11 @@ package com.huiju.estateagents.property.service;
2 2
 
3 3
 import com.baomidou.mybatisplus.extension.service.IService;
4 4
 import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.center.taUser.entity.TaUser;
5 6
 import com.huiju.estateagents.property.model.TpTicket;
7
+import com.huiju.estateagents.property.model.TpTicketRecordComment;
8
+
9
+import java.io.IOException;
6 10
 
7 11
 /**
8 12
  * <p>
@@ -65,4 +69,74 @@ public interface TpTicketService extends IService<TpTicket> {
65 69
      * @return
66 70
      */
67 71
     ResponseBean updateTicket(String parameter, Integer id, Integer orgId, String userName, String longName);
72
+
73
+
74
+    /**
75
+     * 根据 小区ID 用户ID 类型 查询数据
76
+     * @param tpTicket
77
+     * @param pageCode
78
+     * @param pageSize
79
+     * @return 返回 维修/投诉/联系单 各 pageSize 条
80
+     */
81
+    ResponseBean getList(TpTicket tpTicket,Integer pageCode, Integer pageSize);
82
+
83
+    /**
84
+     * 根据 小区ID 用户ID 类型 查询数据
85
+     * @param tpTicket
86
+     * @param pageNum
87
+     * @param pageSize
88
+     * @return 返回 维修/投诉/联系单 记录列表
89
+     */
90
+    ResponseBean getByTypeList(TpTicket tpTicket, Integer pageNum, Integer pageSize);
91
+
92
+    /**
93
+     * 获取报修详情
94
+     * @param orgId
95
+     * @param ticketId
96
+     * @return
97
+     */
98
+    TpTicket getTicketSchedule(String orgId, Integer ticketId);
99
+
100
+
101
+    /**
102
+     * 添加 维修/投诉/联系单
103
+     * @param userElement
104
+     * @param parameter
105
+     * @return
106
+     */
107
+    ResponseBean addAiTicketService(TaUser userElement, String parameter) throws IOException;
108
+
109
+    /**
110
+     * 回复工单
111
+     * @param tpTicketRecordComment
112
+     * @return
113
+     */
114
+    @Deprecated
115
+    Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment, Integer userId);
116
+
117
+    /**
118
+     * 修改 维修/投诉/联系单 内容
119
+     * @param ticketId
120
+     * @param parameter
121
+     * @param userElement
122
+     */
123
+    ResponseBean updateTicketContent(Integer ticketId, String parameter,TaUser userElement);
124
+
125
+    /**
126
+     * 终止 维修/投诉/联系单
127
+     * @param orgId
128
+     * @param ticketId
129
+     * @return
130
+     */
131
+    ResponseBean stopTpTicketRecord(Integer orgId, Integer ticketId, TaUser userElement);
132
+
133
+    /**
134
+     * 添加工单对话
135
+     * @param parameter
136
+     * @param verifyId
137
+     * @param orgId
138
+     * @param userName
139
+     * @return
140
+     */
141
+    ResponseBean addWxRecordComment(String parameter, Integer verifyId, Integer orgId, String userName);
68 142
 }

+ 120
- 0
src/main/java/com/huiju/estateagents/property/service/impl/SocialServiceImpl.java Voir le fichier

@@ -0,0 +1,120 @@
1
+package com.huiju.estateagents.property.service.impl;
2
+
3
+import com.alibaba.fastjson.JSONArray;
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.baomidou.mybatisplus.core.metadata.IPage;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.google.common.collect.Maps;
8
+import com.huiju.estateagents.base.ResponseBean;
9
+import com.huiju.estateagents.center.taUser.entity.TaUser;
10
+import com.huiju.estateagents.center.taUser.mapper.TaUserMapper;
11
+import com.huiju.estateagents.center.taUser.service.ITaUserService;
12
+import com.huiju.estateagents.property.common.Constant;
13
+import com.huiju.estateagents.property.common.UserElement;
14
+import com.huiju.estateagents.property.dao.*;
15
+import com.huiju.estateagents.property.model.*;
16
+import com.huiju.estateagents.property.service.SocialServiceI;
17
+import com.huiju.estateagents.property.vo.TpTicketVO;
18
+import org.springframework.beans.factory.annotation.Autowired;
19
+import org.springframework.context.ApplicationContext;
20
+import org.springframework.stereotype.Service;
21
+import org.springframework.transaction.annotation.Transactional;
22
+import org.springframework.util.StringUtils;
23
+
24
+import java.io.IOException;
25
+import java.util.*;
26
+import java.util.stream.Collectors;
27
+
28
+/**
29
+ * @author weichaochao
30
+ * @Title: SocialServiceImpl
31
+ * @date 2018/10/23
32
+ */
33
+@Service("SocialService")
34
+@Transactional
35
+public class SocialServiceImpl implements SocialServiceI {
36
+
37
+    @Autowired
38
+    private TpAnnouncementMapper tpAnnouncementMapper;
39
+
40
+    @Autowired
41
+    private TpSocialViewMapper tpSocialViewMapper;
42
+
43
+    @Autowired
44
+    private TdImagesMapper tdImagesMapper;
45
+
46
+    @Override
47
+    @Transactional
48
+    public TpAnnouncement findAnnouncementDetail(Integer id, Integer orgId, Integer userId) {
49
+        //更新此用户的查看次数操作
50
+        Integer allViewNum = updateSocialView(userId, Constant.ANNOUNCEMENT, orgId, id);
51
+        if (null != allViewNum) {
52
+            tpAnnouncementMapper.updateByPrimaryKeySelective(id, allViewNum);
53
+        }
54
+        TpAnnouncement tpAnnouncement = tpAnnouncementMapper.selectByPrimaryKey(id, orgId);
55
+//        tpAnnouncement.setUserName(tpUserMapper.selectByPrimaryKey(tpAnnouncement.getCreateUser()).getUserName());
56
+//        tpAnnouncement.setUserName(tpUserMapper.selectByPrimaryKey(tpAnnouncement.getCreateUser()).getUserName());
57
+
58
+        Map<String, Object> map = Maps.newHashMap();
59
+        map.put("uuid", tpAnnouncement.getId());
60
+        map.put("type", Constant.ANNOUNCEMENT);
61
+        // 查询图片
62
+        List<TdImages> tdImagesList = tdImagesMapper.getByUUIDAndByType(map);
63
+        List<String> imgList = tdImagesList.stream().map(e -> new String(e.getImageUrl())).collect(Collectors.toList());
64
+        tpAnnouncement.setImgList(imgList);
65
+        return tpAnnouncement;
66
+    }
67
+
68
+    /**
69
+     * 分页获取公告列表
70
+     *
71
+     * @param orgId
72
+     * @param title
73
+     * @param pageNum
74
+     * @param pageSize
75
+     * @return
76
+     */
77
+    @Override
78
+    public ResponseBean getAnnouncements(Integer orgId, String title, Integer pageNum, Integer pageSize) {
79
+        ResponseBean responseBean = new ResponseBean();
80
+        Map<String, Object> parameter = Maps.newHashMap();
81
+        //使用分页插件
82
+        Page<TpAnnouncement> page = new Page<>(pageNum, pageSize);
83
+        // 获取数据
84
+        IPage<TpAnnouncement> wxAnnouncementsPage = tpAnnouncementMapper.getWxAnnouncements(page, orgId, title);
85
+        parameter.put("total", wxAnnouncementsPage.getTotal());
86
+        parameter.put("list", wxAnnouncementsPage.getRecords());
87
+        responseBean.addSuccess(parameter);
88
+        return responseBean;
89
+    }
90
+
91
+
92
+
93
+    /**
94
+     * 更新此用户的查看次数操作
95
+     *
96
+     * @param userId
97
+     * @param socialType
98
+     * @param orgId
99
+     * @param uuid
100
+     */
101
+    private Integer updateSocialView(Integer userId, String socialType, Integer orgId, Integer uuid) {
102
+        //检查是否查看过这个帖子
103
+        TpSocialView tpSocialView = new TpSocialView();
104
+        tpSocialView.setTaUserId(userId);
105
+        tpSocialView.setSocialType(socialType);
106
+        tpSocialView.setCommunityId(orgId);
107
+        tpSocialView.setUuid(uuid);
108
+        Integer viewNum = tpSocialViewMapper.selectViewNum(tpSocialView);
109
+
110
+        //查看过的话查看次数加一
111
+        if (viewNum == 0) {
112
+            tpSocialView.setCreateDate(new Date());
113
+            tpSocialViewMapper.insertSelective(tpSocialView);
114
+            tpSocialView.setTaUserId(null);
115
+            Integer allViewNum = tpSocialViewMapper.selectViewNum(tpSocialView);
116
+            return allViewNum;
117
+        }
118
+        return null;
119
+    }
120
+}

+ 543
- 9
src/main/java/com/huiju/estateagents/property/service/impl/TpTicketServiceImpl.java Voir le fichier

@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 5
 import com.baomidou.mybatisplus.core.metadata.IPage;
6 6
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7 7
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8
+import com.google.common.collect.Lists;
9
+import com.google.common.collect.Maps;
8 10
 import com.huiju.estateagents.base.ResponseBean;
9
-import com.huiju.estateagents.center.taUser.mapper.TaUserMapper;
11
+import com.huiju.estateagents.center.taUser.entity.TaUser;
10 12
 import com.huiju.estateagents.property.common.Constant;
11 13
 import com.huiju.estateagents.property.dao.*;
12 14
 import com.huiju.estateagents.property.model.*;
@@ -15,11 +17,12 @@ import com.huiju.estateagents.property.vo.TpTicketVO;
15 17
 import org.springframework.beans.BeanUtils;
16 18
 import org.springframework.beans.factory.annotation.Autowired;
17 19
 import org.springframework.stereotype.Service;
20
+import org.springframework.transaction.annotation.Transactional;
18 21
 
22
+import java.io.IOException;
19 23
 import java.time.LocalDateTime;
20
-import java.util.ArrayList;
21
-import java.util.HashMap;
22
-import java.util.List;
24
+import java.time.ZoneId;
25
+import java.util.*;
23 26
 
24 27
 /**
25 28
  * <p>
@@ -47,9 +50,6 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
47 50
     @Autowired
48 51
     private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
49 52
 
50
-//    @Autowired
51
-//    private TaUserMapper taUserMapper;
52
-
53 53
     @Autowired
54 54
     private MessageMapper messageMapper;
55 55
 
@@ -114,9 +114,9 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
114 114
         /*查询当前受理人*/
115 115
         ticketVO.setTpUserNmae(userMapper.selectByIdUserName(ticketVO.getTpUserId()));
116 116
         /*所有物业端本小区的人员*/
117
-        ticketVO.setUserList(userMapper.getUser( userID,orgId));
117
+        ticketVO.setTpUsersList(userMapper.getUser( userID,orgId));
118 118
         /*本人*/
119
-        ticketVO.setCurrentUserName(userID);
119
+        ticketVO.setCurrentUserName(userID.toString());
120 120
 
121 121
 
122 122
         /*查询工单类容的图片*/
@@ -426,4 +426,538 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
426 426
         response.addSuccess("成功");
427 427
         return response;
428 428
     }
429
+
430
+
431
+    @Override
432
+    public ResponseBean getList(TpTicket tpTicket, Integer pageNum, Integer pageSize) {
433
+
434
+        ResponseBean<Map<String, Object>> responseBean = new ResponseBean();
435
+        // 最终返回值
436
+        Map<String, Object> result = Maps.newHashMap();
437
+
438
+        Map<String, Object> parameter = Maps.newHashMap();
439
+        parameter.put("communityId", tpTicket.getOrgId());
440
+        parameter.put("taUserId", tpTicket.getTaUserId());
441
+
442
+        //  1:投诉   2:报修 3:联系物业
443
+        parameter.put("type", 2);
444
+        // 报修
445
+        Page<TpTicket> pageRepairs = new Page(pageNum, pageSize);
446
+        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageRepairs, parameter);
447
+        List<TpTicket> tpTicketRepairsList = tpTicketIPage.getRecords();
448
+        List<TpTicketVO> repairsList = Lists.newArrayList();
449
+        tpTicketVOConvert(tpTicketRepairsList, repairsList);
450
+
451
+        // 投诉
452
+        //  1:投诉   2:报修 3:联系物业
453
+        parameter.put("type", 1);
454
+        Page<TpTicket> pageComplaint = new Page(pageNum, pageSize);
455
+        IPage<TpTicket> tpTicketIPageComplaint = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageComplaint, parameter);
456
+        List<TpTicket> tpTicketComplaintList = tpTicketIPageComplaint.getRecords();
457
+        List<TpTicketVO> complaintList = Lists.newArrayList();
458
+        tpTicketVOConvert(tpTicketComplaintList, complaintList);
459
+
460
+        // 联系工单
461
+        //  1:投诉   2:报修 3:联系物业
462
+        parameter.put("type", 3);
463
+        Page<TpTicket> pageLiaison = new Page(pageNum, pageSize);
464
+        IPage<TpTicket> tpTicketIPageLiaison = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pageLiaison, parameter);
465
+        List<TpTicket> tpTicketLiaisonList = tpTicketIPageLiaison.getRecords();
466
+        List<TpTicketVO> liaisonList = Lists.newArrayList();
467
+        tpTicketVOConvert(tpTicketLiaisonList, liaisonList);
468
+        Long[] arr = new Long[]{pageComplaint.getTotal(), pageLiaison.getTotal(), pageRepairs.getTotal()};
469
+        Arrays.sort(arr);
470
+        result.put("repairs", repairsList);
471
+        result.put("complaint", complaintList);
472
+        result.put("liaison", liaisonList);
473
+        result.put("total", arr[2]);
474
+
475
+        responseBean.addSuccess(result);
476
+        return responseBean;
477
+    }
478
+
479
+    /**
480
+     * 公共方法, 获取一条数据
481
+     *
482
+     * @param map
483
+     * @return
484
+     */
485
+    private TpTicketRecordComment getTicketRecordComment(Map map) {
486
+        List<TpTicketRecordComment> list = tpTicketRecordCommentMapper.selectByTicketId(map);
487
+        return null == list
488
+                ? null : list.size() == 0
489
+                ? null : list.get(0);
490
+    }
491
+
492
+    /**
493
+     * 数据转换,并填充数据
494
+     *
495
+     * @param target
496
+     * @param source
497
+     * @return
498
+     */
499
+    public void tpTicketVOConvert(List<TpTicket> source, List<TpTicketVO> target) {
500
+
501
+        // 获取联系号码簿(物业号码)
502
+        // List<TpannouncementTel> tpannouncementTel = tpannouncementTelMapper.getTpannouncementTel();
503
+
504
+        // 查询参数
505
+        Map<String, Object> lastRecordMap = Maps.newHashMap();
506
+        // 表示查询出最新的一条
507
+        lastRecordMap.put("size", 1);
508
+
509
+        source.stream().forEach(e -> {
510
+            TpTicketVO tpTicketVO = new TpTicketVO();
511
+            BeanUtils.copyProperties(e, tpTicketVO);
512
+            // 设置工单编号
513
+            lastRecordMap.put("tickerId", e.getId());
514
+            TpTicketRecordComment comment = getTicketRecordComment(lastRecordMap);
515
+            List<TpTicketRecord> recordList = tpTicketRecordMapper.getTicketRecordByTicketId(e.getOrgId() + "", e.getId());
516
+            // 报修类型:0:公共区域  1: 房屋质量  2::户内设施  PS : 报修的情况下才有报修类型
517
+            String repairType = e.getRepairType();
518
+            String repairName = repairType == null ?
519
+                    null : "0".equals(repairType) ?
520
+                    "公共区域" : "1".equals(repairType) ?
521
+                    "房屋质量" : "2".equals(repairType) ?
522
+                    "户内设施" : null;
523
+            tpTicketVO.setRepairName(repairName);
524
+            tpTicketVO.setStatus(recordList.get(recordList.size() - 1).getStatus());
525
+            tpTicketVO.setTicketStatusName(recordList.get(recordList.size() - 1).getTicketStatusName());
526
+            tpTicketVO.setTicketRecordDate(Date.from(recordList.get(recordList.size() - 1).getCreateDate().atZone(ZoneId.systemDefault()).toInstant()));
527
+            tpTicketVO.setTicketStatusContent(recordList.get(recordList.size() - 1).getContent());
528
+            if (null != comment) {
529
+                tpTicketVO.setCommentContent(comment.getContent());
530
+                tpTicketVO.setCommentCreateDate(Date.from(comment.getCreateDate().atZone(ZoneId.systemDefault()).toInstant()));
531
+            }
532
+
533
+//            // 0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:被终止
534
+//
535
+//            // 0:待分配  需要出现物业号码簿
536
+//            if ("0".equals(e.getStatus())) {
537
+//                Map<String, Object> map = Maps.newHashMap();
538
+//                map.put("message","联系物业号码簿");
539
+//                map.put("data",tpannouncementTel);
540
+//                tpTicketVO.setContactBook(map);
541
+//            }
542
+
543
+            target.add(tpTicketVO);
544
+        });
545
+    }
546
+
547
+    @Override
548
+    public ResponseBean getByTypeList(TpTicket tpTicket, Integer pageNum, Integer pageSize) {
549
+
550
+        ResponseBean response = new ResponseBean();
551
+
552
+        Map<String, Object> parameter = Maps.newHashMap();
553
+        parameter.put("communityId", tpTicket.getOrgId());
554
+        parameter.put("taUserId", tpTicket.getTaUserId());
555
+
556
+        //  1:投诉   2:报修 3:联系物业
557
+        parameter.put("type", tpTicket.getType());
558
+
559
+        Page<TpTicket> pagelist = new Page<>(pageNum, pageSize);
560
+        IPage<TpTicket> tpTicketIPage = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(pagelist, parameter);
561
+        List<TpTicket> tpTicketList = tpTicketIPage.getRecords();
562
+
563
+        List<TpTicketVO> tpTicketVOList = Lists.newArrayList();
564
+        tpTicketVOConvert(tpTicketList, tpTicketVOList);
565
+        Map<String, Object> map = Maps.newHashMap();
566
+        map.put("pagelist", tpTicketVOList);
567
+        map.put("total", pagelist.getTotal());
568
+
569
+        response.addSuccess(map);
570
+
571
+        return response;
572
+    }
573
+
574
+    /**
575
+     * 获取报修详情
576
+     *
577
+     * @param orgId
578
+     * @param ticketId
579
+     * @return
580
+     */
581
+    @Override
582
+    @Transactional(rollbackFor = Exception.class)
583
+    public TpTicket getTicketSchedule(String orgId, Integer ticketId) {
584
+        //查看工单详情
585
+        TpTicket ticket = tpTicketMapper.selectById(ticketId);
586
+        if (null != ticket) {
587
+            //工单进度
588
+            List<TpTicketRecord> ticketRecordList = tpTicketRecordMapper.getTicketRecordByTicketId(orgId, ticketId);
589
+            //工单回复
590
+            ticketRecordList.stream().forEach(tpTicketRecord -> {
591
+                List<TpTicketRecordComment> ticketRecordCommentList = tpTicketRecordCommentMapper.selectByTicketRecordId(tpTicketRecord);
592
+                //遍历工单下每条对话信息的id去查对话图片
593
+                for (TpTicketRecordComment tpTicketRecordComment : ticketRecordCommentList) {
594
+                    Map<String, Object> map = Maps.newHashMap();
595
+                    map.put("uuid", tpTicketRecordComment.getId());
596
+                    map.put("type", "reply");
597
+                    List<TdImages> tdImagesList = tdImagesMapper.getByUUIDAndByType(map);
598
+                    tpTicketRecordComment.setImgURL(tdImagesList);
599
+                }
600
+                tpTicketRecord.setTicketRecordCommentList(ticketRecordCommentList);
601
+            });
602
+
603
+            Map<String, Object> map = Maps.newHashMap();
604
+            map.put("uuid", ticket.getId());
605
+            map.put("type", "service");
606
+            List<TdImages> tdImagesList = tdImagesMapper.getByUUIDAndByType(map);
607
+
608
+            // 图片数组
609
+            String[] imgageArr = new String[tdImagesList.size()];
610
+
611
+            for (int i = 0; i < tdImagesList.size(); i++) {
612
+                imgageArr[i] = tdImagesList.get(i).getImageUrl();
613
+            }
614
+
615
+            ticket.setTdImagesList(imgageArr);
616
+            ticket.setTicketRecordList(ticketRecordList);
617
+
618
+//            // 把该工单的消息变为 已读
619
+//            TpMessage tpMessage = new TpMessage();
620
+//            tpMessage.setSource("1");
621
+//            tpMessage.setModelType("1");
622
+//            tpMessage.setMessageType(ticket.getType());
623
+//
624
+//            tpMessage = tpMessageMapper.selectTicketMessage(tpMessage);
625
+//            tpMessage.setReadStatus("1");
626
+//
627
+//            //  变为已读
628
+//            tpMessageMapper.updateByPrimaryKeySelective(tpMessage);
629
+
630
+        }
631
+        return ticket;
632
+    }
633
+
634
+    @Override
635
+    @Transactional(rollbackFor = Exception.class)
636
+    public ResponseBean addAiTicketService(TaUser userElement, String parameter) throws IOException {
637
+        ResponseBean response = new ResponseBean();
638
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
639
+        String imageUrl = (String) jsonObject.get("imageUrl");
640
+
641
+
642
+        TpTicket tpTicket = JSONObject.parseObject(parameter, TpTicket.class);
643
+
644
+        /**
645
+         * 工单表 -> 工单处理表 -> 消息表
646
+         * 依次插入相关数据, 该工单默认的第一条数据(待分配), 是工单标题,
647
+         */
648
+
649
+        tpTicket.setOrgId(userElement.getOrgId());
650
+        // 2.1以后为ta_user_verify为中心不再是已用户ta_user为中心
651
+        tpTicket.setTaUserId(userElement.getUserId());
652
+        // 默认待分配
653
+        tpTicket.setStatus("0");
654
+        // 2.1以后为ta_user_verify为中心不再是已用户ta_user为中心
655
+        tpTicket.setCreateUser(userElement.getUserId());
656
+        tpTicket.setCreateDate(LocalDateTime.now());
657
+        tpTicket.setUpdateUser(userElement.getUserId());
658
+        //tpTicket.setUpdateDate(new Date());
659
+        //校验此工单是否已存在
660
+        TpTicket tpTicketName= tpTicketMapper.selectTpTicketName(userElement.getOrgId(),tpTicket.getType(),tpTicket.getTicketTitle());
661
+        if (null != tpTicketName){
662
+            response.addError("工单已存在");
663
+            return  response;
664
+        }
665
+        // 插入工单
666
+        tpTicketMapper.insert(tpTicket);
667
+        insertTdImage(tpTicket, imageUrl, userElement.getUserId());
668
+
669
+        Integer id = tpTicket.getId();
670
+        TpTicketRecord tpTicketRecord = new TpTicketRecord();
671
+        //获取当前插入的信息,维护工单记录表
672
+        TpTicket tpTicketReco = tpTicketMapper.selectById(id);
673
+        tpTicketRecord.setOrgId(userElement.getOrgId());
674
+        tpTicketRecord.setTicketId(tpTicketReco.getId());
675
+        // 1:投诉   2:报修 3:联系物业
676
+        String typeName = "2".equals(tpTicket.getType()) ? "报修" : "1".equals(tpTicket.getType()) ? "投诉" : "3".equals(tpTicket.getType()) ? "联系工单" : "未知类型";
677
+        tpTicketRecord.setContent("您的" + typeName + "正在分配物业处理人员, 若长时间无人处理, 请联系物业! 联系物业号码簿 >");
678
+        tpTicketRecord.setStatus(tpTicketReco.getStatus());
679
+        tpTicketRecord.setCreateUser(userElement.getUserId());
680
+        tpTicketRecord.setCreateDate(LocalDateTime.now());
681
+        // 插入工单处理表
682
+        tpTicketRecordMapper.insert(tpTicketRecord);
683
+        // 推物业端,推这个小区下的所有管理员
684
+//        List<TpUser> tpUserList= tpUserMapper.selectCommunityId(userElement.getOrgId());
685
+//        for (TpUser tpUser:tpUserList) {
686
+//            Map<String, Object> mapProp = new HashMap<>();
687
+//            mapProp.put("communityId", userElement.getOrgId());
688
+//            mapProp.put("createUserId", userElement.getUserVerifyId());
689
+//            mapProp.put("ticketId", tpTicket.getId());
690
+//            mapProp.put("title", tpTicket.getTicketTitle());
691
+//            mapProp.put("name", userElement.getUserName());
692
+//            mapProp.put("tpUserId", tpUser.getId());
693
+//            applicationContext.publishEvent(new MessageEvent(mapProp, Constant.TICKET_ADD, mapProp));
694
+//        }
695
+
696
+
697
+        response.addSuccess(tpTicketReco);
698
+        return response;
699
+    }
700
+
701
+    /**
702
+     * 存入图片
703
+     *
704
+     * @param tpTicket
705
+     * @param imageUrl
706
+     * @param userId
707
+     * @throws IOException
708
+     */
709
+    private void insertTdImage(TpTicket tpTicket, String imageUrl, Integer userId) {
710
+        if (null == imageUrl || "".equals(imageUrl)) {
711
+            return;
712
+        }
713
+        String[] imgArr = imageUrl.split(",");
714
+        for (String img : imgArr) {
715
+            TdImages tdImages = new TdImages();
716
+            Integer uuId = tpTicket.getId();
717
+            tdImages.setImageUrl(img);
718
+            tdImages.setType(Constant.SERVICE);
719
+            tdImages.setUuid(uuId);
720
+            tdImages.setCreateUser(userId);
721
+            tdImages.setCreateTime(LocalDateTime.now());
722
+            tdImagesMapper.insert(tdImages);
723
+        }
724
+
725
+    }
726
+
727
+
728
+    /**
729
+     * 回复工单
730
+     *
731
+     * @param tpTicketRecordComment
732
+     * @return
733
+     */
734
+    @Override
735
+    public Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment, Integer userId) {
736
+        //查询用户名
737
+        User taUser = userMapper.selectById(userId);
738
+
739
+        TpTicket  tpTicket= tpTicketMapper.selectById(tpTicketRecordComment.getTicketId());
740
+        TpTicketRecord ticketRecord= tpTicketRecordMapper.selectTpTicketRecord(tpTicketRecordComment.getTicketId(), Integer.valueOf(tpTicket.getStatus()));
741
+
742
+        tpTicketRecordComment.setUserName(taUser.getUserName());
743
+        tpTicketRecordComment.setParentId(tpTicketRecordComment.getId());
744
+        tpTicketRecordComment.setUuid(userId);
745
+        tpTicketRecordComment.setTicketRecordId(ticketRecord.getId());
746
+        tpTicketRecordComment.setUserType(Constant.TICKET_USER_TYPE);
747
+        tpTicketRecordComment.setCreateDate(LocalDateTime.now());
748
+        //插入回复数据
749
+        return tpTicketRecordCommentMapper.insert(tpTicketRecordComment);
750
+
751
+    }
752
+
753
+    @Override
754
+    @Transactional(rollbackFor = Exception.class)
755
+    public ResponseBean updateTicketContent(Integer ticketId, String parameter, TaUser userElement) {
756
+        ResponseBean responseBean = new ResponseBean();
757
+
758
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
759
+        String imageUrl = (String) jsonObject.get("imageUrl");
760
+
761
+
762
+        TpTicket tpTicket = JSONObject.parseObject(parameter, TpTicket.class);
763
+
764
+        // 删除旧图片链接
765
+        Map<String, Object> map = Maps.newHashMap();
766
+        map.put("uuid", ticketId);
767
+        map.put("type", "service");
768
+        tdImagesMapper.deleteByUuidAndType(map);
769
+
770
+        insertTdImage(tpTicket, imageUrl, userElement.getUserId());
771
+
772
+        TpTicket ticket = tpTicketMapper.selectById(ticketId);
773
+        ticket.setTicketTitle(tpTicket.getTicketTitle());
774
+        ticket.setTicketContent(tpTicket.getTicketContent());
775
+
776
+        tpTicketMapper.updateById(ticket);
777
+        // 维护1.5版本消息
778
+//        Integer messageTicket= tpMessageMapper.selectTicket(ticketId);
779
+//        if (!"".equals(messageTicket)) {
780
+//            TpMessage tpMessage = new TpMessage();
781
+//            tpMessage.setMessageContent("工单“" + tpTicket.getTicketTitle() + "”已被分配给您,点击查看并处理");
782
+//            tpMessage.setUpdateDate(new Date());
783
+//            tpMessage.setUpdateUser(userElement.getUserVerifyId());
784
+//            tpMessageMapper.updateTickMessage(tpMessage);
785
+//        }
786
+        // 修改消息以后推送物业端
787
+        // 推物业端,推这个小区下的所有管理员
788
+//        List<TpUser> tpUserList= tpUserMapper.selectCommunityId(ticket.getOrgId());
789
+//        for (TpUser tpUser:tpUserList) {
790
+//            Map<String, Object> mapProp = new HashMap<>();
791
+//            mapProp.put("communityId", ticket.getOrgId());
792
+//            mapProp.put("createUserId", userElement.getUserVerifyId());
793
+//            mapProp.put("ticketId", ticketId);
794
+//            mapProp.put("title", tpTicket.getTicketTitle());
795
+//            mapProp.put("name", userElement.getUserName());
796
+//            mapProp.put("tpUserId", tpUser.getId());
797
+//            applicationContext.publishEvent(new MessageEvent(mapProp, Constant.TICKET_UPDATE, mapProp));
798
+//        }
799
+        responseBean.addSuccess("操作成功!");
800
+        return responseBean;
801
+    }
802
+
803
+    @Transactional(rollbackFor = Exception.class)
804
+    @Override
805
+    public ResponseBean stopTpTicketRecord(Integer orgId, Integer ticketId, TaUser userElement) {
806
+        ResponseBean responseBean = new ResponseBean();
807
+        try {
808
+            TpTicket tpTicket = new TpTicket();
809
+            tpTicket.setStatus("6");
810
+            tpTicket.setId(ticketId);
811
+            tpTicketMapper.updateById(tpTicket);
812
+            //根据1.4版本需要被终止时,清空当前工单受理人
813
+            tpTicketMapper.updateTpUserId(ticketId);
814
+
815
+            TpTicketRecord tpTicketRecord = new TpTicketRecord();
816
+            tpTicketRecord.setStatus("6");
817
+            tpTicketRecord.setTicketId(ticketId);
818
+            tpTicketRecord.setOrgId(orgId);
819
+
820
+            tpTicketRecord.setContent("您的联系单已被您自己终止,如果仍有问题,可以在服务页新增一个报修/投诉/联系单");
821
+            tpTicketRecord.setCreateUser(userElement.getUserId());
822
+            tpTicketRecord.setCreateDate(LocalDateTime.now());
823
+            tpTicketRecordMapper.insert(tpTicketRecord);
824
+            // 终止后维护tp_ticket_record_comment对话
825
+            Integer createUser= tpTicketMapper.selectById(ticketId).getCreateUser();
826
+            TaUserVerify taUserVerify= taUserVerifyMapper.selectById(createUser);
827
+
828
+            User taUser= userMapper.selectById(taUserVerify.getUserId());
829
+            TpTicketRecordComment tpTicketRecordComment = new TpTicketRecordComment();
830
+            tpTicketRecordComment.setOrgId(orgId);
831
+            tpTicketRecordComment.setTicketId(ticketId);
832
+            tpTicketRecordComment.setTicketRecordId(tpTicketRecord.getId());
833
+            tpTicketRecordComment.setUuid(userElement.getUserId());
834
+            tpTicketRecordComment.setUuid(taUserVerify.getId());
835
+            tpTicketRecordComment.setUserName(taUser.getUserName());
836
+            tpTicketRecordComment.setContent("业主终止工单,原因——无");
837
+            tpTicketRecordComment.setCreateDate(LocalDateTime.now());
838
+            tpTicketRecordCommentMapper.insert(tpTicketRecordComment);
839
+
840
+            TpTicket ticket= tpTicketMapper.selectById(ticketId);
841
+            // 推物业端,推这个小区下的所有管理员
842
+//            List<TpUser> tpUserList= tpUserMapper.selectCommunityId(communityId);
843
+//            for (TpUser tpUser:tpUserList) {
844
+//                Map<String, Object> mapProp = new HashMap<>();
845
+//                mapProp.put("communityId", communityId);
846
+//                mapProp.put("createUserId", userElement.getUserVerifyId());
847
+//                mapProp.put("title", ticket.getTicketTitle());
848
+//                mapProp.put("name", userElement.getUserName());
849
+//                mapProp.put("ticketId", ticketId);
850
+//                mapProp.put("tpUserId", tpUser.getId());
851
+//                applicationContext.publishEvent(new MessageEvent(mapProp, Constant.TICKET_TERMINATION, mapProp));
852
+//            }
853
+            return responseBean;
854
+        } catch (Exception e) {
855
+            e.printStackTrace();
856
+            responseBean.addError("服务器异常");
857
+            return responseBean;
858
+        }
859
+    }
860
+
861
+    /**
862
+     * 公共方法
863
+     * 把工单插入消息表
864
+     *
865
+     * @param tpTicket 工单
866
+     * @param userId   用户id
867
+     */
868
+    private Message insertTicketMessage(TpTicket tpTicket, Integer userId) {
869
+
870
+        Message tpMessage = new Message();
871
+        tpMessage.setOrgId(tpTicket.getOrgId());
872
+        // 消息类型  1:投诉   2:报修 3:联系物业  4: 访客  5:公告  6:系统通知  7:账单 8:活动
873
+        tpMessage.setMessageType(tpTicket.getType());
874
+        // 通知方式: APP 内通知
875
+        tpMessage.setAdviceType("1");
876
+        // 模板类型为 消息模板
877
+        tpMessage.setModelType("1");
878
+        tpMessage.setUuid(userId);
879
+        // 接收人类型: APP用户
880
+        tpMessage.setUuidType("1");
881
+        // 来源: APP 端用户
882
+        tpMessage.setSource("1");
883
+        // 这里的消息内容对应, 工单标题
884
+        tpMessage.setMessageContent(tpTicket.getTicketTitle());
885
+        tpMessage.setStatus("1");
886
+        // 阅读状态: 0未阅读
887
+        tpMessage.setReadStatus("0");
888
+        tpMessage.setCreateUser(userId);
889
+        tpMessage.setCreateDate(LocalDateTime.now());
890
+        tpMessage.setUpdateUser(userId);
891
+        tpMessage.setUpdateDate(LocalDateTime.now());
892
+
893
+        messageMapper.insert(tpMessage);
894
+
895
+        return tpMessage;
896
+
897
+    }
898
+    @Override
899
+    public ResponseBean addWxRecordComment(String parameter, Integer verifyId,Integer communityId,String userName) {
900
+        ResponseBean response=new ResponseBean();
901
+        JSONObject object= JSONObject.parseObject(parameter);
902
+
903
+        String  content = object.getString("content");
904
+        Integer  ticketId = object.getInteger("ticketId");
905
+
906
+        /*根据工单Id和状态查出工单记录ID*/
907
+        TpTicket  tpTicket= tpTicketMapper.selectById(ticketId);
908
+        TpTicketRecord ticketRecord= tpTicketRecordMapper.selectTpTicketRecord(ticketId, Integer.valueOf(tpTicket.getStatus()));
909
+        TpTicketRecordComment tpTicketRecordComment= new TpTicketRecordComment();
910
+        tpTicketRecordComment.setOrgId(communityId);
911
+        tpTicketRecordComment.setContent(content);
912
+        tpTicketRecordComment.setTicketId(ticketId);
913
+        tpTicketRecordComment.setTicketRecordId(ticketRecord.getId());
914
+        tpTicketRecordComment.setUuid(verifyId);
915
+        tpTicketRecordComment.setUserType("1");
916
+        tpTicketRecordComment.setUserName(userName);
917
+        tpTicketRecordComment.setCreateDate(LocalDateTime.now());
918
+        tpTicketRecordCommentMapper.insert(tpTicketRecordComment);
919
+        JSONArray contentImg = object.getJSONArray("imageUrl");
920
+        if (null!=contentImg){
921
+            String[] contentImgArray = contentImg.toArray(new String[]{});
922
+
923
+            for (String img : contentImgArray) {
924
+                TdImages tdImages = new TdImages();
925
+                tdImages.setImageUrl(img);
926
+                /*注意reply用于标记工单回复类的图片*/
927
+                tdImages.setType("reply");
928
+                tdImages.setUuid(tpTicketRecordComment.getId());
929
+                tdImages.setCreateTime(LocalDateTime.now());
930
+                tdImages.setCreateUser(verifyId);
931
+                tdImagesMapper.insert(tdImages);
932
+            }
933
+        }
934
+        //1.5版本推送消息message
935
+        //工单消息回复最最后一个物业人员
936
+
937
+        Message message = new Message();
938
+        message.setOrgId(communityId);
939
+        message.setModelType("1");
940
+        message.setMessageType(tpTicket.getType());
941
+        message.setAdviceType("4");
942
+        //查询当前工单处理
943
+//        TpTicket ticket= tpTicketMapper.getTicketTpUserId(ticketId,communityId);
944
+//        //考虑到工单没有分配,物业人员没有追问,只能塞本小区超级管理员ID
945
+//        TpTicketRecordComment recordComment= tpTicketRecordCommentMapper.getUuID(communityId,ticketId);
946
+//        Integer uuserID= toCommunitiesMapper.selectAndmin(communityId);
947
+//        // 查询工单创建人名称
948
+//        TaUserVerify taUserVerify = taUserVerifyMapper.selectByPrimaryKey(ticket.getCreateUser());
949
+//        TaUser taUser = taUserMapper.selectByPrimaryKey(taUserVerify.getUserId());
950
+        // app推送物业端的消息
951
+//        Map<String,Object> mapPorp = new HashMap<>();
952
+//        mapPorp.put("communityId",communityId);
953
+//        mapPorp.put("createUserId",tpTicket.getCreateUser());
954
+//        mapPorp.put("uuId",recordComment==null?uuserID:recordComment.getUuid());
955
+//        mapPorp.put("ticketId",ticketId);
956
+//        mapPorp.put("replyCount","业主"+taUser.getUserName()+"回复了工单“"+ticket.getTicketTitle()+"”,请处理");
957
+//        mapPorp.put("uuidType",Constant.UUID_TYPE_PROP);
958
+//        mapPorp.put("source",Constant.SOURCE_APP);
959
+//        applicationContext.publishEvent(new MessageEvent(tpTicket, Constant.TICKET_REPLY_PROP,mapPorp));
960
+        response.addSuccess("成功");
961
+        return response;
962
+    }
429 963
 }

+ 49
- 22
src/main/java/com/huiju/estateagents/property/vo/TpTicketVO.java Voir le fichier

@@ -6,7 +6,10 @@ import com.huiju.estateagents.property.model.TpTicketRecordComment;
6 6
 import com.huiju.estateagents.property.model.User;
7 7
 import lombok.Data;
8 8
 
9
+import java.time.LocalDateTime;
10
+import java.util.Date;
9 11
 import java.util.List;
12
+import java.util.Map;
10 13
 
11 14
 /**
12 15
  * version V1.0
@@ -18,53 +21,77 @@ import java.util.List;
18 21
  **/
19 22
 @Data
20 23
 public class TpTicketVO extends TpTicket {
21
-    /**
22
-     * 发起人
23
-     */
24
-    private String createUserNmae;
24
+
25
+    /** 小区编号 **/
26
+    private Integer communityId;
27
+
25 28
 
26 29
     /**
27
-     * 受理人
30
+     * 报修类型的名字
28 31
      */
29
-    private String tpUserNmae;
32
+    private String repairName;
33
+
34
+    /** ====================================== **/
35
+
36
+
37
+    /** 流程状态名称 **/
38
+    private String ticketStatusName;
39
+
40
+    /** 流程状态内容 **/
41
+    private String ticketStatusContent;
42
+
43
+    /** 流程状态时间 **/
44
+    private Date ticketRecordDate;
45
+
46
+    /** 最新进展 **/
47
+    private String commentContent;
48
+
49
+    /** 最新进展的时间 **/
50
+    private Date commentCreateDate;
51
+
52
+    /** 联系物业号码簿 **/
53
+    private Map<String,Object> contactBook;
54
+
55
+    /**投诉流程状态**/
56
+    private String statusList;
30 57
 
31 58
     /**
32
-     *工单内容下的图片
59
+     * 工单发起人
33 60
      */
34
-    private  List<String> contentImageUrl;
61
+    private String createUserNmae;
35 62
 
36 63
     /**
37
-     * 工单流程状态
64
+     * 发起人手机号码
38 65
      */
39
-    private List<TpTicketRecord> recordList;
66
+    private String loginName;
40 67
 
41 68
     /**
42
-     * 工单对话图片
69
+     * 当前受理人
43 70
      */
44
-    private  List<String> ticketRecordCommentImagesUrl;
71
+    private String tpUserNmae;
45 72
 
46 73
     /**
47
-     * 工单对话记录
74
+     * 物业端所有小区人员
48 75
      */
49
-    private List<TpTicketRecordComment> tpTicketRecordCommentList;
76
+    private List<User> tpUsersList;
50 77
 
51 78
     /**
52
-     * 发起人手机号码
79
+     * 本人
53 80
      */
54
-    private  String loginName;
81
+    private  String currentUserName;
55 82
 
56 83
     /**
57
-     * 所有当前小区的物业人员
84
+     * 工单内容图片
58 85
      */
59
-    private List<User> userList;
86
+    private  List<String> contentImageUrl;
60 87
 
61 88
     /**
62
-     * 当前人
89
+     * 工单流程
63 90
      */
64
-    private Integer CurrentUserName;
91
+    private List<TpTicketRecord> recordList;
65 92
 
66 93
     /**
67
-     * 工单状态集合
94
+     * 工单创建人房产
68 95
      */
69
-    private List<Integer> statusList;
96
+    private  String houseProperty;
70 97
 }

+ 1
- 3
src/main/java/com/huiju/estateagents/service/impl/TaNewsServiceImpl.java Voir le fichier

@@ -59,9 +59,7 @@ public class TaNewsServiceImpl extends ServiceImpl<TaNewsMapper, TaNews> impleme
59 59
     public ResponseBean getList(Integer pageNum, Integer pageSize, String buildingId, Integer orgId, Integer newsTypeId, Integer newsStatus,String title, Integer cityId,List<TaPersonBuilding> personBuildingList) {
60 60
         ResponseBean responseBean = new ResponseBean();
61 61
 
62
-        IPage<TaNews> page = new Page<>();
63
-        page.setCurrent(pageNum);
64
-        page.setSize(pageSize);
62
+        IPage<TaNews> page = new Page<>(pageNum,pageSize);
65 63
 
66 64
         QueryWrapper<TaNews> taNewsQueryWrapper = new QueryWrapper<>();
67 65
         taNewsQueryWrapper.eq(!StringUtils.isEmpty(buildingId),"building_id", buildingId);

+ 12
- 0
src/main/resources/mapper/property/TdImagesMapper.xml Voir le fichier

@@ -2,4 +2,16 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.huiju.estateagents.property.dao.TdImagesMapper">
4 4
 
5
+    <select id="getByUUIDAndByType" parameterType="map" resultType="com.huiju.estateagents.property.model.TdImages">
6
+        select
7
+         *
8
+        from td_images
9
+        where uuid = #{uuid,jdbcType=INTEGER} and type = #{type,jdbcType=CHAR}
10
+        order by create_time DESC
11
+    </select>
12
+
13
+    <delete id="deleteByUuidAndType" parameterType="map" >
14
+    delete from td_images
15
+    where uuid = #{uuid,jdbcType=INTEGER} and type = #{type,jdbcType=CHAR}
16
+  </delete>
5 17
 </mapper>

+ 26
- 0
src/main/resources/mapper/property/TpAnnouncementMapper.xml Voir le fichier

@@ -75,4 +75,30 @@
75 75
     </set>
76 76
     where id = #{id,jdbcType=INTEGER}
77 77
   </update>
78
+
79
+
80
+  <select id="getWxAnnouncements" resultType="com.huiju.estateagents.property.model.TpAnnouncement">
81
+    SELECT
82
+    a.id,
83
+    a.announcement_title,
84
+    a.announcement_content,
85
+    a.create_date,
86
+    u.user_name as user_name,
87
+    a.sort,
88
+    a.view_count
89
+    FROM
90
+    tp_announcement a
91
+    LEFT JOIN tp_user u ON a.create_user = u.id
92
+    AND u.community_id = #{communityId,jdbcType=INTEGER}
93
+    WHERE
94
+    a.community_id = #{communityId,jdbcType=INTEGER}
95
+    AND ( a.STATUS = 1 OR a.STATUS = 3 )
96
+    <if test="title != null and title != ''">
97
+      and a.announcement_title like concat('%',#{title,jdbcType=VARCHAR},'%')
98
+    </if>
99
+    ORDER BY
100
+    a.sort DESC,
101
+    a.update_date DESC,
102
+    a.create_date DESC
103
+  </select>
78 104
 </mapper>

+ 128
- 0
src/main/resources/mapper/property/TpSocialViewMapper.xml Voir le fichier

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

+ 34
- 0
src/main/resources/mapper/property/TpTicketMapper.xml Voir le fichier

@@ -68,4 +68,38 @@
68 68
         tp_ticket p
69 69
         WHERE p.id=#{id,jdbcType=INTEGER}
70 70
     </select>
71
+
72
+    <select id="selectByCommuniytIdAndByTaUserIdAndByType" parameterType="map" resultType="com.huiju.estateagents.property.model.TpTicket" >
73
+        select
74
+         *
75
+        from tp_ticket
76
+        <trim prefix="where" prefixOverrides="and">
77
+            <if test="communityId != null" >
78
+                and community_id = #{communityId,jdbcType=INTEGER}
79
+            </if>
80
+            <if test="taUserId != null" >
81
+                and ta_user_id = #{taUserId,jdbcType=INTEGER}
82
+            </if>
83
+            <if test="type != null" >
84
+                and type = #{type,jdbcType=CHAR}
85
+            </if>
86
+        </trim>
87
+        order by create_date DESC
88
+    </select>
89
+
90
+    <select id="selectTpTicketName" resultType="com.huiju.estateagents.property.model.TpTicket">
91
+    select
92
+    *
93
+    from tp_ticket
94
+    where community_id = #{communityId,jdbcType=INTEGER}
95
+     and ticket_title= #{ticketTitle,jdbcType=INTEGER}
96
+     and type = #{type,jdbcType=VARCHAR}
97
+  </select>
98
+
99
+    <update id="updateTpUserId" parameterType="int" >
100
+    update tp_ticket
101
+    set
102
+      tp_user_id =null
103
+    where id = #{ticketId,jdbcType=INTEGER}
104
+  </update>
71 105
 </mapper>

+ 17
- 0
src/main/resources/mapper/property/TpTicketRecordCommentMapper.xml Voir le fichier

@@ -2,4 +2,21 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.huiju.estateagents.property.dao.TpTicketRecordCommentMapper">
4 4
 
5
+    <select id="selectByTicketId" parameterType="map" resultType="com.huiju.estateagents.property.model.TpTicketRecordComment" >
6
+    select ttrc.* from tp_ticket tp
7
+                inner join tp_ticket_record ttr on tp.id = ttr.ticket_id
8
+                inner join tp_ticket_record_comment ttrc on ttr.id = ttrc.ticket_record_id
9
+    where tp.id=#{tickerId,jdbcType=INTEGER} order by ttrc.create_date DESC LIMIT #{size,jdbcType=INTEGER}
10
+  </select>
11
+
12
+    <select id="selectByTicketRecordId" parameterType="com.huiju.estateagents.property.model.TpTicketRecord" resultType="com.huiju.estateagents.property.model.TpTicketRecordComment" >
13
+        SELECT
14
+         *
15
+        FROM
16
+        tp_ticket_record_comment
17
+        WHERE
18
+        community_id = #{communityId,jdbcType=INTEGER}
19
+        AND ticket_id = #{ticketId,jdbcType=INTEGER}
20
+        AND ticket_record_id = #{id,jdbcType=INTEGER}
21
+    </select>
5 22
 </mapper>

+ 19
- 0
src/main/resources/mapper/property/TpTicketRecordMapper.xml Voir le fichier

@@ -39,4 +39,23 @@
39 39
         WHERE code= #{status,jdbcType=INTEGER}
40 40
           and group_id = 1
41 41
     </select>
42
+
43
+    <select id="getTicketRecordByTicketId" resultType="com.huiju.estateagents.property.model.TpTicketRecord">
44
+    SELECT
45
+        t.id,
46
+        t.status,
47
+        t.ticket_id AS ticketId,
48
+        t.community_id AS communityId,
49
+        t.content AS content,
50
+        t.create_date AS createDate,
51
+        d.NAME AS ticketStatusName
52
+    FROM
53
+        tp_ticket_record t
54
+        LEFT JOIN sys_dictionary d ON t.STATUS = d.CODE
55
+        AND d.group_id = ( SELECT id FROM sys_dictionary WHERE CODE = "ticket_status" )
56
+    WHERE
57
+        community_id = #{communityId,jdbcType=INTEGER}
58
+        AND ticket_id = #{ticketId,jdbcType=INTEGER}
59
+    order by t.status
60
+  </select>
42 61
 </mapper>