评论管理接口
| 15 | * |
| 16 | */ |
| 17 | public interface CommentRepository extends DAO<Comment> { |
| 18 | /** |
| 19 | * 根据评论Id查询评论 |
| 20 | * @param commentId 评论Id |
| 21 | * @return |
| 22 | */ |
| 23 | public Comment findByCommentId(Long commentId); |
| 24 | /** |
| 25 | * 根据评论Id集合查询评论 |
| 26 | * @param commentIdList 评论Id集合 |
| 27 | * @return |
| 28 | */ |
| 29 | public List<Comment> findByCommentIdList(List<Long> commentIdList); |
| 30 | /** |
| 31 | * 根据评论Id查询评论在表的第几行 |
| 32 | * @param commentId 评论Id |
| 33 | * @param topicId 话题Id |
| 34 | * @return |
| 35 | */ |
| 36 | public Long findRowByCommentId(Long commentId,Long topicId); |
| 37 | /** |
| 38 | * 根据评论Id查询评论在表的第几行 |
| 39 | * @param commentId 评论Id |
| 40 | * @param topicId 话题Id |
| 41 | * @param status 状态 |
| 42 | * @param sort 按发表时间排序 1.desc 2.asc |
| 43 | * @return |
| 44 | */ |
| 45 | public Long findRowByCommentId(Long commentId,Long topicId,Integer status,Integer sort); |
| 46 | /** |
| 47 | * 分页查询评论内容 |
| 48 | * @param firstIndex 索引开始 |
| 49 | * @param maxResult 获取数量 |
| 50 | * @param userName 用户名称 |
| 51 | * @param isStaff 是否为员工 |
| 52 | * @return |
| 53 | */ |
| 54 | public List<String> findCommentContentByPage(int firstIndex, int maxResult,String userName,boolean isStaff); |
| 55 | /** |
| 56 | * 分页查询评论 |
| 57 | * @param userName 用户名称 |
| 58 | * @param postTime 评论发表时间 |
| 59 | * @param firstIndex 索引开始 |
| 60 | * @param maxResult 获取数量 |
| 61 | * @return |
| 62 | */ |
| 63 | public List<Comment> findCommentByPage(String userName, LocalDateTime postTime, int firstIndex, int maxResult); |
| 64 | /** |
| 65 | * 查询用户是否评论话题 |
| 66 | * @param topicId 话题Id |
| 67 | * @param userName 用户名称 |
| 68 | * @return |
| 69 | */ |
| 70 | public Boolean findWhetherCommentTopic(Long topicId,String userName); |
| 71 | /** |
| 72 | * 保存评论 |
| 73 | * @param comment 评论 |
| 74 | */ |
no outgoing calls
no test coverage detected
searching dependent graphs…