From 008a607e1fcb46bdb180bc4e74304bc91239d2ad Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 22 五月 2024 13:33:38 +0800
Subject: [PATCH] sql bug
---
src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java b/src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java
index bdb4835..c77a9c6 100644
--- a/src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java
+++ b/src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java
@@ -32,8 +32,17 @@
List<QuestionSubject> getSubject(Integer id);
/** 缁熻璇剧洰鐨勯鐩暟 */
- Integer countQuestionNum(@Param("subjects") List<Integer> subjects);
+ Integer countQuestionNum(@Param("subjects") List<Integer> subjects, @Param("questionType") Integer questionType);
/** 闅忔満棰樼洰 */
- List<QuestionVO> getRandomQuestionId(@Param("subjectIds") List<Integer> subjectIds, @Param("questionNum") Integer questionNum);
+ List<QuestionVO> getRandomQuestionId(@Param("subjectIds") List<Integer> subjectIds, @Param("questionType") Integer questionType, @Param("questionNum") Integer questionNum);
+
+ /** 鏌ヨ棰樼洰ID锛屾牴鎹鐩甶ds */
+ List<Integer> questionsBySubjectIds(@Param("subjectIds") List<Integer> subjectIds);
+
+ /** 鏌ヨ棰樼洰ID鏍规嵁璇剧洰id */
+ List<Integer> questionsBySubjectId(Integer subjectId);
+
+ /** 鏍规嵁璇剧洰鍜岄鍨嬫煡璇㈤鐩甀D */
+ List<Integer> questionsBySubjectIdAndQuestionType(@Param("subjectId") Integer subjectId, @Param("questionType") Integer questionType);
}
--
Gitblit v1.8.0