package com.qmth.paper.library.common.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.paper.library.common.bean.result.BasicSemesterResult;
import com.qmth.paper.library.common.entity.BasicSemester;
import org.apache.ibatis.annotations.Param;

import java.util.Set;

/**
 * <p>
 * 学期字典表 Mapper 接口
 * </p>
 */
public interface BasicSemesterMapper extends BaseMapper<BasicSemester> {
    /**
     * 基础学期分页查询
     */
    IPage<BasicSemesterResult> findBasicSemesterPage(@Param("iPage") Page<BasicSemesterResult> iPage,
                                                     @Param("schoolId") Long schoolId,
                                                     @Param("orgIds") Set<Long> orgIds);

    /**
     * 根据学期id查询考试数量
     */
    int countBasicExamBySemesterId(@Param("semesterId") Long semesterId);
}
