package com.fs.course.service;

import java.util.List;

import com.fs.common.core.domain.R;
import com.fs.course.domain.FsUserVideoComment;
import com.fs.course.param.FsUserVideoCommentAddUParam;
import com.fs.course.param.FsUserVideoCommentDelUParam;
import com.fs.course.param.FsUserVideoCommentUParam;
import com.fs.course.vo.FsUserVideoCommentListUVO;
import io.swagger.models.auth.In;

/**
 * 课堂视频评论Service接口
 *
 * @author fs
 * @date 2024-05-15
 */
public interface IFsUserVideoCommentService
{
    /**
     * 查询课堂视频评论
     *
     * @param commentId 课堂视频评论主键
     * @return 课堂视频评论
     */
    public FsUserVideoComment selectFsUserVideoCommentByCommentId(Long commentId);

    /**
     * 查询课堂视频评论列表
     *
     * @param fsUserVideoComment 课堂视频评论
     * @return 课堂视频评论集合
     */
    public List<FsUserVideoComment> selectFsUserVideoCommentList(FsUserVideoComment fsUserVideoComment);

    /**
     * 新增课堂视频评论
     *
     * @param fsUserVideoComment 课堂视频评论
     * @return 结果
     */
    public int insertFsUserVideoComment(FsUserVideoComment fsUserVideoComment);

    /**
     * 修改课堂视频评论
     *
     * @param fsUserVideoComment 课堂视频评论
     * @return 结果
     */
    public int updateFsUserVideoComment(FsUserVideoComment fsUserVideoComment);

    /**
     * 批量删除课堂视频评论
     *
     * @param commentIds 需要删除的课堂视频评论主键集合
     * @return 结果
     */
    public int deleteFsUserVideoCommentByCommentIds(Long[] commentIds);

    /**
     * 删除课堂视频评论信息
     *
     * @param commentId 课堂视频评论主键
     * @return 结果
     */
    public int deleteFsUserVideoCommentByCommentId(Long commentId);

    R addComment(FsUserVideoCommentAddUParam param);

    List<FsUserVideoCommentListUVO> getComments(FsUserVideoCommentUParam param);

    List<FsUserVideoCommentListUVO> getReplies(FsUserVideoCommentUParam param);

//    int updateLikes(String commentCode, Integer type);

    R delComment(FsUserVideoCommentDelUParam param);

    void syncCommentsToDatabase();

    void syncRepliesToDatabase();

    /**
     * 将 Redis 中待同步的视频评论数写入数据库（使用索引，避免 KEYS）
     */
    void syncCommentCountToDatabase();

}
