package com.yida.data.school.secondClass.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yida.data.common.core.entity.school.secondClass.EduSecondClassCourseContent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yida.data.school.dto.secondClass.ListCourseContentDTO;
import com.yida.data.school.vo.secondClass.CourseContentVO;
import org.apache.ibatis.annotations.Param;

/**
 *  Mapper
 *
 * @author zhanghaijun
 * @date 2022-04-11 11:09:15
 */
public interface EduSecondClassCourseContentMapper extends BaseMapper<EduSecondClassCourseContent> {

    /**
     * 分页查询课程内容
     * @param page
     * @param dto
     * @return
     */
    IPage<CourseContentVO> listContentPage(Page page, @Param("dto") ListCourseContentDTO dto);


    /**
     * 修改排序
     * @param courseId
     * @param id 变更的内容id
     * @param step 排序变更步长
     * @param start 排序变更起始位置
     * @param end 排序变更结束位置
     */
    void changeSort(@Param("courseId") Long courseId, @Param("id") Long id, @Param("step") Integer step,
        @Param("start") Integer start, @Param("end") Integer end);
}
