package com.yonge.cooleshow.biz.dal.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonSearch;
import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupDetailUpVo;
import com.yonge.cooleshow.biz.dal.vo.VideoLessonGroupDetailVo;
import com.yonge.cooleshow.biz.dal.vo.VideoLessonPurchaseStudent;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * VideoLessonGroupDetailDao数据库访问类
 * @author yzp
 * @date 2022-03-25 23:46:28
 * @version v1.0
 **/
public interface VideoLessonGroupDetailDao extends BaseMapper<VideoLessonGroupDetail> {
    //查询视频课
    List<VideoLessonGroupDetail> selectPage(IPage page,@Param("param") VideoLessonSearch query);

    //根据组id查询购买用户
    List<VideoLessonPurchaseStudent> selectPageStudent(IPage page,@Param("param")  VideoLessonSearch query);

    //新增视频课
    void insertVideoLesson(List<VideoLessonGroupDetail> list);

    //修改视频课
    void updateDetail(VideoLessonGroupDetailUpVo detailUpVo);

    //根据组id删除视频课
    void deleteByGroupId(Long groupId);

    List<VideoLessonGroupDetailVo> selectPageAuth(IPage page, @Param("param") VideoLessonSearch query);
}