package com.ly.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ly.domain.Comment;
import com.ly.domain.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommentDao extends BaseMapper<Comment> {
    @Select("select c.*,u.nickname,u.avatar_url from t_comment c left join user u on c.user_id = u.id " +
            "where c.article_id = #{articleId} order by id desc")
    List<Comment> findCommentDetail(@Param("articleId") Integer articleId);

}

