|
@@ -35,9 +35,9 @@ public class SocialController {
|
35
|
35
|
|
36
|
36
|
@RequestMapping(value = "/announcement/{communityId}", method = RequestMethod.GET)
|
37
|
37
|
@ApiOperation(value = "论坛公告帖子详情", notes = "获取论坛公告帖子详情")
|
38
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
|
38
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
39
|
39
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "id", value = "公告帖子id")})
|
40
|
|
- public ResponseBean findAnnouncementDetail(@PathVariable(value = "communityId")Integer communityId, @RequestParam("id") Integer id, HttpSession session){
|
|
40
|
+ public ResponseBean findAnnouncementDetail(@PathVariable(value = "communityId") Integer communityId, @RequestParam("id") Integer id, HttpSession session) {
|
41
|
41
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
42
|
42
|
Integer userId = userElement.getId();
|
43
|
43
|
ResponseBean responseBean = new ResponseBean();
|
|
@@ -48,63 +48,64 @@ public class SocialController {
|
48
|
48
|
|
49
|
49
|
@RequestMapping(value = "/sign/{communityId}", method = RequestMethod.GET)
|
50
|
50
|
@ApiOperation(value = "活动报名接口", notes = "活动报名接口")
|
51
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
52
|
|
- @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动Id")})
|
53
|
|
- public ResponseBean SignActivity(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId")Integer activityId, HttpSession session){
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
|
54
|
+ @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动Id")})
|
|
55
|
+ public ResponseBean SignActivity(@PathVariable(value = "communityId") Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session) {
|
54
|
56
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
55
|
57
|
Integer userId = userElement.getId();
|
56
|
58
|
ResponseBean responseBean = socialServiceI.findTaUserInfo(activityId, communityId, userId);
|
57
|
59
|
return responseBean;
|
58
|
60
|
}
|
59
|
|
-
|
|
61
|
+
|
60
|
62
|
@ApiOperation(value = "按小区获取分页公告列表", notes = "按小区获取分页公告列表,公告标题模糊查询")
|
61
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
|
|
63
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
|
62
|
64
|
@ApiImplicitParam(paramType = "query", dataType = "String", name = "title", value = "公告标题"),
|
63
|
65
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
|
64
|
66
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
|
65
|
|
- @RequestMapping(value = "/announcements/{communityId}",method = RequestMethod.GET)
|
66
|
|
- public ResponseBean getAnnouncements(@PathVariable Integer communityId,@RequestParam String title,
|
67
|
|
- @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
68
|
|
- @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
|
|
67
|
+ @RequestMapping(value = "/announcements/{communityId}", method = RequestMethod.GET)
|
|
68
|
+ public ResponseBean getAnnouncements(@PathVariable Integer communityId, @RequestParam String title,
|
|
69
|
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
70
|
+ @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
|
69
|
71
|
ResponseBean responseBean = new ResponseBean();
|
70
|
|
- List<TpAnnouncement> announcementList = socialServiceI.getAnnouncements(communityId,title,pageNum,pageSize);
|
|
72
|
+ List<TpAnnouncement> announcementList = socialServiceI.getAnnouncements(communityId, title, pageNum, pageSize);
|
71
|
73
|
responseBean.addSuccess(announcementList);
|
72
|
74
|
return responseBean;
|
73
|
75
|
}
|
74
|
76
|
|
75
|
77
|
@ApiOperation(value = "获取公告轮播图", notes = "获取公告轮播图")
|
76
|
78
|
@ApiImplicitParams({
|
77
|
|
- @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区id")
|
|
79
|
+ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区id")
|
78
|
80
|
})
|
79
|
|
- @RequestMapping(value = "/announcement/Img/{communityId}",method = RequestMethod.GET)
|
80
|
|
- public ResponseBean getAnnouncement(@PathVariable(value = "communityId")Integer communityId ){
|
|
81
|
+ @RequestMapping(value = "/announcement/Img/{communityId}", method = RequestMethod.GET)
|
|
82
|
+ public ResponseBean getAnnouncement(@PathVariable(value = "communityId") Integer communityId) {
|
81
|
83
|
ResponseBean responseBean = new ResponseBean();
|
82
|
84
|
List<TpAnnouncement> agreement = socialServiceI.getAnnouncement(communityId);
|
83
|
85
|
responseBean.addSuccess(agreement);
|
84
|
86
|
return responseBean;
|
85
|
87
|
}
|
86
|
88
|
|
87
|
|
-
|
|
89
|
+
|
88
|
90
|
@ApiOperation(value = "按小区获取分页活动列表", notes = "按小区获取分页活动列表,公告标题模糊查询")
|
89
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
|
|
91
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
|
90
|
92
|
@ApiImplicitParam(paramType = "query", dataType = "String", name = "title", value = "活动标题"),
|
91
|
93
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
|
92
|
94
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
|
93
|
|
- @RequestMapping(value = "/activitys/{communityId}",method = RequestMethod.GET)
|
94
|
|
- public ResponseBean getActivitys(@PathVariable Integer communityId,@RequestParam String title,
|
95
|
|
- @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
96
|
|
- @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
|
|
95
|
+ @RequestMapping(value = "/activitys/{communityId}", method = RequestMethod.GET)
|
|
96
|
+ public ResponseBean getActivitys(@PathVariable Integer communityId, @RequestParam String title,
|
|
97
|
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
98
|
+ @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
|
97
|
99
|
ResponseBean responseBean = new ResponseBean();
|
98
|
|
- List<TpActivity> activityList = socialServiceI.getActivitys(communityId,title,pageNum,pageSize);
|
|
100
|
+ List<TpActivity> activityList = socialServiceI.getActivitys(communityId, title, pageNum, pageSize);
|
99
|
101
|
responseBean.addSuccess(activityList);
|
100
|
102
|
return responseBean;
|
101
|
103
|
}
|
102
|
|
-
|
|
104
|
+
|
103
|
105
|
@ApiOperation(value = "论坛活动帖子详情", notes = "获取论坛活动帖子详情")
|
104
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
|
106
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
105
|
107
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动帖子id")})
|
106
|
|
- @RequestMapping(value = "/activity/{communityId}", method = RequestMethod.GET)
|
107
|
|
- public ResponseBean findActivityDetail(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session){
|
|
108
|
+ public ResponseBean findActivityDetail(@PathVariable(value = "communityId") Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session) {
|
108
|
109
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
109
|
110
|
Integer userId = userElement.getId();
|
110
|
111
|
ResponseBean responseBean = new ResponseBean();
|
|
@@ -114,27 +115,27 @@ public class SocialController {
|
114
|
115
|
}
|
115
|
116
|
|
116
|
117
|
@ApiOperation(value = "二手租赁详情", notes = "二手租赁详情")
|
117
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
|
118
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
118
|
119
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动帖子id")})
|
119
|
120
|
@RequestMapping(value = "/secondHand/{communityId}", method = RequestMethod.GET)
|
120
|
|
- public ResponseBean findUsedDetails(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session){
|
|
121
|
+ public ResponseBean findUsedDetails(@PathVariable(value = "communityId") Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session) {
|
121
|
122
|
ResponseBean responseBean = new ResponseBean();
|
122
|
123
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
123
|
124
|
Integer userId = userElement.getId();
|
124
|
|
- TpTransaction activity = socialServiceI.findUsedDetails(activityId, communityId,userId);
|
|
125
|
+ TpTransaction activity = socialServiceI.findUsedDetails(activityId, communityId, userId);
|
125
|
126
|
responseBean.addSuccess(activity);
|
126
|
127
|
return responseBean;
|
127
|
128
|
}
|
128
|
129
|
|
129
|
130
|
@ApiOperation(value = "获取所有的二手租赁帖子", notes = "获取所有的二手租赁帖子")
|
130
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
|
131
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
131
|
132
|
@ApiImplicitParam(paramType = "query", dataType = "String", name = "type", value = "帖子类型"),
|
132
|
133
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
|
133
|
134
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
|
134
|
135
|
@RequestMapping(value = "/getAllTransaction/{communityId}", method = RequestMethod.GET)
|
135
|
|
- public ResponseBean getAllPosts(@PathVariable("communityId")Integer communityId, @RequestParam("type") String type,
|
136
|
|
- @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
137
|
|
- @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
|
|
136
|
+ public ResponseBean getAllPosts(@PathVariable("communityId") Integer communityId, @RequestParam("type") String type,
|
|
137
|
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
138
|
+ @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
|
138
|
139
|
ResponseBean responseBean = new ResponseBean();
|
139
|
140
|
List<TpTransaction> tpTransactions = socialServiceI.findAllTransaction(communityId, type, pageNum, pageSize);
|
140
|
141
|
responseBean.addSuccess(tpTransactions);
|
|
@@ -142,10 +143,10 @@ public class SocialController {
|
142
|
143
|
}
|
143
|
144
|
|
144
|
145
|
@ApiOperation(value = "报修进度终止", notes = "报修进度终止")
|
145
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
|
146
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
146
|
147
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "帖子Id")})
|
147
|
148
|
@RequestMapping(value = "/stopTicket/{communityId}", method = RequestMethod.GET)
|
148
|
|
- public ResponseBean stopTicket(@PathVariable("communityId")Integer communityId, @RequestParam("ticketId")Integer ticketId, HttpSession session){
|
|
149
|
+ public ResponseBean stopTicket(@PathVariable("communityId") Integer communityId, @RequestParam("ticketId") Integer ticketId, HttpSession session) {
|
149
|
150
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
150
|
151
|
Integer userId = userElement.getId();
|
151
|
152
|
ResponseBean responseBean = socialServiceI.stopTpTicketRecord(communityId, ticketId, userId);
|
|
@@ -153,11 +154,11 @@ public class SocialController {
|
153
|
154
|
}
|
154
|
155
|
|
155
|
156
|
@ApiOperation(value = "修改报修内容", notes = "修改报修内容")
|
156
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "ticketId", value = "工单Id"),
|
157
|
|
- @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket"),
|
158
|
|
- @ApiImplicitParam(paramType = "query", dataType = "integer", name = "type", value = "工单类型")})
|
|
157
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "ticketId", value = "工单Id"),
|
|
158
|
+ @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType = "TpTicket"),
|
|
159
|
+ @ApiImplicitParam(paramType = "query", dataType = "integer", name = "type", value = "工单类型")})
|
159
|
160
|
@RequestMapping(value = "/updateTicket/{ticketId}", method = RequestMethod.POST)
|
160
|
|
- public ResponseBean updateTicketContent(@PathVariable("ticketId")Integer ticketId, @RequestBody TpTicket tpTicket, @RequestParam("type")String type){
|
|
161
|
+ public ResponseBean updateTicketContent(@PathVariable("ticketId") Integer ticketId, @RequestBody TpTicket tpTicket, @RequestParam("type") String type) {
|
161
|
162
|
ResponseBean responseBean = new ResponseBean();
|
162
|
163
|
socialServiceI.updateTicketContent(ticketId, tpTicket, type);
|
163
|
164
|
return responseBean;
|
|
@@ -165,16 +166,17 @@ public class SocialController {
|
165
|
166
|
|
166
|
167
|
@ApiOperation(value = "添加二手租赁帖子", notes = "添加二手租赁帖子")
|
167
|
168
|
@ApiImplicitParams({
|
168
|
|
- @ApiImplicitParam(paramType = "query",dataType = "String",name = "transactionTitle",value = "交易标题"),
|
169
|
|
- @ApiImplicitParam(paramType = "query",dataType = "String",name = "transactionContent",value = "交易内容"),
|
170
|
|
- @ApiImplicitParam(paramType = "query",dataType = "String",name = "type",value = "0:二手 1:求购 2:租赁"),
|
|
169
|
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "transactionTitle", value = "交易标题"),
|
|
170
|
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "transactionContent", value = "交易内容"),
|
|
171
|
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "type", value = "0:二手 1:求购 2:租赁"),
|
171
|
172
|
})
|
172
|
|
- @RequestMapping(value = "/addAllTransaction",method = RequestMethod.POST)
|
173
|
|
- public ResponseBean addTransaction(TpTransaction tpTransaction, HttpSession session){
|
|
173
|
+ @RequestMapping(value = "/addTransaction", method = RequestMethod.POST)
|
|
174
|
+ @ResponseBody
|
|
175
|
+ public ResponseBean addTransaction(TpTransaction tpTransaction, HttpSession session) {
|
174
|
176
|
ResponseBean responseBean = new ResponseBean();
|
175
|
177
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
176
|
178
|
Integer userId = userElement.getId();
|
177
|
|
- ResponseBean response=socialServiceI.addAllTransaction(userId,tpTransaction);
|
|
179
|
+ ResponseBean response = socialServiceI.addAllTransaction(userId, tpTransaction);
|
178
|
180
|
return response;
|
179
|
181
|
}
|
180
|
182
|
|
|
@@ -183,36 +185,42 @@ public class SocialController {
|
183
|
185
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
|
184
|
186
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")
|
185
|
187
|
})
|
186
|
|
- @RequestMapping(value = "/selectAllTransaction",method = RequestMethod.POST)
|
187
|
|
- public ResponseBean selectAllTransaction( HttpSession session,
|
188
|
|
- @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
189
|
|
- @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
|
|
188
|
+ @RequestMapping(value = "/selectAllTransaction", method = RequestMethod.GET)
|
|
189
|
+ public ResponseBean selectAllTransaction(HttpSession session,
|
|
190
|
+ @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
191
|
+ @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
|
190
|
192
|
ResponseBean responseBean = new ResponseBean();
|
191
|
193
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
192
|
|
- Integer userId=userElement.getId();
|
193
|
|
- ResponseBean response=socialServiceI.selectAllTransaction(userId,pageNum, pageSize);
|
|
194
|
+ Integer userId = userElement.getId();
|
|
195
|
+ ResponseBean response = socialServiceI.selectAllTransaction(userId, pageNum, pageSize);
|
194
|
196
|
return response;
|
195
|
197
|
}
|
196
|
198
|
|
197
|
199
|
@ApiOperation(value = "修改二手租赁帖子", notes = "修改二手租赁帖子")
|
198
|
200
|
@ApiImplicitParams({
|
199
|
|
- @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "二手租赁帖子Id")
|
|
201
|
+ @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "二手租赁帖子Id"),
|
|
202
|
+ @ApiImplicitParam(paramType = "query", dataType = "String", name = "transactionTitle", value = "小区标题"),
|
|
203
|
+ @ApiImplicitParam(paramType = "body", dataType = "String", name = "transactionContent", value = "交易内容"),
|
|
204
|
+ @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "Type", value = "0 代表,1求购,2租赁"),
|
200
|
205
|
})
|
201
|
|
- @RequestMapping(value = "/ubDateAllTransaction",method = RequestMethod.PUT)
|
202
|
|
- public ResponseBean ubdateTransaction( HttpSession session, TpTransaction tpTransaction) {
|
|
206
|
+ @RequestMapping(value = "/upDateTransaction/{Id}", method = RequestMethod.PUT)
|
|
207
|
+ public ResponseBean ubdateTransaction(HttpSession session, @PathVariable(value = "Id") Integer Id,
|
|
208
|
+ @RequestParam(value = "transactionTitle") String transactionTitle,
|
|
209
|
+ @RequestParam(value = "transactionContent") String transactionContent,
|
|
210
|
+ @RequestParam(value = "Type") Integer Type) {
|
203
|
211
|
ResponseBean responseBean = new ResponseBean();
|
204
|
212
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
205
|
213
|
Integer userId = userElement.getId();
|
206
|
|
- ResponseBean response = socialServiceI.updateTransaction(tpTransaction, userId);
|
|
214
|
+ ResponseBean response = socialServiceI.updateTransaction(Id, transactionTitle, transactionContent, userId, Type);
|
207
|
215
|
return response;
|
208
|
216
|
}
|
209
|
217
|
|
210
|
218
|
@ApiOperation(value = "评价工单内容以及评分", notes = "评价工单内容以及评分")
|
211
|
|
- @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
212
|
|
- @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket"),
|
|
219
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
|
220
|
+ @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType = "TpTicket"),
|
213
|
221
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "工单Id")})
|
214
|
222
|
@RequestMapping(value = "/accessTicket/{communityId}", method = RequestMethod.POST)
|
215
|
|
- public ResponseBean accessTicket(@PathVariable("communityId")Integer communityId, @RequestBody TpTicket tpTicket, @RequestParam("ticketId")String ticketId, HttpSession session){
|
|
223
|
+ public ResponseBean accessTicket(@PathVariable("communityId") Integer communityId, @RequestBody TpTicket tpTicket, @RequestParam("ticketId") String ticketId, HttpSession session) {
|
216
|
224
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
217
|
225
|
Integer userId = userElement.getId();
|
218
|
226
|
ResponseBean responseBean = new ResponseBean();
|