提交 cceaba79 编写于 作者: tangyaolong's avatar tangyaolong

返回值类型修改

上级 78316f6e
......@@ -93,9 +93,13 @@ public class NotifyCoreResource {
* @return
*/
@RequestMapping(method = RequestMethod.GET,value = "/notify/msgbody/getbacklogbypage")
public ResponseEntity<Page> getBacklogByPage(MsgBodySearchContext context) {
Page page = notifyCoreService.getBacklogByPage(context);
return ResponseEntity.status(HttpStatus.OK).body(new PageImpl(mapping.toDto(page.getContent()), page.getPageable(), page.getContent().size()));
public ResponseEntity<List<MsgBodyDTO>> getBacklogByPage(MsgBodySearchContext context) {
Page domains = notifyCoreService.getBacklogByPage(context);
List<MsgBodyDTO> list = mapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK)
.header("x-page", String.valueOf(context.getPageable().getPageNumber()))
.header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
.header("x-total", String.valueOf(domains.getTotalElements()))
.body(list);
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册