|
@@ -1,7 +1,9 @@
|
1
|
1
|
package com.community.huiju.controller;
|
2
|
2
|
|
|
3
|
+import com.community.commom.constant.Constant;
|
3
|
4
|
import com.community.commom.mode.ResponseBean;
|
4
|
5
|
import com.community.huiju.model.TpAnnouncement;
|
|
6
|
+import com.community.huiju.model.TpMessage;
|
5
|
7
|
import com.community.huiju.service.SocialServiceI;
|
6
|
8
|
import io.swagger.annotations.Api;
|
7
|
9
|
import io.swagger.annotations.ApiImplicitParam;
|
|
@@ -11,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
11
|
13
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
12
|
14
|
import org.springframework.web.bind.annotation.*;
|
13
|
15
|
|
|
16
|
+import java.util.List;
|
|
17
|
+
|
14
|
18
|
/**
|
15
|
19
|
* @author weichaochao
|
16
|
20
|
* @Title: SocialController
|
|
@@ -34,4 +38,16 @@ public class SocialController {
|
34
|
38
|
responseBean.addSuccess(tpAnnouncement);
|
35
|
39
|
return responseBean;
|
36
|
40
|
}
|
|
41
|
+
|
|
42
|
+ @ApiOperation(value = "按小区获取分页活动列表", notes = "按小区获取分页活动列表")
|
|
43
|
+ @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
|
|
44
|
+ @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
|
|
45
|
+ @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
|
|
46
|
+ @RequestMapping(value = "/announcements/{communityId}",method = RequestMethod.GET)
|
|
47
|
+ public ResponseBean getAnnouncements(@PathVariable Integer communityId,@RequestParam Integer pageNum,@RequestParam Integer pageSize){
|
|
48
|
+ ResponseBean responseBean = new ResponseBean();
|
|
49
|
+ List<TpMessage> upcomingList = socialServiceI.getAnnouncements(communityId,pageNum,pageSize);
|
|
50
|
+ responseBean.addSuccess(upcomingList);
|
|
51
|
+ return responseBean;
|
|
52
|
+ }
|
37
|
53
|
}
|