ym923 | 55ec83a | 2025-06-03 17:15:13 +0800 | [diff] [blame^] | 1 | package com.pt5.pthouduan.service; |
| 2 | |
| 3 | import com.pt5.pthouduan.entity.Comment; |
| 4 | |
| 5 | import java.util.List; |
| 6 | |
| 7 | /** |
| 8 | * <p> |
| 9 | * 评论服务接口 |
| 10 | * </p> |
| 11 | * |
| 12 | * 功能:增、删、改、查(按帖子ID) |
| 13 | * |
| 14 | * @author ym |
| 15 | * @since 2025-04-14 |
| 16 | */ |
| 17 | public interface CommentService { |
| 18 | |
| 19 | // 创建评论 |
| 20 | Comment createComment(Comment comment); |
| 21 | |
| 22 | // 删除评论 |
| 23 | boolean deleteComment(Integer commentid); |
| 24 | |
| 25 | // 更新评论 |
| 26 | boolean updateComment(Comment comment); |
| 27 | |
| 28 | // 根据帖子ID获取所有评论 |
| 29 | List<Comment> getCommentsByPostId(Integer postid); |
| 30 | |
| 31 | // 点赞评论 |
| 32 | boolean likeComment(Integer commentid); |
| 33 | |
| 34 | // 取消点赞评论 |
| 35 | boolean unlikeComment(Integer commentid); |
| 36 | |
| 37 | } |