|
|
@@ -3,6 +3,10 @@ package com.sundot.airport.exam.mapper;
|
|
3
|
3
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
4
|
4
|
import com.sundot.airport.exam.domain.QuesOpt;
|
|
5
|
5
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
6
|
+import org.apache.ibatis.annotations.Param;
|
|
|
7
|
+import org.apache.ibatis.annotations.Select;
|
|
|
8
|
+
|
|
|
9
|
+import java.util.List;
|
|
6
|
10
|
|
|
7
|
11
|
|
|
8
|
12
|
/**
|
|
|
@@ -16,4 +20,16 @@ import org.apache.ibatis.annotations.Mapper;
|
|
16
|
20
|
@Mapper
|
|
17
|
21
|
public interface QuesOptMapper extends BaseMapper<QuesOpt> {
|
|
18
|
22
|
|
|
|
23
|
+ /**
|
|
|
24
|
+ * 根据题目ID列表查询选项(忽略逻辑删除)
|
|
|
25
|
+ */
|
|
|
26
|
+ @Select("<script>" +
|
|
|
27
|
+ "SELECT * FROM edu_cs_ques_opt WHERE qu_id IN " +
|
|
|
28
|
+ "<foreach collection='quesIds' item='id' open='(' separator=',' close=')'>" +
|
|
|
29
|
+ "#{id}" +
|
|
|
30
|
+ "</foreach>" +
|
|
|
31
|
+ " ORDER BY sort" +
|
|
|
32
|
+ "</script>")
|
|
|
33
|
+ List<QuesOpt> selectByQuesIds(@Param("quesIds") List<String> quesIds);
|
|
|
34
|
+
|
|
19
|
35
|
}
|