blob: c47d3a860bcc7fa5181eca24d8dde73fd698fa0c [file] [log] [blame]
ym92355ec83a2025-06-03 17:15:13 +08001package com.pt5.pthouduan.service;
2
3import com.pt5.pthouduan.entity.Comment;
4
5import java.util.List;
6
7/**
8 * <p>
9 * 评论服务接口
10 * </p>
11 *
12 * 功能:增、删、改、查(按帖子ID)
13 *
14 * @author ym
15 * @since 2025-04-14
16 */
17public 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}