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

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonge.cooleshow.auth.api.entity.SysUser;
import com.yonge.cooleshow.biz.dal.dto.VideoLessonGroupDetailDto;
import com.yonge.cooleshow.biz.dal.dto.search.VideoLessonSearch;
import com.yonge.cooleshow.biz.dal.entity.CourseRelationMusicAlbum;
import com.yonge.cooleshow.biz.dal.entity.VideoLessonGroupDetail;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.biz.dal.vo.*;
import com.yonge.cooleshow.biz.dal.wrapper.course.CourseRelationWrapper;

import java.util.List;

/**
 * VideoLessonGroupDetailService服务类
 * @author yzp
 * @date 2022-03-25 23:46:28
 * @version v1.0
 **/
public interface VideoLessonGroupDetailService extends IService<VideoLessonGroupDetail> {
    IPage<VideoLessonGroupDetailVo> selectPage(IPage<VideoLessonGroupDetailVo> page, VideoLessonSearch query);

    IPage<VideoLessonPurchaseStudent> selectPageStudent(IPage<VideoLessonPurchaseStudent> page, VideoLessonSearch query);

    void insertVideoLesson(List<VideoLessonGroupDetailDto> videoLessonList, SysUser sysUser);

    void updateDetail(VideoLessonGroupDetailUpVo detailUpVo, SysUser sysUser);

    void deleteDetail(Long id);

    VideoLessonStudentVo selectVideoLesson(Long groupId,Long userId);

    /**
     * 课程关联曲目/专辑信息
     * @param recordInfos
     * @return List<CourseRelationWrapper.MusicAlbumInfo>
     */
    List<CourseRelationWrapper.MusicAlbumInfo> getCourseRelationMusicAlbumInfos(List<CourseRelationMusicAlbum> recordInfos);

    /**
     * 填充课程关联曲目、专辑信息
     * @param lessonStudentVo VideoLessonStudentVo
     * @param musicAlbumInfos List<CourseRelationWrapper.MusicAlbumInfo>
     */
    void updateCourseRelationMusicAlbumInfo(List<VideoLessonGroupDetailDto> lessonStudentVo,
                                            List<CourseRelationWrapper.MusicAlbumInfo> musicAlbumInfos);

}