package com.gkhy.exam.system.mapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.gkhy.exam.system.domain.ExCourseChapterPeriod;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
|
import java.util.List;
|
|
/**
|
* <p>
|
* 课时信息表 Mapper 接口
|
* </p>
|
*
|
* @author kzy
|
* @since 2024-06-05 15:07:36
|
*/
|
@Mapper
|
public interface ExCourseChapterPeriodMapper extends BaseMapper<ExCourseChapterPeriod> {
|
|
/**
|
* 根据id查询课时信息
|
* @param periodId
|
* @return
|
*/
|
ExCourseChapterPeriod selectPeriodById(Long periodId);
|
|
/**
|
* 校验课时名称是否唯一
|
* @param name
|
* @param chapterId
|
* @param courseId
|
* @return
|
*/
|
ExCourseChapterPeriod checkNameUnique(@Param("name") String name, @Param("chapterId")Long chapterId, @Param("courseId")Long courseId);
|
|
/**
|
* 根据章节id查找课时
|
* @param chapterId
|
* @return
|
*/
|
List<ExCourseChapterPeriod> selectPeriodByChapterId(Long chapterId);
|
|
/**
|
* 根据章节id删除课时
|
* @param chapterId
|
* @return
|
*/
|
int deletePeriodByChapterId(Long chapterId);
|
|
/**
|
* 根据课程id获取课时数量
|
* @param courseId
|
* @return
|
*/
|
int selectCountByCourseId(Long courseId);
|
}
|