|
@@ -5,9 +5,8 @@ import com.community.commom.mode.ResponseBean;
|
5
|
5
|
import com.community.huiju.config.entity.UserElement;
|
6
|
6
|
import com.community.huiju.model.TpActivity;
|
7
|
7
|
import com.community.huiju.model.TpAnnouncement;
|
8
|
|
-import com.community.huiju.model.TpMessage;
|
|
8
|
+import com.community.huiju.model.TpTicket;
|
9
|
9
|
import com.community.huiju.model.TpTransaction;
|
10
|
|
-import com.community.huiju.model.*;
|
11
|
10
|
import com.community.huiju.service.SocialServiceI;
|
12
|
11
|
import io.swagger.annotations.Api;
|
13
|
12
|
import io.swagger.annotations.ApiImplicitParam;
|
|
@@ -38,9 +37,11 @@ public class SocialController {
|
38
|
37
|
@ApiOperation(value = "论坛公告帖子详情", notes = "获取论坛公告帖子详情")
|
39
|
38
|
@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
40
|
39
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "id", value = "公告帖子id")})
|
41
|
|
- public ResponseBean findAnnouncementDetail(@PathVariable(value = "communityId")Integer communityId, @RequestParam("id") Integer id){
|
|
40
|
+ public ResponseBean findAnnouncementDetail(@PathVariable(value = "communityId")Integer communityId, @RequestParam("id") Integer id, HttpSession session){
|
|
41
|
+ UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
|
42
|
+ Integer userId = userElement.getId();
|
42
|
43
|
ResponseBean responseBean = new ResponseBean();
|
43
|
|
- TpAnnouncement tpAnnouncement = socialServiceI.findAnnouncementDetail(id, communityId);
|
|
44
|
+ TpAnnouncement tpAnnouncement = socialServiceI.findAnnouncementDetail(id, communityId, userId);
|
44
|
45
|
responseBean.addSuccess(tpAnnouncement);
|
45
|
46
|
return responseBean;
|
46
|
47
|
}
|
|
@@ -49,8 +50,10 @@ public class SocialController {
|
49
|
50
|
@ApiOperation(value = "活动报名接口", notes = "活动报名接口")
|
50
|
51
|
@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
51
|
52
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动Id")})
|
52
|
|
- public ResponseBean SignActivity(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId")Integer activityId){
|
53
|
|
- ResponseBean responseBean = socialServiceI.findTaUserInfo(activityId, communityId);
|
|
53
|
+ public ResponseBean SignActivity(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId")Integer activityId, HttpSession session){
|
|
54
|
+ UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
|
55
|
+ Integer userId = userElement.getId();
|
|
56
|
+ ResponseBean responseBean = socialServiceI.findTaUserInfo(activityId, communityId, userId);
|
54
|
57
|
return responseBean;
|
55
|
58
|
}
|
56
|
59
|
|
|
@@ -101,9 +104,11 @@ public class SocialController {
|
101
|
104
|
@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
102
|
105
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动帖子id")})
|
103
|
106
|
@RequestMapping(value = "/activity/{communityId}", method = RequestMethod.GET)
|
104
|
|
- public ResponseBean findActivityDetail(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId") Integer activityId){
|
|
107
|
+ public ResponseBean findActivityDetail(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session){
|
|
108
|
+ UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
|
109
|
+ Integer userId = userElement.getId();
|
105
|
110
|
ResponseBean responseBean = new ResponseBean();
|
106
|
|
- TpActivity activity = socialServiceI.findActivityDetail(activityId, communityId);
|
|
111
|
+ TpActivity activity = socialServiceI.findActivityDetail(activityId, communityId, userId);
|
107
|
112
|
responseBean.addSuccess(activity);
|
108
|
113
|
return responseBean;
|
109
|
114
|
}
|
|
@@ -115,7 +120,7 @@ public class SocialController {
|
115
|
120
|
public ResponseBean findUsedDetails(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session){
|
116
|
121
|
ResponseBean responseBean = new ResponseBean();
|
117
|
122
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
118
|
|
- Integer userId=userElement.getId();
|
|
123
|
+ Integer userId = userElement.getId();
|
119
|
124
|
TpTransaction activity = socialServiceI.findUsedDetails(activityId, communityId,userId);
|
120
|
125
|
responseBean.addSuccess(activity);
|
121
|
126
|
return responseBean;
|
|
@@ -140,8 +145,10 @@ public class SocialController {
|
140
|
145
|
@ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
|
141
|
146
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "帖子Id")})
|
142
|
147
|
@RequestMapping(value = "/stopTicket/{communityId}", method = RequestMethod.GET)
|
143
|
|
- public ResponseBean stopTicket(@PathVariable("communityId")Integer communityId, @RequestParam("ticketId")Integer ticketId){
|
144
|
|
- ResponseBean responseBean = socialServiceI.stopTpTicketRecord(communityId, ticketId);
|
|
148
|
+ public ResponseBean stopTicket(@PathVariable("communityId")Integer communityId, @RequestParam("ticketId")Integer ticketId, HttpSession session){
|
|
149
|
+ UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
|
150
|
+ Integer userId = userElement.getId();
|
|
151
|
+ ResponseBean responseBean = socialServiceI.stopTpTicketRecord(communityId, ticketId, userId);
|
145
|
152
|
return responseBean;
|
146
|
153
|
}
|
147
|
154
|
|
|
@@ -166,7 +173,7 @@ public class SocialController {
|
166
|
173
|
public ResponseBean addTransaction(TpTransaction tpTransaction, HttpSession session){
|
167
|
174
|
ResponseBean responseBean = new ResponseBean();
|
168
|
175
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
169
|
|
- Integer userId=userElement.getId();
|
|
176
|
+ Integer userId = userElement.getId();
|
170
|
177
|
ResponseBean response=socialServiceI.addAllTransaction(userId,tpTransaction);
|
171
|
178
|
return response;
|
172
|
179
|
}
|
|
@@ -205,9 +212,11 @@ public class SocialController {
|
205
|
212
|
@ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket"),
|
206
|
213
|
@ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "工单Id")})
|
207
|
214
|
@RequestMapping(value = "/accessTicket/{communityId}", method = RequestMethod.POST)
|
208
|
|
- public ResponseBean accessTicket(@PathVariable("communityId")Integer communityId, @RequestBody TpTicket tpTicket, @RequestParam("ticketId")String ticketId){
|
|
215
|
+ public ResponseBean accessTicket(@PathVariable("communityId")Integer communityId, @RequestBody TpTicket tpTicket, @RequestParam("ticketId")String ticketId, HttpSession session){
|
|
216
|
+ UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
|
217
|
+ Integer userId = userElement.getId();
|
209
|
218
|
ResponseBean responseBean = new ResponseBean();
|
210
|
|
- socialServiceI.accessTicket(communityId, tpTicket, ticketId);
|
|
219
|
+ socialServiceI.accessTicket(communityId, tpTicket, ticketId, userId);
|
211
|
220
|
return responseBean;
|
212
|
221
|
}
|
213
|
222
|
}
|