package com.ssj.service.mapper;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ssj.bean.kmt.kmt.domain.KmtQualityQuestionKnow;
import com.ssj.bean.kmt.kmt.domain.KmtQualityQuestions;
import com.ssj.service.kmt.dto.ExerciseQuetionDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface KmtQualityQuestionsMapper {

    /**
     * 查询搜索的题目, kmt_exercise_questions, kmt_sys_user
     * @param questionId
     * @return
     */
    List<ExerciseQuetionDto> findKmtQuestionsById(@Param("questionId") String questionId,
                                                  @Param("userId") String userId,
                                                  @Param("dealType") int dealType,
                                                  Page page);

    /**
     * 查询大题 kmt_exercise_questions
     * @param id
     * @return
     */
    ExerciseQuetionDto findBigQuestionById(@Param("id") String id);

    /**
     * 根据练习册id列表查询需要更新到es的数据
     * @param questionIdList 题目id列表
     */
    List<Map<String, Object>> findData2EsByQuestionList(@Param("questionIdList") List<String> questionIdList);

    /**
     * 查询大标题以及大标题下的所有小题 kmt_exercise_questions
     * @param parentIds
     * @return
     */
    List<KmtQualityQuestions> findQuestionByParentId(@Param("parentIds") List<String> parentIds);

    /**
     * 查询kmt题目知识点
     * @param questionId
     * @return
     */
    List<KmtQualityQuestionKnow> findQualityQuestionKnowByQuestionId (@Param("questionId") String questionId);

}
