package com.ruoyi.ie.service;


import com.ruoyi.ie.domain.Questions;

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

/**
 * 试题Service接口
 *
 * @author mingxue
 * @date 2021-06-19
 */
public interface IQuestionsService
{
    /**
     * 查询试题
     *
     * @param id 试题ID
     * @return 试题
     */
    public Questions selectQuestionsById(Long id);

    public List<Questions> selectQuestionsByZtPaperId(Map map);

    /**
     *
     * @param id
     * @return
     */
    public Questions selectQuestionsByIdNoChange(Long id);

    /**
     * 查询试题列表
     *
     * @param questions 试题
     * @return 试题集合
     */
    public List<Questions> selectQuestionsList(Questions questions);
    public List<Questions> selectQuestionsFilter(Questions questions);


    /**
     * 新增试题
     *
     * @param questions 试题
     * @return 结果
     */
    public int insertQuestions(Questions questions);

    /**
     * 修改试题
     *
     * @param questions 试题
     * @return 结果
     */
    public int updateQuestions(Questions questions);

    /**
     * 批量删除试题
     *
     * @param ids 需要删除的试题ID
     * @return 结果
     */
    public int deleteQuestionsByIds(Long[] ids);

    /**
     * 删除试题信息
     *
     * @param id 试题ID
     * @return 结果
     */
    public int deleteQuestionsById(Long id);
    public int updateBatchQtpyeByIds(Long[] ids,String qtpye);


    int getQuestionsCountByChapterIds(List<Long> chapterIds);
    public int getQuestionsCountByChapterId(Long chapterId) ;



    List<Questions> getQuestionsByQTypeAndNum(List<Questions> params);

    List<Questions> getPaperQuestionListByPaperId(Long paperId);

    String correctImageUrl(String content);

    List<Questions> fillSubquestions(List<Questions> questionsList);
    List<Questions> changeQuestionList(List<Questions> list);

    /**
     *
     * @param list
     * @param keepTitleNotChange 不要把选项拼到title里
     * @return
     */
    List<Questions> changeQuestionList(List<Questions> list, boolean keepTitleNotChange);


    List<Questions> getPaperQuestionListByKnowledge(Questions body);

    public List<Questions> getPaperQuestionList(Questions body);

    List<Questions> selectIdsByIdGreaterThan(Long id);
    List<Questions> selectIdsByIdGreaterThan2(Long id);

    List<Questions> getPaperQuestionListBySubject(Questions body);


    public List<Questions> selectByKnowledgeTree(Questions query, Integer pageNum, Integer pageSize);


    public List<Questions> getQuestionsByKnowledgeForParactice(Integer subjectId, Long knowledgeId);

    public List<Questions> selectCollectedList(Questions questions);

    public List<Questions> selectWrongQuestions(Questions questions);

//    QuestionsQueryResultDto QuestionsQueryResultDtoById(Long questionId);

    public void fillCollectInfo(Long userId, List<Questions> questions);

    public List<Questions> selectByKnowledgeIds(Questions questions);

    public void fillQuestionInfo(List<Questions> list);

    Questions getQuestionInfo(Long id);

    public List<Questions> selectByIds(Long[] ids);

    public void replaceImage(List<Questions> questions);

    public void replaceImage(List<Questions> list,Boolean isHttp);

}
