package com.sqx.modules.course.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sqx.modules.course.entity.CourseComment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CourseCommentDao extends BaseMapper<CourseComment> {

    int updateCourseComment(@Param("type") Integer type, @Param("courseCommentId") Long courseCommentId);

    List<CourseComment> selectCourseComment(@Param("courseId") Long courseId, @Param("userId") Long userId);

    /**
     * 删除评论的点赞关联
     * @param courseCommentId
     * @return
     */
    int deleteCommentGood(@Param("courseCommentId") Long courseCommentId);

    List<Map<String,Object>> selectCourseCommentByUserId(@Param("userId") Long userId);


}
