From d965c63b0fe7b0488b4e9004f8b30cf9216e91f5 Mon Sep 17 00:00:00 2001 From: wangqing <408564126@qq.com> Date: Wed, 13 Mar 2024 15:24:32 +0800 Subject: [PATCH] fix user message nickname update --- .../luoo/user/controller/UserMessageController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/luoo_user/src/main/java/com/luoo/user/controller/UserMessageController.java b/luoo_user/src/main/java/com/luoo/user/controller/UserMessageController.java index 21290e6..578155c 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/UserMessageController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/UserMessageController.java @@ -85,6 +85,19 @@ public class UserMessageController extends BaseController { UserMessage userMessageComment = userMessageService.findByUseridAndType(userId,MessageTypeEnum.COMMENT.getType());// 评论 UserMessage userMessageFollow = userMessageService.findByUseridAndType(userId,MessageTypeEnum.FOLLOW.getType());// UserMessage userMessageThumbup = userMessageService.findByUseridAndType(userId,MessageTypeEnum.THUMB_UP.getType());// + if (userMessageComment != null) { + UserInfo userInfo1 = userInfoService.findById(userMessageComment.getSendUserId()); + userMessageComment.setContent(userInfo1.getNickName()+ " 回复了你的评论"); + } + if (userMessageFollow != null) { + UserInfo userInfo2 = userInfoService.findById(userMessageFollow.getSendUserId()); + userMessageFollow.setContent(userInfo2.getNickName()+" 关注了你"); + } + + if(userMessageThumbup !=null) { + UserInfo userInfo3 = userInfoService.findById(userMessageThumbup.getSendUserId()); + userMessageThumbup.setContent(userInfo3.getNickName()+ " 点赞了你的评论"); + } map.put("comment",userMessageComment); map.put("follow",userMessageFollow); map.put("thumbup",userMessageThumbup);