package cn.com.qmth.examcloud.core.questions.service;

import cn.com.qmth.examcloud.question.commons.core.question.DefaultQuestion;
import org.springframework.data.domain.Page;

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

/**
 * @author weiwenhai
 * @date 2018.9.10
 * @company qmth
 * @description 试题对象服务接口
 */
public interface QuestionProviderService {

    /**
     * 保存试题对象
     *
     * @param defaultQuestion
     * @return
     */
    public String save(DefaultQuestion defaultQuestion);

    /**
     * 根据机构和属性查询试题集合
     *
     * @param rootOrgId
     * @param map
     * @return
     */
    public Page<DefaultQuestion> findQustions(Long rootOrgId, Map<String, String> map, int curPage, int pageSize);

    /**
     * 批量保存试题对象
     *
     * @param defaultQuestion
     * @return
     */
    public String saveList(List<DefaultQuestion> defaultQuestions);

    /**
     * 查询试题对象集合
     *
     * @param questionId
     * @return
     */
    public List<DefaultQuestion> findQuestions(Set<String> questionIds);

}
