【notice\message】message 解析增加返回值

pull/3/head
liuhanqing 2021-01-15 21:48:05 +08:00 committed by fengshuonan
parent de4d538f31
commit b2e9d2e509
1 changed files with 7 additions and 0 deletions

View File

@ -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;
}