fix: 修复返回被回复人姓名不正确问题
This commit is contained in:
@@ -48,17 +48,21 @@ public class SchisandraShareCommentReplyDomainServiceImpl implements SchisandraS
|
||||
schisandraShareCommentReply.setReplyCount(0);
|
||||
schisandraShareCommentReply.setReplyType(1);
|
||||
schisandraShareCommentReply.setLikes(0L);
|
||||
Assert.notNull(schisandraShareCommentReply.getToId());
|
||||
|
||||
//查询to_user
|
||||
Assert.notNull(schisandraShareCommentReply.getToId());
|
||||
SchisandraShareCommentReply comment = schisandraShareCommentReplyService.queryById(schisandraShareCommentReply.getToId());
|
||||
int newReplyCount = comment.getReplyCount() + 1;
|
||||
comment.setReplyCount(newReplyCount);
|
||||
comment.setReplyCount(comment.getReplyCount() + 1);
|
||||
schisandraShareCommentReplyService.update(comment);
|
||||
schisandraShareCommentReply.setToUser(comment.getUserId());
|
||||
|
||||
Assert.notNull(schisandraShareCommentReply.getReplyId());
|
||||
//查询reply_user
|
||||
SchisandraShareCommentReply reply = schisandraShareCommentReplyService.queryById(schisandraShareCommentReply.getReplyId());
|
||||
reply.setReplyCount(reply.getReplyCount() + 1);
|
||||
schisandraShareCommentReplyService.update(reply);
|
||||
schisandraShareCommentReply.setReplyUser(reply.getUserId());
|
||||
|
||||
return schisandraShareCommentReplyService.insert(schisandraShareCommentReply) > 0;
|
||||
}
|
||||
|
||||
@@ -106,7 +110,8 @@ public class SchisandraShareCommentReplyDomainServiceImpl implements SchisandraS
|
||||
List<SchisandraShareCommentReplyBO> schisandraShareRepliesBO = SchisandraShareCommentReplyBOConverter.INSTANCE.convertEntityToBOList(schisandraShareReplies);
|
||||
schisandraShareRepliesBO.forEach(schisandraShareReplyBO -> {
|
||||
AuthUserInfoEntity userInfo = userRpc.getUserInfo(schisandraShareReplyBO.getUserId());
|
||||
schisandraShareReplyBO.setNickto(userInfo.getNickName());
|
||||
AuthUserInfoEntity userInfo2 = userRpc.getUserInfo(schisandraShareReplyBO.getReplyUser());
|
||||
schisandraShareReplyBO.setNickto(userInfo2.getNickName());
|
||||
schisandraShareReplyBO.setNick(userInfo.getNickName());
|
||||
schisandraShareReplyBO.setAvatar(userInfo.getAvatar());
|
||||
});
|
||||
|
Reference in New Issue
Block a user