package com.ynfy.buss.exam.paperquestion.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ynfy.buss.exam.paperquestion.entity.PaperQuestion;
import com.ynfy.buss.exam.paperrulegroup.entity.PaperRuleGroup;

import java.util.List;

/**
 * @Description: paper_question
 * @Author: jeecg-boot
 * @Date: 2023-02-23
 * @Version: V1.0
 */
public interface IPaperQuestionService extends IService<PaperQuestion> {

    void remove(String paperId);


    /**
     * 试卷试题排序
     *
     * @param paperQuestions
     */
    List<PaperQuestion> sort(List<PaperQuestion> paperQuestions);


    void saveAll(String paperId, List<PaperRuleGroup> groupList);

    List<PaperQuestion> listByPaperId(String paperId);

    void removeByQuestionIds(String[] paperIds);

    /**
     * 检查题目是否已经被试卷使用
     *
     * @param questionIds
     * @return
     */
    boolean checkIsUsedInPaper(String[] questionIds);

    /**
     * 检查题目是否已经被使用
     *
     * @param questionIds
     * @return
     */
    boolean checkIsUsed(String[] questionIds);
}
