Commit 39b82c4e by 段启岩

消息列表更新

parent 917f276a
...@@ -58,13 +58,12 @@ public class MessageApi { ...@@ -58,13 +58,12 @@ public class MessageApi {
@GetMapping("/my/messages") @GetMapping("/my/messages")
public Response<?> getMyMessages(@Valid PageForm pageForm, public Response<?> getMyMessages(@Valid PageForm pageForm,
BindingResult bindingResult, BindingResult bindingResult,
@CurrentSubject Subject subject, @RequestParam(value = "type", required = false) String type) {
@RequestParam(value = "type" ,required = false) String type) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return Response.fieldError(bindingResult.getFieldError()); return Response.fieldError(bindingResult.getFieldError());
} }
// 根据用户获取列表并返回 // 根据用户获取列表并返回
IPage<Message> messageIPage = messageService.getMessagePage(pageForm.getPage(), pageForm.getSize(), (String) subject.getId(), type); IPage<Message> messageIPage = messageService.getMessagePage(pageForm.getPage(), pageForm.getSize(), (String) SubjectUtils.getSubject().getId(), type);
PageDTO<Message> messagePageDTO = new PageDTO<>(messageIPage); PageDTO<Message> messagePageDTO = new PageDTO<>(messageIPage);
return Response.success(messagePageDTO); return Response.success(messagePageDTO);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment