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

改成get

上级 f37462bc
...@@ -75,8 +75,8 @@ public class NotifyCoreResource { ...@@ -75,8 +75,8 @@ public class NotifyCoreResource {
* @param * @param
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST,value = "/notify/msgbody/getallbacklogall") @RequestMapping(method = RequestMethod.GET,value = "/notify/msgbody/getallbacklogall")
public ResponseEntity<List<MsgBodyDTO>> getAllBacklogAll(@RequestBody MsgBodySearchContext context){ public ResponseEntity<List<MsgBodyDTO>> getAllBacklogAll(MsgBodySearchContext context){
Page domains = notifyCoreService.getBacklogAllContent(context); Page domains = notifyCoreService.getBacklogAllContent(context);
List<MsgBodyDTO> list = mapping.toDto(domains.getContent()); List<MsgBodyDTO> list = mapping.toDto(domains.getContent());
return ResponseEntity.status(HttpStatus.OK) return ResponseEntity.status(HttpStatus.OK)
...@@ -91,9 +91,14 @@ public class NotifyCoreResource { ...@@ -91,9 +91,14 @@ public class NotifyCoreResource {
* @param * @param
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST,value = "/notify/msgbody/getbacklogbypage") @RequestMapping(method = RequestMethod.GET,value = "/notify/msgbody/getbacklogbypage")
public ResponseEntity<Page> getBacklogByPage(@RequestBody MsgBodySearchContext context) { public ResponseEntity<List<MsgBodyDTO>> getBacklogByPage(MsgBodySearchContext context) {
Page page = notifyCoreService.getBacklogByPage(context); Page domains = notifyCoreService.getBacklogByPage(context);
return ResponseEntity.status(HttpStatus.OK).body(new PageImpl(mapping.toDto(page.getContent()), page.getPageable(), page.getTotalElements())); 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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册