58 lines
1.3 KiB
Java
58 lines
1.3 KiB
Java
package com.emotionmuseum.service;
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.emotionmuseum.dto.Result;
|
|
import com.emotionmuseum.dto.comment.CommentRequest;
|
|
import com.emotionmuseum.dto.comment.CommentResponse;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* 评论服务接口
|
|
*
|
|
* @author emotion-museum
|
|
* @version 1.0.0
|
|
* @since 2024-01-01
|
|
*/
|
|
public interface CommentService {
|
|
|
|
/**
|
|
* 创建评论
|
|
*/
|
|
Result<CommentResponse> createComment(String userId, CommentRequest request);
|
|
|
|
/**
|
|
* 获取内容评论列表
|
|
*/
|
|
Result<IPage<CommentResponse>> getContentComments(String contentType, String contentId, int page, int size);
|
|
|
|
/**
|
|
* 获取评论详情
|
|
*/
|
|
Result<CommentResponse> getCommentById(String commentId);
|
|
|
|
/**
|
|
* 删除评论
|
|
*/
|
|
Result<String> deleteComment(String userId, String commentId);
|
|
|
|
/**
|
|
* 点赞评论
|
|
*/
|
|
Result<String> likeComment(String userId, String commentId);
|
|
|
|
/**
|
|
* 取消点赞评论
|
|
*/
|
|
Result<String> unlikeComment(String userId, String commentId);
|
|
|
|
/**
|
|
* 获取用户评论列表
|
|
*/
|
|
Result<IPage<CommentResponse>> getUserComments(String userId, int page, int size);
|
|
|
|
/**
|
|
* 获取评论回复列表
|
|
*/
|
|
Result<List<CommentResponse>> getCommentReplies(String commentId);
|
|
} |