fix user logOff

main
wangqing 7 months ago
parent c3ec72200f
commit 25fe4dba55

@ -518,15 +518,15 @@ public class MyController extends BaseController {
} }
// 删除账号 // 删除账号
UserInfo userInfo = userInfoService.findById(userId); // UserInfo userInfo = userInfoService.findById(userId);
userInfo.setMobile("已注销"); // userInfo.setMobile("已注销");
userInfo.setAvatar(Constants.DEFAULT_USER_AVATAR); // userInfo.setAvatar(Constants.DEFAULT_USER_AVATAR);
userInfo.setWxId(""); // userInfo.setWxId("");
userInfo.setAppleId(""); // userInfo.setAppleId("");
userInfo.setAppleEmail(""); // userInfo.setAppleEmail("");
userInfo.setWxNickname(""); // userInfo.setWxNickname("");
userInfoService.update(userInfo); // userInfoService.update(userInfo);
// userInfoService.deleteById(userId); userInfoService.deleteById(userId);
return Result.success(); return Result.success();
} }

@ -85,19 +85,26 @@ public class UserMessageController extends BaseController {
UserMessage userMessageComment = userMessageService.findByUseridAndType(userId,MessageTypeEnum.COMMENT.getType());// 评论 UserMessage userMessageComment = userMessageService.findByUseridAndType(userId,MessageTypeEnum.COMMENT.getType());// 评论
UserMessage userMessageFollow = userMessageService.findByUseridAndType(userId,MessageTypeEnum.FOLLOW.getType());// UserMessage userMessageFollow = userMessageService.findByUseridAndType(userId,MessageTypeEnum.FOLLOW.getType());//
UserMessage userMessageThumbup = userMessageService.findByUseridAndType(userId,MessageTypeEnum.THUMB_UP.getType());// UserMessage userMessageThumbup = userMessageService.findByUseridAndType(userId,MessageTypeEnum.THUMB_UP.getType());//
if (userMessageComment != null) { if (null != userMessageComment) {
UserInfo userInfo1 = userInfoService.findById(userMessageComment.getSendUserId()); UserInfo userInfo1 = userInfoService.findById(userMessageComment.getSendUserId());
if(null != userInfo1) {
userMessageComment.setContent(userInfo1.getNickName() + " 回复了你的评论"); userMessageComment.setContent(userInfo1.getNickName() + " 回复了你的评论");
} }
if (userMessageFollow != null) { }
if (null != userMessageFollow ) {
UserInfo userInfo2 = userInfoService.findById(userMessageFollow.getSendUserId()); UserInfo userInfo2 = userInfoService.findById(userMessageFollow.getSendUserId());
if(null != userInfo2) {
userMessageFollow.setContent(userInfo2.getNickName() + " 关注了你"); userMessageFollow.setContent(userInfo2.getNickName() + " 关注了你");
} }
}
if(userMessageThumbup !=null) { if(null != userMessageThumbup) {
UserInfo userInfo3 = userInfoService.findById(userMessageThumbup.getSendUserId()); UserInfo userInfo3 = userInfoService.findById(userMessageThumbup.getSendUserId());
if(null != userInfo3) {
userMessageThumbup.setContent(userInfo3.getNickName()+ " 点赞了你的评论"); userMessageThumbup.setContent(userInfo3.getNickName()+ " 点赞了你的评论");
} }
}
map.put("comment",userMessageComment); map.put("comment",userMessageComment);
map.put("follow",userMessageFollow); map.put("follow",userMessageFollow);
map.put("thumbup",userMessageThumbup); map.put("thumbup",userMessageThumbup);

Loading…
Cancel
Save