diff --git a/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java b/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java index 6a8789f..2fc19f9 100644 --- a/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java @@ -274,10 +274,8 @@ public class ArticleServiceImpl extends AbstractService
implements Arti if (Objects.isNull(user)) { throw new BaseApiException(ErrorCode.INVALID_TOKEN); } - StringBuilder shareUrl = new StringBuilder(article.getArticlePermalink()); - shareUrl.append("?s=").append(user.getAccount()); - Map map = new HashMap(1); - map.put("shareUrl", shareUrl.toString()); + Map map = new HashMap(2); + map.put("shareUrl", article.getArticlePermalink() + "?s=" + user.getAccount()); return map; }