package com.qmth.themis.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.themis.business.bean.admin.OpenExamCourseBean;
import com.qmth.themis.business.cache.bean.ExamCourseCacheBean;
import com.qmth.themis.business.dto.response.TEExamCourseDto;
import com.qmth.themis.business.entity.TEExamCourse;

import java.util.List;
import java.util.Map;

/**
 * @Description: 考试科目 服务类
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/6/25
 */
public interface TEExamCourseService extends IService<TEExamCourse> {

    /**
     * 查询考试科目
     *
     * @param iPage
     * @param id
     * @param examId
     * @param courseCode
     * @param courseName
     * @param hasPaper
     * @return
     */
    public IPage<TEExamCourseDto> examCourseQuery(IPage<Map> iPage, Long id, Long examId, String courseCode, String courseName, Integer hasPaper);

    ExamCourseCacheBean getExamCourseCacheBean(Long examId, String courseCode);

    /**
     * 更新科目缓存
     *
     * @param examId
     * @param courseCode
     * @return
     */
    ExamCourseCacheBean updateExamCourseCacheBean(Long examId, String courseCode);

    /**
     * 删除科目缓存
     *
     * @param examId
     * @param courseCode
     */
    void deleteExamCourseCacheBean(Long examId, String courseCode);

    TEExamCourse findByExamIdAndCourseCode(Long examId, String courseCode);

	public IPage<OpenExamCourseBean> examCourseQueryForOpen(Page<OpenExamCourseBean> ipage, Long examId,
			String courseCode, Boolean hasPaper);
}
