|
@@ -10,6 +10,10 @@ import com.huiju.estateagents.entity.TaBuildingDynamic;
|
10
|
10
|
import com.huiju.estateagents.service.IExtendContentService;
|
11
|
11
|
import com.huiju.estateagents.service.ITaBuildingDynamicService;
|
12
|
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
|
17
|
import org.apache.commons.lang3.StringUtils;
|
14
|
18
|
import org.slf4j.Logger;
|
15
|
19
|
import org.slf4j.LoggerFactory;
|
|
@@ -35,6 +39,7 @@ import java.time.LocalDateTime;
|
35
|
39
|
*/
|
36
|
40
|
@RestController
|
37
|
41
|
@RequestMapping("/api")
|
|
42
|
+@Api(value = "轮播图", tags = "轮播图")
|
38
|
43
|
public class ExtendContentController extends BaseController {
|
39
|
44
|
|
40
|
45
|
private final Logger logger = LoggerFactory.getLogger(ExtendContentController.class);
|
|
@@ -54,6 +59,16 @@ public class ExtendContentController extends BaseController {
|
54
|
59
|
* @param pageSize
|
55
|
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
|
72
|
@RequestMapping(value="/admin/extendContent",method= RequestMethod.GET)
|
58
|
73
|
public ResponseBean extendContentList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
59
|
74
|
@RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
|
@@ -80,6 +95,16 @@ public class ExtendContentController extends BaseController {
|
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
|
108
|
@RequestMapping(value="/wx/extendContent/{showType}",method= RequestMethod.GET)
|
84
|
109
|
public ResponseBean extendContentListShowType(@PathVariable(value = "showType") String showType,
|
85
|
110
|
@RequestParam(value = "showPosition", required = false) String showPosition,
|
|
@@ -98,6 +123,10 @@ public class ExtendContentController extends BaseController {
|
98
|
123
|
* @param extendContent 实体对象
|
99
|
124
|
* @return
|
100
|
125
|
*/
|
|
126
|
+ @ApiOperation(value = "后台轮播图保存", notes = "后台轮播图保存")
|
|
127
|
+ @ApiImplicitParams({
|
|
128
|
+ @ApiImplicitParam(dataType = "ExtendContent", name = "extendContent", paramType = "body",value = "轮播图内容")
|
|
129
|
+ })
|
101
|
130
|
@RequestMapping(value="/admin/extendContent",method= RequestMethod.POST)
|
102
|
131
|
public ResponseBean extendContentAdd(@RequestBody ExtendContent extendContent, HttpServletRequest request){
|
103
|
132
|
Integer cityId = iTaBuildingService.getCityById(extendContent.getBuildingId());
|
|
@@ -113,6 +142,10 @@ public class ExtendContentController extends BaseController {
|
113
|
142
|
* 根据id删除对象
|
114
|
143
|
* @param id 实体ID
|
115
|
144
|
*/
|
|
145
|
+ @ApiOperation(value = "后台轮播图删除", notes = "后台轮播图删除")
|
|
146
|
+ @ApiImplicitParams({
|
|
147
|
+ @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "payh",value = "轮播图id")
|
|
148
|
+ })
|
116
|
149
|
@ResponseBody
|
117
|
150
|
@RequestMapping(value="/admin/extendContent/{id}", method= RequestMethod.DELETE)
|
118
|
151
|
public ResponseBean extendContentDelete(@PathVariable Integer id){
|
|
@@ -137,6 +170,11 @@ public class ExtendContentController extends BaseController {
|
137
|
170
|
* @param extendContent 实体对象
|
138
|
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
|
178
|
@RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.PUT)
|
141
|
179
|
public ResponseBean extendContentUpdate(@PathVariable Integer id,
|
142
|
180
|
@RequestBody ExtendContent extendContent,HttpServletRequest request){
|
|
@@ -163,6 +201,10 @@ public class ExtendContentController extends BaseController {
|
163
|
201
|
* 根据id查询对象
|
164
|
202
|
* @param id 实体ID
|
165
|
203
|
*/
|
|
204
|
+ @ApiOperation(value = "后台轮播图查询", notes = "后台轮播图查询")
|
|
205
|
+ @ApiImplicitParams({
|
|
206
|
+ @ApiImplicitParam(dataType = "Integer", name = "id", paramType = "payh",value = "轮播图id")
|
|
207
|
+ })
|
166
|
208
|
@RequestMapping(value="/admin/extendContent/{id}",method= RequestMethod.GET)
|
167
|
209
|
public ResponseBean extendContentGet(@PathVariable Integer id){
|
168
|
210
|
ResponseBean responseBean = new ResponseBean();
|