浏览代码

完成 运营 banner

weiximei 6 年前
父节点
当前提交
feaf455cc7

二进制
CODE/smart-community/community-common/target/classes/com/community/commom/redis/SingleRedisTemplate.class 查看文件


二进制
CODE/smart-community/community-common/target/classes/com/community/commom/utils/HttpClientUtils.class 查看文件


+ 17
- 20
CODE/smart-community/operate-api/src/main/java/com/community/huiju/controller/BannerController.java 查看文件

1
 package com.community.huiju.controller;
1
 package com.community.huiju.controller;
2
 
2
 
3
+import com.alibaba.fastjson.JSONObject;
3
 import com.community.commom.constant.Constant;
4
 import com.community.commom.constant.Constant;
4
 import com.community.commom.mode.ResponseBean;
5
 import com.community.commom.mode.ResponseBean;
5
 import com.community.commom.session.UserElement;
6
 import com.community.commom.session.UserElement;
63
 
64
 
64
     @ApiOperation(value = "获取Banner详情",notes = "获取Banner详情")
65
     @ApiOperation(value = "获取Banner详情",notes = "获取Banner详情")
65
     @ApiImplicitParams({
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
     @RequestMapping(value = "/banner",method = RequestMethod.GET)
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
         ResponseBean response = new ResponseBean();
72
         ResponseBean response = new ResponseBean();
73
         response = iToBannerService.getById(bannerId);
73
         response = iToBannerService.getById(bannerId);
74
         return response;
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
 }

+ 2
- 0
CODE/smart-community/operate-api/src/main/java/com/community/huiju/dao/SysDictionaryMapper.java 查看文件

1
 package com.community.huiju.dao;
1
 package com.community.huiju.dao;
2
 
2
 
3
 import com.community.huiju.model.SysDictionary;
3
 import com.community.huiju.model.SysDictionary;
4
+import org.apache.ibatis.annotations.Mapper;
4
 
5
 
6
+@Mapper
5
 public interface SysDictionaryMapper {
7
 public interface SysDictionaryMapper {
6
     int deleteByPrimaryKey(Integer id);
8
     int deleteByPrimaryKey(Integer id);
7
 
9