修复学员端,“文章”列表页,进入文章详情。对文章发表评论后,评论数量没有即时更新;对评论进行回复后,回复的数量没有在评论的数量统计即时更新,并且修复删除评论,评论数量不对

This commit is contained in:
王卓煜
2025-07-04 13:37:28 +08:00
parent 2a1c04ccb5
commit 7ad6da6f53

View File

@@ -88,9 +88,11 @@ public class CommentsServiceImpl implements ICommentsService{
@Override
public void deleteReply(String id,String parentId) {
Comments comment=dao.get(id);
dao.deleteById(id);
dao.updateMultiFieldById(parentId, UpdateBuilder.create("replys","replys-1",FieldUpdateType.EXPRESSION));
//需要同时回调处理,修改对应的内容的评论数量
callback.reduce(BoedxResourceType.toEnum(comment.getObjType()),comment.getObjId(),BoedxHitsField.Comments);
}
@Override