MCPcopy Create free account
hub / github.com/Raxcl/RBlog / CommentService

Interface CommentService

blog-api/src/main/java/cn/raxcl/service/CommentService.java:13–89  ·  view source on GitHub ↗

@author c-long.chan @date 2022-01-05 20:06:41

Source from the content-addressed store, hash-verified

11 * @date 2022-01-05 20:06:41
12 */
13public interface CommentService {
14
15 /**
16 * 根据页面分页查询评论列表
17 * @param page 页面分类(0普通文章,1关于我,2友链)
18 * @param blogId 如果page==0,需要博客id参数
19 * @param pageNum 页码
20 * @param pageSize 每页个数
21 * @param jwt 若文章受密码保护,需要获取访问Token
22 * @return Result
23 */
24 Map<String, Object> comments(Integer page, Long blogId, Integer pageNum, Integer pageSize, String jwt);
25
26 /**
27 * 提交评论
28 * @param commentDTO commentDTO
29 * @param request request
30 * @param jwt jwt
31 */
32 void postComment(CommentDTO commentDTO, HttpServletRequest request, String jwt);
33
34 /**
35 * 保存评论
36 * @param commentDTO commentDTO
37 */
38 void saveComment(CommentDTO commentDTO);
39
40 /**
41 * 后台管理页面查询评论list
42 * @param page 页面分类(0普通文章,1关于我,2友链)
43 * @param blogId 如果是博客文章页面 需要提供博客id
44 * @param parentCommentId 父评论id
45 * @return List<Comment>
46 */
47 List<Comment> getListByPageAndParentCommentId(Integer page, Long blogId, Long parentCommentId);
48
49
50 /**
51 * 更新评论公开状态
52 * @param commentId 评论id
53 * @param published 是否发版
54 */
55 void updateCommentPublishedById(Long commentId, Boolean published);
56
57 /**
58 * 更新评论接收邮件提醒状态
59 * @param commentId 评论id
60 * @param notice 是否通知
61 */
62 void updateCommentNoticeById(Long commentId, Boolean notice);
63
64 /**
65 * 按id删除该评论及其所有子评论
66 * @param commentId 评论id
67 */
68 void deleteCommentById(Long commentId);
69
70 /**

Callers 12

commentsMethod · 0.65
postCommentMethod · 0.65
postCommentMethod · 0.65
saveCommentMethod · 0.65
deleteCommentByIdMethod · 0.65
deleteMethod · 0.65
updateCommentMethod · 0.65
getCommentByIdMethod · 0.65

Implementers 1

CommentServiceImplblog-api/src/main/java/cn/raxcl/servic

Calls

no outgoing calls

Tested by

no test coverage detected