package com.ynfy.buss.course.coursecatalog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ynfy.buss.course.coursecatalog.entity.CourseCatalog;

import java.util.List;

/**
 * @Description: course_catalog
 * @Author: jeecg-boot
 * @Date: 2023-10-24
 * @Version: V1.0
 */
public interface ICourseCatalogService extends IService<CourseCatalog> {

    void remove(String courseId);

    void saveAll(String courseId, List<CourseCatalog> catalogList);


    /**
     * 根据课程id获取目录
     *
     * @param courseId
     * @return
     */
    List<CourseCatalog> listByCourseId(String courseId);


    /**
     * 检查上一个任务是否完成
     *
     * @param id
     * @return
     */
    boolean checkPreTaskComplete(String id);


    /**
     * 获取课程任务
     *
     * @param courseId
     * @return
     */
    List<CourseCatalog> listCourseCatalog(String courseId);

}
