diff --git a/ruoyi-admin/src/main/java/com/ruoyi/busi/service/impl/BusiNoticeServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/busi/service/impl/BusiNoticeServiceImpl.java index ab2f77a..f0ea812 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/busi/service/impl/BusiNoticeServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/busi/service/impl/BusiNoticeServiceImpl.java @@ -258,7 +258,7 @@ public class BusiNoticeServiceImpl extends ServiceImpl queryWrapperMember =new LambdaQueryWrapper<>(); queryWrapperMember.eq(MemberApply::getUserId,userDetail.getUserId()).eq(MemberApply::getApprovalStatus,1).last("limit 1"); @@ -269,7 +269,8 @@ public class BusiNoticeServiceImpl extends ServiceImpl signList = busiNoticeSignMapper.selectList(new LambdaQueryWrapper().eq(BusiNoticeSign::getNoticeId, noticeId)); - List signUserAvatarList = signList.stream().map(BusiNoticeSign::getAvatar).collect(Collectors.toList()); + List signUserAvatarList = signList.stream().map(it-> Optional.ofNullable(it.getAvatar()).orElse("") + ).collect(Collectors.toList()); res.put("signUserAvatarList",signUserAvatarList); //当前用户是否已关注该通告主 Long userId=null;