CommentService.java 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. package nju.seec.helper.service;
  2. import nju.seec.helper.dto.CommentDTO;
  3. import nju.seec.helper.dto.LoginUser;
  4. import nju.seec.helper.vo.CommentVO;
  5. import org.springframework.data.domain.Page;
  6. import org.springframework.data.domain.Pageable;
  7. /**
  8. * @author cst
  9. */
  10. public interface CommentService {
  11. /**
  12. * 创建评论
  13. *
  14. * @param user
  15. * @param commentDTO
  16. * @return
  17. */
  18. CommentVO createComment(LoginUser user, CommentDTO commentDTO);
  19. /**
  20. * 删除评论
  21. *
  22. * @param user
  23. * @param commentId
  24. */
  25. void removeComment(LoginUser user, Long commentId);
  26. /**
  27. * 置顶评论
  28. *
  29. * @param user
  30. * @param commentId
  31. */
  32. void topComment(LoginUser user, Long commentId);
  33. /**
  34. * 取消置顶
  35. *
  36. * @param user
  37. * @param commentId
  38. */
  39. void unTopComment(LoginUser user, Long commentId);
  40. /**
  41. * 基于课件和页码数获取评论
  42. *
  43. * @param slideId
  44. * @param pageNumber
  45. * @param pageable
  46. * @return
  47. */
  48. Page<CommentVO> getCommentsBySlideAndPageNumber(Long slideId, Integer pageNumber, Pageable pageable);
  49. /**
  50. * 获得某条评论
  51. *
  52. * @param commentId
  53. * @return
  54. */
  55. CommentVO getOneComment(Long commentId);
  56. }