package com.ssj.service.sys.parent.service;
import com.ssj.bean.sys.parent.domain.SSJTermtrainQuestion;
import com.ssj.framework.core.common.service.BaseService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;


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

public interface SSJTermtrainQuestionService extends BaseService<SSJTermtrainQuestion, String> {
    /**
     * 查找去重后的所有版本
     *
     * @param courseName
     * @param grade
     * @return
     */
    List<String> findDistinctBookName(String courseName, String grade);

    /**
     * 查找去重后的省
     *
     * @param courseName
     * @param grade
     * @param bookName
     * @return
     */
    List<SSJTermtrainQuestion> findDistinctProvince(String courseName, String grade, String bookName);

    /**
     * 查找去重后的城市
     *
     * @param courseName
     * @param grade
     * @param bookName
     * @param province
     * @return
     */
    List<SSJTermtrainQuestion> findDistinctCity(String courseName, String grade, String bookName, String province);

    /**
     * 查找去重后的城市
     *
     * @param courseName
     * @param grade
     * @param bookName
     * @param province
     * @param city
     * @return
     */
    List<SSJTermtrainQuestion> findDistinctArea(String courseName, String grade, String bookName, String province, String city);

    /**
     * 查找去重后的年
     *
     * @param courseName
     * @param grade
     * @param bookName
     * @param province
     * @param city
     * @param area
     * @return
     */
    List<SSJTermtrainQuestion> findDistinctYear(String courseName, String grade, String bookName, String province, String city, String area);

    List<SSJTermtrainQuestion> findList(String courseName, String grade, String bookName, String province, String city, String area, String year);

    /**
     * 分页查询列表
     * @param params
     * @param sp
     * @return
     */
    Page<SSJTermtrainQuestion> findByPage(Map<String, Object> params, Pageable sp);
}
