通告详情接口

This commit is contained in:
13405411873 2025-03-29 11:18:43 +08:00
parent 1de9200359
commit a3fef62a6c

View File

@ -258,7 +258,7 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
JSONObject userDetailJson = new JSONObject();
userDetailJson.put("userId",userDetail.getUserId());
userDetailJson.put("nickName",userDetail.getNickName());
userDetailJson.put("avatar",userDetail.getAvatar());
userDetailJson.put("avatar",Optional.ofNullable(userDetail.getAvatar()).orElse(""));
//关联认证表
LambdaQueryWrapper<MemberApply> 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<BusiNoticeMapper,BusiNoti
res.put("userDetail",userDetailJson);
//已报名用户头像
List<BusiNoticeSign> signList = busiNoticeSignMapper.selectList(new LambdaQueryWrapper<BusiNoticeSign>().eq(BusiNoticeSign::getNoticeId, noticeId));
List<String> signUserAvatarList = signList.stream().map(BusiNoticeSign::getAvatar).collect(Collectors.toList());
List<String> signUserAvatarList = signList.stream().map(it-> Optional.ofNullable(it.getAvatar()).orElse("")
).collect(Collectors.toList());
res.put("signUserAvatarList",signUserAvatarList);
//当前用户是否已关注该通告主
Long userId=null;