|
@@ -1,5 +1,6 @@
|
1
|
1
|
package com.community.huiju.controller;
|
2
|
2
|
|
|
3
|
+import com.alibaba.fastjson.JSONObject;
|
3
|
4
|
import com.community.commom.constant.Constant;
|
4
|
5
|
import com.community.commom.mode.ResponseBean;
|
5
|
6
|
import com.community.commom.session.UserElement;
|
|
@@ -63,33 +64,29 @@ public class BannerController {
|
63
|
64
|
|
64
|
65
|
@ApiOperation(value = "获取Banner详情",notes = "获取Banner详情")
|
65
|
66
|
@ApiImplicitParams({
|
66
|
|
- @ApiImplicitParam(paramType = "id",dataType = "Integer",name = "bannerId",value = "bannerId(编号),")
|
|
67
|
+ @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "bannerId",value = "bannerId(编号),")
|
67
|
68
|
})
|
68
|
69
|
@RequestMapping(value = "/banner",method = RequestMethod.GET)
|
69
|
|
- public ResponseBean getByIdBanner(@RequestParam(value = "bannerId") Integer bannerId,
|
70
|
|
- HttpSession session){
|
|
70
|
+ public ResponseBean getByIdBanner(@RequestParam(value = "bannerId") Integer bannerId){
|
71
|
71
|
|
72
|
72
|
ResponseBean response = new ResponseBean();
|
73
|
73
|
response = iToBannerService.getById(bannerId);
|
74
|
74
|
return response;
|
75
|
75
|
}
|
76
|
76
|
|
77
|
|
-// @ApiOperation(value = "根据条件查询Banner",notes = "根据条件查询Banner")
|
78
|
|
-// @ApiImplicitParams({
|
79
|
|
-// @ApiImplicitParam(paramType = "body",dataType = "ToBanner",name = "banner",value = "bannerTitle(标题)," +
|
80
|
|
-// "sort(权重),bannerCover(图片),bannerPosition(Banner位),communityId(小区)," +
|
81
|
|
-// "effTime(生效时间),expTime(失效时间),bannerType(Banner类型),externalLink(Banner的URL)," +
|
82
|
|
-// "bannerContent(Banner内容)"),
|
83
|
|
-// @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
|
84
|
|
-// })
|
85
|
|
-// @RequestMapping(value = "/banner",method = RequestMethod.GET)
|
86
|
|
-// public ResponseBean updateBanner(@RequestBody @Valid ToBanner banner,
|
87
|
|
-// HttpSession session){
|
88
|
|
-//
|
89
|
|
-// UserElement userElement = (UserElement) session.getAttribute(Constant.WEB_USER_SESSION);
|
90
|
|
-// ResponseBean response = new ResponseBean();
|
91
|
|
-// response = iToBannerService.modifyBanner(banner,userElement.getId());
|
92
|
|
-// return response;
|
93
|
|
-// }
|
|
77
|
+ @ApiOperation(value = "根据条件查询Banner",notes = "根据条件查询Banner")
|
|
78
|
+ @ApiImplicitParams({
|
|
79
|
+ @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "bannerTitle(标题)," +
|
|
80
|
+ ",bannerPosition(Banner位),bannerDescription(跳转概述)"),
|
|
81
|
+ })
|
|
82
|
+ @RequestMapping(value = "/banner/list",method = RequestMethod.GET)
|
|
83
|
+ public ResponseBean getBanner(@RequestBody String parameter){
|
|
84
|
+
|
|
85
|
+ ToBanner banner = JSONObject.parseObject(parameter,ToBanner.class);
|
|
86
|
+
|
|
87
|
+ ResponseBean response = new ResponseBean();
|
|
88
|
+ response = iToBannerService.getBanner(banner);
|
|
89
|
+ return response;
|
|
90
|
+ }
|
94
|
91
|
|
95
|
92
|
}
|