package com.qmth.distributed.print.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.distributed.print.business.bean.result.DictionaryResult;
import com.qmth.distributed.print.business.bean.result.ObeCourseBasicInfoResult;
import com.qmth.distributed.print.business.bean.result.ObeCourseOutlineResult;
import com.qmth.distributed.print.business.entity.ObeCourseOutline;
import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 课程大纲表 Mapper 接口
 * </p>
 *
 * @author CaoZixuan
 * @since 2024-06-05
 */
public interface ObeCourseOutlineMapper extends BaseMapper<ObeCourseOutline> {

    IPage<ObeCourseOutlineResult> findObeCourseOutlinePage(@Param("iPage") Page<ObeCourseOutlineResult> iPage,
            @Param("professionalId") Long professionalId, @Param("cultureProgramId") Long cultureProgramId, @Param("courseId") Long courseId,
            @Param("courseOutlineName") String courseOutlineName, @Param("dpr") DataPermissionRule dpr);

    /**
     * 查询课程基本信息
     *
     * @param obeCourseOutlineId 课程大纲id
     * @return 课程基本信息
     */
    ObeCourseBasicInfoResult findCourseBasicInfo(@Param("obeCourseOutlineId") Long obeCourseOutlineId);

    /**
     * 查询可选培养方案
     *
     * @param dpr 数据权限
     * @return 可选培养方案
     */
    List<DictionaryResult> findCanChooseCultureProgram(@Param("dpr") DataPermissionRule dpr);

    /**
     * 查询可选课程
     *
     * @param obeCultureProgramId 培养方案id
     * @return 可选课程
     */
    List<DictionaryResult> findCanChooseCourse(@Param("obeCultureProgramId") Long obeCultureProgramId);
}
