diff --git a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/impl/SysMessageServiceImpl.java b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/impl/SysMessageServiceImpl.java index 60c8ba036..8879ece58 100644 --- a/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/impl/SysMessageServiceImpl.java +++ b/kernel-s-system/system-business-portal/src/main/java/cn/stylefeng/roses/kernel/sys/modular/message/service/impl/SysMessageServiceImpl.java @@ -39,6 +39,16 @@ public class SysMessageServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(SysMessage::getReceiveUserId, LoginContext.me().getLoginUser().getUserId()); + wrapper.eq(SysMessage::getMessageId, sysMessageRequest.getMessageId()); + + // 查询关键信息 + wrapper.select(SysMessage::getMessageId, SysMessage::getMessageTitle, SysMessage::getMessageContent, SysMessage::getPriorityLevel, + SysMessage::getMessageSendTime, SysMessage::getMessageType, SysMessage::getMessageUrl, SysMessage::getBusinessType, + SysMessage::getBusinessId); + return this.querySysMessage(sysMessageRequest); } @@ -48,7 +58,8 @@ public class SysMessageServiceImpl extends ServiceImpl pageList = this.page(PageFactory.defaultPage(), wrapper); return PageResultFactory.createPageResult(pageList);