@author c-long.chan @date 2022-01-05 20:06:41
| 11 | * @date 2022-01-05 20:06:41 |
| 12 | */ |
| 13 | public 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 | /** |
no outgoing calls
no test coverage detected