package com.xjrsoft.module.courseTable.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseService;
import com.xjrsoft.module.courseTable.dto.UserEnrollDto;
import com.xjrsoft.module.courseTable.dto.AddSecondCourseDto;
import com.xjrsoft.module.courseTable.dto.SecondCourseEnrollPageDto;
import com.xjrsoft.module.courseTable.dto.SecondCoursePageDto;
import com.xjrsoft.module.courseTable.dto.UpdateSecondCourseDto;
import com.xjrsoft.module.courseTable.entity.SecondCourse;
import com.xjrsoft.module.courseTable.vo.SecondCourseEnrollVo;
import com.xjrsoft.module.courseTable.vo.SecondCoursePageVo;

import java.util.List;

/**
* @title: 第二课堂
* @Author dzx
* @Date: 2024-07-29
* @Version 1.0
*/

public interface ISecondCourseService extends MPJBaseService<SecondCourse> {
    /**
    * 新增
    */
    Boolean add(AddSecondCourseDto dto);

    /**
    * 更新
    */
    Boolean update(UpdateSecondCourseDto dto);

    /**
    * 删除
    *
    * @param ids
    * @return
    */
    Boolean delete(List<Long> ids);


    Page<SecondCoursePageVo> getPage(Page<SecondCoursePageVo> page, SecondCoursePageDto dto);

    Integer getEnrollCount(Long secondCourseId);

    Page<SecondCourseEnrollVo> getEnrollPage(Page<SecondCourseEnrollVo> page, SecondCourseEnrollPageDto dto);

    List<SecondCourseEnrollVo> getEnrollList( SecondCourseEnrollPageDto dto);

    Boolean enroll(UserEnrollDto dto);

    Page<SecondCoursePageVo> getMyPage(Page<SecondCoursePageVo> page, SecondCoursePageDto dto);
}
