spokenServer/out/production/pcserver/sqlmap/UnivExamPaperAuth.xml

46 lines
2.0 KiB
XML
Raw Normal View History

2026-03-10 14:30:24 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="UnivExamPaperAuth">
<insert id="insertUnivExamPaperAuth" parameterType="UnivExamPaperAuth">
INSERT INTO UnivExamPaperAuth ( examPaperId, objectId , objectType )
Values ( #{examPaperId}, #{objectId} , #{objectType} )
</insert>
<insert id="insertUnivExamPaperAuthBatch" parameterType="java.util.List">
INSERT INTO UnivExamPaperAuth ( examPaperId, objectId , objectType ) Values
<foreach collection="list" index="index" item="item" separator=",">
( #{item.examPaperId}, #{item.objectId} ,
#{item.objectType} )
</foreach>
</insert>
<select id="getUnivExamPaperAuthByKey" parameterType="java.util.HashMap" resultType="UnivExamPaperAuth">
SELECT examPaperId, objectId , objectType
FROM UnivExamPaperAuth
WHERE examPaperId=#{examPaperId} and objectId = #{objectId}
and objectType = #{objectType}
</select>
<!--获取授权口语试卷总数 -->
<select id="getUnivAuthExamPapersCount" parameterType="java.util.Map" resultType="Integer">
select count(ea.exampaperid) as howmuch from univexampaperauth ea inner join exampaper e on
ea.exampaperid=e.exampaperId and
ea.objectId=#{objectId} and ea.objecttype=#{objectType} and e.isOral=#{isOral}
<if test="title!=null">
and e.title like '%${title}%'
</if>
</select>
<!--获取授权口语试卷详情 -->
<select id="getUnivAuthExamPapers" parameterType="java.util.Map" resultType="ExamPaper">
select e.exampaperId,title,machinescore,humanscore,totalscore from exampaper e inner join univexampaperauth ea
on e.exampaperId=ea.exampaperId
and ea.objectId=#{objectId} and ea.objecttype=#{objectType} and e.isOral=#{isOral}
<if test="title!=null">
and title like '%${title}%'
</if>
order by e.exampaperId desc
limit #{rows} offset #{offsets}
</select>
</mapper>