Commit f3513709 authored by 刘基明's avatar 刘基明

添加评论返回

parent 1250055d
...@@ -61,6 +61,7 @@ public class CommentManager { ...@@ -61,6 +61,7 @@ public class CommentManager {
throw new IllegalArgumentException("评论内容不能超过500字"); throw new IllegalArgumentException("评论内容不能超过500字");
} }
LocalDateTime now = LocalDateTime.now();
CommentEntity commentEntity = CommentEntity.builder() CommentEntity commentEntity = CommentEntity.builder()
.themeId(req.getThemeId()) .themeId(req.getThemeId())
.parentId(req.getParentId()) .parentId(req.getParentId())
...@@ -68,7 +69,8 @@ public class CommentManager { ...@@ -68,7 +69,8 @@ public class CommentManager {
.authorId(userId) .authorId(userId)
.content(req.getComment()) .content(req.getComment())
.commentType(CommentTypeEnum.THEME.getCode()) .commentType(CommentTypeEnum.THEME.getCode())
.createTime(LocalDateTime.now()) .createTime(now)
.updateTime(now)
.build(); .build();
commentService.insertComment(commentEntity); commentService.insertComment(commentEntity);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment