fuliqi
2024-07-01 9dee3e46fdb59eb67b26f8c1958007025d1b7c29
src/main/java/com/ycl/jxkg/mapper/QuestionMapper.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ycl.jxkg.domain.other.KeyValue;
import com.ycl.jxkg.domain.entity.Question;
import com.ycl.jxkg.domain.question.RandomQuestionDTO;
import com.ycl.jxkg.domain.vo.admin.question.QuestionPageRequestVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -28,4 +29,16 @@
     * @return
     */
    List<Question> getAnswerInfo(@Param("questionIds") List<Integer> questionIds);
    List<RandomQuestionDTO> selectBySubject(@Param("subjectId") Integer subjectId, @Param("types") List<Integer> types);
    /**
     * 获取随机题
     *
     * @param subjectId 课目
     * @param questionType 题型
     * @param num 数量
     * @return
     */
    List<Question> getRandomQuestion(@Param("subjectId") Integer subjectId, @Param("questionType") Integer questionType, @Param("num") Integer num);
}