傅行帆 5 年前
父节点
当前提交
662fb5a6de

+ 42
- 0
src/main/java/com/huiju/estateagents/controller/ExtendContentController.java 查看文件

10
 import com.huiju.estateagents.service.IExtendContentService;
10
 import com.huiju.estateagents.service.IExtendContentService;
11
 import com.huiju.estateagents.service.ITaBuildingDynamicService;
11
 import com.huiju.estateagents.service.ITaBuildingDynamicService;
12
 import com.huiju.estateagents.service.ITaBuildingService;
12
 import com.huiju.estateagents.service.ITaBuildingService;
13
+import io.swagger.annotations.Api;
14
+import io.swagger.annotations.ApiImplicitParam;
15
+import io.swagger.annotations.ApiImplicitParams;
16
+import io.swagger.annotations.ApiOperation;
13
 import org.apache.commons.lang3.StringUtils;
17
 import org.apache.commons.lang3.StringUtils;
14
 import org.slf4j.Logger;
18
 import org.slf4j.Logger;
15
 import org.slf4j.LoggerFactory;
19
 import org.slf4j.LoggerFactory;
35
  */
39
  */
36
 @RestController
40
 @RestController
37
 @RequestMapping("/api")
41
 @RequestMapping("/api")
42
+@Api(value = "轮播图", tags = "轮播图")
38
 public class ExtendContentController extends BaseController {
43
 public class ExtendContentController extends BaseController {
39
 
44
 
40
     private final Logger logger = LoggerFactory.getLogger(ExtendContentController.class);
45
     private final Logger logger = LoggerFactory.getLogger(ExtendContentController.class);
54
      * @param pageSize
59
      * @param pageSize
55
      * @return
60
      * @return
56
      */
61
      */
62
+    @ApiOperation(value = "后台轮播图列表", notes = "后台轮播图列表")
63
+    @ApiImplicitParams({
64
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
65
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
66
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id"),
67
+            @ApiImplicitParam(dataTypeClass = String.class, name = "contentType", paramType = "query",value = "内容类型"),
68
+            @ApiImplicitParam(dataTypeClass = String.class, name = "showPosition", paramType = "query",value = "发布位置"),
69
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "status", paramType = "query",value = "状态"),
70
+            @ApiImplicitParam(dataTypeClass = String.class, name = "showType", paramType = "query",value = "发布类型")
71
+    })
57
     @RequestMapping(value="/admin/extendContent",method= RequestMethod.GET)
72
     @RequestMapping(value="/admin/extendContent",method= RequestMethod.GET)
58
     public ResponseBean extendContentList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
73
     public ResponseBean extendContentList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
59
                                           @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
74
                                           @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
80
     /**
95
     /**
81
      * 微信 开屏 / 轮播图
96
      * 微信 开屏 / 轮播图
82
      */
97
      */
98
+    @ApiOperation(value = "微信轮播图列表", notes = "微信轮播图列表")
99
+    @ApiImplicitParams({
100
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
101
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
102
+            @ApiImplicitParam(dataTypeClass = String.class, name = "buildingId", paramType = "query",value = "项目id"),
103
+            @ApiImplicitParam(dataTypeClass = String.class, name = "contentType", paramType = "query",value = "内容类型"),
104
+            @ApiImplicitParam(dataTypeClass = String.class, name = "targetId", paramType = "query",value = ""),
105
+            @ApiImplicitParam(dataTypeClass = String.class, name = "contentId", paramType = "query",value = "内容ID"),
106
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "cityId", paramType = "query",value = "城市ID")
107
+    })
83
     @RequestMapping(value="/wx/extendContent/{showType}",method= RequestMethod.GET)
108
     @RequestMapping(value="/wx/extendContent/{showType}",method= RequestMethod.GET)
84
     public ResponseBean extendContentListShowType(@PathVariable(value = "showType") String showType,
109
     public ResponseBean extendContentListShowType(@PathVariable(value = "showType") String showType,
85
                                                   @RequestParam(value = "showPosition", required = false) String showPosition,
110
                                                   @RequestParam(value = "showPosition", required = false) String showPosition,
98
      * @param extendContent 实体对象
123
      * @param extendContent 实体对象
99
      * @return
124
      * @return
100
      */
125
      */
126
+    @ApiOperation(value = "后台轮播图保存", notes = "后台轮播图保存")
127
+    @ApiImplicitParams({
128
+            @ApiImplicitParam(dataType = "ExtendContent", name = "extendContent", paramType = "body",value = "轮播图内容")
129
+    })
101
     @RequestMapping(value="/admin/extendContent",method= RequestMethod.POST)
130
     @RequestMapping(value="/admin/extendContent",method= RequestMethod.POST)
102
     public ResponseBean extendContentAdd(@RequestBody ExtendContent extendContent, HttpServletRequest request){
131
     public ResponseBean extendContentAdd(@RequestBody ExtendContent extendContent, HttpServletRequest request){
103
         Integer cityId = iTaBuildingService.getCityById(extendContent.getBuildingId());
132
         Integer cityId = iTaBuildingService.getCityById(extendContent.getBuildingId());
113
      * 根据id删除对象
142
      * 根据id删除对象
114
      * @param id  实体ID
143
      * @param id  实体ID
115
      */
144
      */
145
+    @ApiOperation(value = "后台轮播图删除", notes = "后台轮播图删除")
146
+    @ApiImplicitParams({
147
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "payh",value = "轮播图id")
148
+    })
116
     @ResponseBody
149
     @ResponseBody
117
     @RequestMapping(value="/admin/extendContent/{id}", method= RequestMethod.DELETE)
150
     @RequestMapping(value="/admin/extendContent/{id}", method= RequestMethod.DELETE)
118
     public ResponseBean extendContentDelete(@PathVariable Integer id){
151
     public ResponseBean extendContentDelete(@PathVariable Integer id){
137
      * @param extendContent 实体对象
170
      * @param extendContent 实体对象
138
      * @return
171
      * @return
139
      */
172
      */
173
+    @ApiOperation(value = "后台轮播图保存", notes = "后台轮播图保存")
174
+    @ApiImplicitParams({
175
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "payh",value = "轮播图id"),
176
+            @ApiImplicitParam(dataType = "ExtendContent", name = "extendContent", paramType = "body",value = "轮播图内容")
177
+    })
140
     @RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.PUT)
178
     @RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.PUT)
141
     public ResponseBean extendContentUpdate(@PathVariable Integer id,
179
     public ResponseBean extendContentUpdate(@PathVariable Integer id,
142
                                         @RequestBody ExtendContent extendContent,HttpServletRequest request){
180
                                         @RequestBody ExtendContent extendContent,HttpServletRequest request){
163
      * 根据id查询对象
201
      * 根据id查询对象
164
      * @param id  实体ID
202
      * @param id  实体ID
165
      */
203
      */
204
+    @ApiOperation(value = "后台轮播图查询", notes = "后台轮播图查询")
205
+    @ApiImplicitParams({
206
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "payh",value = "轮播图id")
207
+    })
166
     @RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.GET)
208
     @RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.GET)
167
     public ResponseBean extendContentGet(@PathVariable Integer id){
209
     public ResponseBean extendContentGet(@PathVariable Integer id){
168
         ResponseBean responseBean = new ResponseBean();
210
         ResponseBean responseBean = new ResponseBean();

+ 38
- 0
src/main/java/com/huiju/estateagents/controller/TaPolicyController.java 查看文件

10
 import com.huiju.estateagents.entity.TdCity;
10
 import com.huiju.estateagents.entity.TdCity;
11
 import com.huiju.estateagents.service.ITdCityService;
11
 import com.huiju.estateagents.service.ITdCityService;
12
 import com.huiju.estateagents.service.ITaPolicyService;
12
 import com.huiju.estateagents.service.ITaPolicyService;
13
+import io.swagger.annotations.Api;
14
+import io.swagger.annotations.ApiImplicitParam;
15
+import io.swagger.annotations.ApiImplicitParams;
16
+import io.swagger.annotations.ApiOperation;
13
 import org.slf4j.Logger;
17
 import org.slf4j.Logger;
14
 import org.slf4j.LoggerFactory;
18
 import org.slf4j.LoggerFactory;
15
 import org.springframework.beans.factory.annotation.Autowired;
19
 import org.springframework.beans.factory.annotation.Autowired;
35
  */
39
  */
36
 @RestController
40
 @RestController
37
 @RequestMapping("/api")
41
 @RequestMapping("/api")
42
+@Api(value = "政策维护", tags = "政策维护")
38
 public class TaPolicyController extends BaseController {
43
 public class TaPolicyController extends BaseController {
39
 
44
 
40
     private final Logger logger = LoggerFactory.getLogger(TaPolicyController.class);
45
     private final Logger logger = LoggerFactory.getLogger(TaPolicyController.class);
52
      * @param pageSize
57
      * @param pageSize
53
      * @return
58
      * @return
54
      */
59
      */
60
+    @ApiOperation(value = "后台政策维护列表", notes = "后台政策维护列表")
61
+    @ApiImplicitParams({
62
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
63
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
64
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "cityId", paramType = "query",value = "城市ID")
65
+    })
55
     @RequestMapping(value="/admin/taPolicy",method= RequestMethod.GET)
66
     @RequestMapping(value="/admin/taPolicy",method= RequestMethod.GET)
56
     public ResponseBean taPolicyList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
67
     public ResponseBean taPolicyList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
57
 									 @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
68
 									 @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
82
      * @param pageSize
93
      * @param pageSize
83
      * @return
94
      * @return
84
      */
95
      */
96
+    @ApiOperation(value = "微信政策维护列表", notes = "微信政策维护列表")
97
+    @ApiImplicitParams({
98
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
99
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行"),
100
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "cityId", paramType = "query",value = "城市ID")
101
+    })
85
     @RequestMapping(value="/wx/taPolicy",method= RequestMethod.GET)
102
     @RequestMapping(value="/wx/taPolicy",method= RequestMethod.GET)
86
     public ResponseBean taPolicyListCity(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
103
     public ResponseBean taPolicyListCity(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
87
                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
104
                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
110
      * @param taPolicy 实体对象
127
      * @param taPolicy 实体对象
111
      * @return
128
      * @return
112
      */
129
      */
130
+    @ApiOperation(value = "后台政策维护保存", notes = "后台政策维护保存")
131
+    @ApiImplicitParams({
132
+            @ApiImplicitParam(dataType = "TaPolicy", name = "taPolicy", paramType = "body",value = "政策数据")
133
+    })
113
     @RequestMapping(value="/admin/taPolicy",method= RequestMethod.POST)
134
     @RequestMapping(value="/admin/taPolicy",method= RequestMethod.POST)
114
     public ResponseBean taPolicyAdd(@RequestBody TaPolicy taPolicy, HttpServletRequest request){
135
     public ResponseBean taPolicyAdd(@RequestBody TaPolicy taPolicy, HttpServletRequest request){
115
         ResponseBean responseBean = new ResponseBean();
136
         ResponseBean responseBean = new ResponseBean();
144
      * 根据id删除对象
165
      * 根据id删除对象
145
      * @param id  实体ID
166
      * @param id  实体ID
146
      */
167
      */
168
+    @ApiOperation(value = "后台政策维护删除", notes = "后台政策维护删除")
169
+    @ApiImplicitParams({
170
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "政策数据ID")
171
+    })
147
     @ResponseBody
172
     @ResponseBody
148
     @RequestMapping(value="/admin/taPolicy/{id}", method= RequestMethod.DELETE)
173
     @RequestMapping(value="/admin/taPolicy/{id}", method= RequestMethod.DELETE)
149
     public ResponseBean taPolicyDelete(@PathVariable Integer id){
174
     public ResponseBean taPolicyDelete(@PathVariable Integer id){
169
      * @param taPolicy 实体对象
194
      * @param taPolicy 实体对象
170
      * @return
195
      * @return
171
      */
196
      */
197
+    @ApiOperation(value = "后台政策维护修改", notes = "后台政策维护修改")
198
+    @ApiImplicitParams({
199
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "政策数据ID"),
200
+            @ApiImplicitParam(dataType = "TaPolicy", name = "taPolicy", paramType = "body",value = "政策数据")
201
+    })
172
     @RequestMapping(value="/admin/taPolicy/{id}",method= RequestMethod.PUT)
202
     @RequestMapping(value="/admin/taPolicy/{id}",method= RequestMethod.PUT)
173
     public ResponseBean taPolicyUpdate(@PathVariable Integer id,
203
     public ResponseBean taPolicyUpdate(@PathVariable Integer id,
174
                                         @RequestBody TaPolicy taPolicy,
204
                                         @RequestBody TaPolicy taPolicy,
203
      * 根据id查询对象
233
      * 根据id查询对象
204
      * @param id  实体ID
234
      * @param id  实体ID
205
      */
235
      */
236
+    @ApiOperation(value = "后台政策维护查询", notes = "后台政策维护查询")
237
+    @ApiImplicitParams({
238
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "政策数据ID")
239
+    })
206
     @RequestMapping(value="/admin/taPolicy/{id}",method= RequestMethod.GET)
240
     @RequestMapping(value="/admin/taPolicy/{id}",method= RequestMethod.GET)
207
     public ResponseBean taPolicyGet(@PathVariable Integer id){
241
     public ResponseBean taPolicyGet(@PathVariable Integer id){
208
         ResponseBean responseBean = new ResponseBean();
242
         ResponseBean responseBean = new ResponseBean();
219
      * 根据id查询对象
253
      * 根据id查询对象
220
      * @param id  实体ID
254
      * @param id  实体ID
221
      */
255
      */
256
+    @ApiOperation(value = "微信政策维护查询", notes = "微信政策维护查询")
257
+    @ApiImplicitParams({
258
+            @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "path",value = "政策数据ID")
259
+    })
222
     @RequestMapping(value="/wx/taPolicy/{id}",method= RequestMethod.GET)
260
     @RequestMapping(value="/wx/taPolicy/{id}",method= RequestMethod.GET)
223
     public ResponseBean taPolicyGetWx(@PathVariable Integer id){
261
     public ResponseBean taPolicyGetWx(@PathVariable Integer id){
224
         ResponseBean responseBean = new ResponseBean();
262
         ResponseBean responseBean = new ResponseBean();

+ 10
- 0
src/main/java/com/huiju/estateagents/controller/TdReportController.java 查看文件

6
 import com.huiju.estateagents.base.ResponseBean;
6
 import com.huiju.estateagents.base.ResponseBean;
7
 import com.huiju.estateagents.entity.TdReport;
7
 import com.huiju.estateagents.entity.TdReport;
8
 import com.huiju.estateagents.service.ITdReportService;
8
 import com.huiju.estateagents.service.ITdReportService;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiImplicitParam;
11
+import io.swagger.annotations.ApiImplicitParams;
12
+import io.swagger.annotations.ApiOperation;
9
 import org.slf4j.Logger;
13
 import org.slf4j.Logger;
10
 import org.slf4j.LoggerFactory;
14
 import org.slf4j.LoggerFactory;
11
 import org.springframework.beans.factory.annotation.Autowired;
15
 import org.springframework.beans.factory.annotation.Autowired;
28
  */
32
  */
29
 @RestController
33
 @RestController
30
 @RequestMapping("/api")
34
 @RequestMapping("/api")
35
+@Api(value = "客户留言", tags = "客户留言")
31
 public class TdReportController extends BaseController {
36
 public class TdReportController extends BaseController {
32
 
37
 
33
     private final Logger logger = LoggerFactory.getLogger(TdReportController.class);
38
     private final Logger logger = LoggerFactory.getLogger(TdReportController.class);
42
      * @param pageSize
47
      * @param pageSize
43
      * @return
48
      * @return
44
      */
49
      */
50
+    @ApiOperation(value = "后台客户留言列表", notes = "后台客户留言列表")
51
+    @ApiImplicitParams({
52
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageNum", paramType = "query",value = "第几页"),
53
+            @ApiImplicitParam(dataTypeClass = Integer.class, name = "pageSize", paramType = "query",value = "一页多少行")
54
+    })
45
     @RequestMapping(value="/admin/tdReports",method= RequestMethod.GET)
55
     @RequestMapping(value="/admin/tdReports",method= RequestMethod.GET)
46
     public ResponseBean tdReportList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
56
     public ResponseBean tdReportList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
47
                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){
57
                                      @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize){