From af17c90ef4feaffa3103503adc1c022fc682defa Mon Sep 17 00:00:00 2001 From: x ronger Date: Tue, 4 Aug 2020 21:00:54 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E8=AF=84=E8=AE=BA=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/rymcu/vertical/service/CommentService.java | 3 +++ .../com/rymcu/vertical/service/impl/CommentServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rymcu/vertical/service/CommentService.java b/src/main/java/com/rymcu/vertical/service/CommentService.java index 5324a42..f859f25 100644 --- a/src/main/java/com/rymcu/vertical/service/CommentService.java +++ b/src/main/java/com/rymcu/vertical/service/CommentService.java @@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletRequest; import java.util.List; import java.util.Map; +/** + * @author ronger + */ public interface CommentService extends Service { List getArticleComments(Integer idArticle); diff --git a/src/main/java/com/rymcu/vertical/service/impl/CommentServiceImpl.java b/src/main/java/com/rymcu/vertical/service/impl/CommentServiceImpl.java index f7268e1..b6aab70 100644 --- a/src/main/java/com/rymcu/vertical/service/impl/CommentServiceImpl.java +++ b/src/main/java/com/rymcu/vertical/service/impl/CommentServiceImpl.java @@ -83,7 +83,7 @@ public class CommentServiceImpl extends AbstractService implements Comm comment.setCreatedTime(new Date()); commentMapper.insertSelective(comment); StringBuilder commentSharpUrl = new StringBuilder(article.getArticlePermalink()); - commentSharpUrl.append("/comment/").append(comment.getIdComment()); + commentSharpUrl.append("#comment-").append(comment.getIdComment()); commentMapper.updateCommentSharpUrl(comment.getIdComment(), commentSharpUrl.toString()); String commentContent = comment.getCommentContent();