用户账号不存在的情况下获取评论报错
This commit is contained in:
@@ -106,7 +106,11 @@ public class MessageCenterServiceImpl extends ServiceImpl<NotificationMapper, No
|
||||
IPage<NotificationVO> convert = notificationPage.convert(o -> {
|
||||
NotificationVO notificationVO = CopyUtil.copyObject(o, NotificationVO.class);
|
||||
Account senderAccount = accountService.getById(notificationVO.getSenderId());
|
||||
notificationVO.setUserName(senderAccount.getUserName());
|
||||
if (Objects.nonNull(senderAccount)){
|
||||
notificationVO.setUserName(senderAccount.getUserName());
|
||||
}else {
|
||||
notificationVO.setUserName("--");
|
||||
}
|
||||
// notificationVO.setSenderUserAvatar(StringUtils.isNullOrEmpty(senderAccount.getAvatar()) ? null : minioUtil.getPreSignedUrl(senderAccount.getAvatar(), CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
|
||||
if (Objects.isNull(notificationVO.getPortfolioId())){
|
||||
notificationVO.setPortfolioId(null);
|
||||
|
||||
Reference in New Issue
Block a user