From 47cd9ecc0eff38ffe6b3b794b2bf197e958f4403 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期三, 14 五月 2025 15:50:57 +0800 Subject: [PATCH] bug:学员有状态不能修改问题 --- src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java b/src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java index dd19177..9813192 100644 --- a/src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java +++ b/src/main/java/com/mindskip/xzs/repository/QuestionSubjectMapper.java @@ -1,7 +1,9 @@ package com.mindskip.xzs.repository; import com.mindskip.xzs.domain.QuestionSubject; +import com.mindskip.xzs.domain.vo.QuestionVO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -13,7 +15,7 @@ * @param ids * @return */ - Integer removes(Integer[] ids); + Integer removes(@Param("ids") Integer[] ids); /** * @@ -24,4 +26,32 @@ Integer saves(List<QuestionSubject> list); Integer removeQuestionId(Integer questionId); + + Integer removeSubjectId(Integer subjectId); + + List<QuestionSubject> getSubject(Integer id); + + /** 缁熻璇剧洰鐨勯鐩暟 */ + Integer countQuestionNum(@Param("subjects") List<Integer> subjects, @Param("questionType") Integer questionType); + + /** 闅忔満棰樼洰 */ + 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); + + /** 鏍规嵁璇剧洰ID鏌ヨ棰樼洰璇︽儏 */ + List<QuestionVO> bySubjectId(@Param("subjectId") Integer subjectId); + + /** 鏍规嵁璇剧洰鍜岄鍨嬫煡鎵鹃鐩暟鎹� */ + List<QuestionVO> bySubjectIdAndQuestionType(Integer subjectId, Integer dataBaseValueByValue); + + /** 鏍规嵁绉戠洰鏌ヨ棰樼洰 **/ + List<QuestionSubject> getSubjectBySubjectIds(Integer[] subjectIds); } -- Gitblit v1.8.0