mirror of https://gitee.com/stylefeng/roses
【notice\message】message 解析增加返回值
parent
de4d538f31
commit
b2e9d2e509
|
@ -158,7 +158,14 @@ public class MessageDbServiceImpl implements MessageApi {
|
|||
public PageResult<MessageResponse> queryPage(MessageParam messageParam) {
|
||||
PageResult<SysMessage> pageResult = sysMessageService.page(messageParam);
|
||||
PageResult<MessageResponse> result = new PageResult<>();
|
||||
List<SysMessage> messageList = pageResult.getRows();
|
||||
List<MessageResponse> resultList = messageList.stream().map(msg -> {
|
||||
MessageResponse response = new MessageResponse();
|
||||
BeanUtil.copyProperties(msg, response);
|
||||
return response;
|
||||
}).collect(Collectors.toList());
|
||||
BeanUtil.copyProperties(pageResult, result);
|
||||
result.setRows(resultList);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue