package com.fs.course.mapper;

import com.fs.course.domain.FsUserCourseCommentLike;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 课堂评论点赞Mapper接口
 *
 * @author fs
 * @date 2024-05-15
 */
public interface FsUserCourseCommentLikeMapper
{
    /**
     * 查询课堂评论点赞
     *
     * @param id 课堂评论点赞主键
     * @return 课堂评论点赞
     */
    public FsUserCourseCommentLike selectFsUserCourseCommentLikeById(Long id);

    /**
     * 查询课堂评论点赞列表
     *
     * @param fsUserCourseCommentLike 课堂评论点赞
     * @return 课堂评论点赞集合
     */
    public List<FsUserCourseCommentLike> selectFsUserCourseCommentLikeList(FsUserCourseCommentLike fsUserCourseCommentLike);

    /**
     * 新增课堂评论点赞
     *
     * @param fsUserCourseCommentLike 课堂评论点赞
     * @return 结果
     */
    public int insertFsUserCourseCommentLike(FsUserCourseCommentLike fsUserCourseCommentLike);

    /**
     * 修改课堂评论点赞
     *
     * @param fsUserCourseCommentLike 课堂评论点赞
     * @return 结果
     */
    public int updateFsUserCourseCommentLike(FsUserCourseCommentLike fsUserCourseCommentLike);

    /**
     * 删除课堂评论点赞
     *
     * @param id 课堂评论点赞主键
     * @return 结果
     */
    public int deleteFsUserCourseCommentLikeById(Long id);

    /**
     * 批量删除课堂评论点赞
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFsUserCourseCommentLikeByIds(Long[] ids);
    @Select("SELECT id from fs_user_course_comment_like where user_id =#{userId} and comment_id =#{commentId} limit 1")
    FsUserCourseCommentLike selectFsUserCourseCommentLikeByUserIdAndCommentId(@Param("userId") Long userId,@Param("commentId") Long commentId);
}
