use of com.qiwenshare.file.dto.notice.NoticeListDTO in project qiwen-file by qiwenshare.
the class NoticeController method selectUserList.
/**
* 得到所有的公告
*
* @return
*/
@Operation(summary = "得到所有的公告列表", tags = { "公告管理" })
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public RestResult<Map> selectUserList(@Parameter(description = "当前页,从1开始") @RequestParam(defaultValue = "1") int page, @Parameter(description = "页大小") @RequestParam(defaultValue = "10") int pageSize, @Parameter(description = "标题") @RequestParam(required = false) String title, @Parameter(description = "发布者") @RequestParam(required = false) Long publisher, @Parameter(description = "开始发布时间") @RequestParam(required = false) String beginTime, @Parameter(description = "开始发布时间") @RequestParam(required = false) String endTime) {
NoticeListDTO noticeListDTO = new NoticeListDTO();
noticeListDTO.setPage(page);
noticeListDTO.setPageSize(pageSize);
noticeListDTO.setTitle(title);
noticeListDTO.setPlatform(3);
noticeListDTO.setPublisher(publisher);
noticeListDTO.setBeginTime(beginTime);
noticeListDTO.setEndTime(endTime);
IPage<Notice> noticeIPage = noticeService.selectUserPage(noticeListDTO);
Map<String, Object> map = new HashMap<>();
map.put("total", noticeIPage.getTotal());
map.put("list", noticeIPage.getRecords());
return RestResult.success().data(map);
}
Aggregations