package com.hc.business.mapper;

import com.hc.business.model.Question;
import com.hc.core.utils.mapper.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 习题表(Question)表数据库访问层
 *
 * @author java
 * @since 2020-12-07 11:35:55
 */

@Repository
public interface QuestionMapper extends Mapper<Question> {


    /**
     * 依据主键获取题目
     *
     * @param questionId 题目id
     * @return 实例对象
     */
    Question queryById(Integer questionId);


    /**
     * 获取全部习题
     *
     * @return 实例对象数组
     */
    List<Question> queryQuestions();


    /**
     * 获取习题id
     *
     * @return 实例对象数组
     */
    List<Integer> queryByTagId(@Param("questionType") Integer questionType,
                               @Param("questionLevel") Integer questionLevel,
                               @Param("questionTagId") Integer questionTagId);



    List<Integer> queryTagId(@Param("questionTagId") Integer questionTagId);
}