🎨 评论分享链接格式修改
This commit is contained in:
parent
22979810e5
commit
af17c90ef4
@ -8,6 +8,9 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ronger
|
||||||
|
*/
|
||||||
public interface CommentService extends Service<Comment> {
|
public interface CommentService extends Service<Comment> {
|
||||||
|
|
||||||
List<CommentDTO> getArticleComments(Integer idArticle);
|
List<CommentDTO> getArticleComments(Integer idArticle);
|
||||||
|
@ -83,7 +83,7 @@ public class CommentServiceImpl extends AbstractService<Comment> implements Comm
|
|||||||
comment.setCreatedTime(new Date());
|
comment.setCreatedTime(new Date());
|
||||||
commentMapper.insertSelective(comment);
|
commentMapper.insertSelective(comment);
|
||||||
StringBuilder commentSharpUrl = new StringBuilder(article.getArticlePermalink());
|
StringBuilder commentSharpUrl = new StringBuilder(article.getArticlePermalink());
|
||||||
commentSharpUrl.append("/comment/").append(comment.getIdComment());
|
commentSharpUrl.append("#comment-").append(comment.getIdComment());
|
||||||
commentMapper.updateCommentSharpUrl(comment.getIdComment(), commentSharpUrl.toString());
|
commentMapper.updateCommentSharpUrl(comment.getIdComment(), commentSharpUrl.toString());
|
||||||
|
|
||||||
String commentContent = comment.getCommentContent();
|
String commentContent = comment.getCommentContent();
|
||||||
|
Loading…
Reference in New Issue
Block a user