Browse Source

根据试卷id获取考试id

tags/正式版本
雍文秀 2 years ago
parent
commit
ce56e035a4

+ 3
- 0
sexam/src/main/java/com/xhkjedu/sexam/mapper/paper/EPaperMapper.java View File

@@ -30,4 +30,7 @@ public interface EPaperMapper extends TkMapper<EPaper> {
30 30
 
31 31
     //修改试题设置答案
32 32
     void updateEPaperAnswered(@Param("paper") EPaper paper);
33
+
34
+    //根据试卷id获取考试id
35
+    Integer getExamIdByEpId(@Param("epid") Integer epid);
33 36
 }

+ 5
- 0
sexam/src/main/resources/mapper/paper/EPaperMapper.xml View File

@@ -46,4 +46,9 @@
46 46
     <update id="updateEPaperAnswered">
47 47
         update e_paper set answered=#{paper.answered} where epid=#{paper.epid}
48 48
     </update>
49
+
50
+    <!--根据试卷id获取考试id-->
51
+    <select id="getExamIdByEpId" resultType="java.lang.Integer">
52
+        select examid from e_paper where epid=#{epid} limit 1
53
+    </select>
49 54
 </mapper>

Loading…
Cancel
Save