package com.xunwang.education.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xunwang.education.entity.TeacherCourses;
import com.xunwang.education.entity.dto.MyPublishTeacherCoursesDto;
import com.xunwang.education.entity.dto.MyTeacherCourseDetailDto;
import com.xunwang.education.entity.dto.MyTeacherCoursesDto;
import com.xunwang.education.entity.vo.TeacherList;
import com.xunwang.education.entity.vo.TeacherListQuery;
import com.xunwang.education.entity.vo.ViewCountVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * <p>
 * 老师课程发布 Mapper 接口
 * </p>
 *
 * @author Long
 * @since 2022-11-29
 */
public interface TeacherCoursesMapper extends BaseMapper<TeacherCourses> {

    // 根据条件查询老师列表
    List<MyTeacherCoursesDto> selectTeachers(@Param("obj") TeacherListQuery obj);

    int getTeacherViewCount(String uid);

    List<TeacherCourses> getTeacherCourseId(String uid);

    // 批量查询
    List<MyTeacherCoursesDto> selectByBatch(@Param("list") List<String> list);

    /**
     * 查询个人发布课程
     * @param uid
     * @return
     */
    List<MyPublishTeacherCoursesDto> selectPublishCourseList(String uid);

    /**
     * 查询个人课程详情信息
     * @param courseId
     * @return
     */
    MyTeacherCourseDetailDto getPersonCourseDetailById(String courseId);

    void batchupdate(@Param("list") List<ViewCountVo> list);
}
