【新增】移植试题,试卷任务后端
This commit is contained in:
@@ -0,0 +1,123 @@
|
||||
<?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="pc.exam.pp.module.exam.dal.mysql.paper.EducationPaperParamMapper">
|
||||
|
||||
<resultMap type="EducationPaperParam" id="EducationPaperParamResult">
|
||||
<result property="paramId" column="param_id" />
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="isExamPassword" column="is_exam_password" />
|
||||
<result property="examPassword" column="exam_password" />
|
||||
<result property="usb" column="usb" />
|
||||
<result property="saveGrades" column="save_grades" />
|
||||
<result property="driver" column="driver" />
|
||||
<result property="directory" column="directory" />
|
||||
<result property="uploadTime" column="upload_time" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="isRepeat" column="is_repeat" />
|
||||
<result property="isAnswer" column="is_answer" />
|
||||
<result property="isLook" column="is_look" />
|
||||
<result property="isConnect" column="is_connect" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEducationPaperParamVo">
|
||||
select param_id, task_id, is_exam_password, exam_password, usb, save_grades, driver, directory, upload_time, is_del,is_repeat ,is_answer,is_look,is_connect from education_paper_param
|
||||
</sql>
|
||||
|
||||
<select id="selectEducationPaperParamList" parameterType="EducationPaperParam" resultMap="EducationPaperParamResult">
|
||||
<include refid="selectEducationPaperParamVo"/>
|
||||
<where>
|
||||
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
|
||||
<if test="isExamPassword != null and isExamPassword != ''"> and is_exam_password = #{isExamPassword}</if>
|
||||
<if test="examPassword != null and examPassword != ''"> and exam_password = #{examPassword}</if>
|
||||
<if test="usb != null and usb != ''"> and usb = #{usb}</if>
|
||||
<if test="saveGrades != null and saveGrades != ''"> and save_grades = #{saveGrades}</if>
|
||||
<if test="driver != null and driver != ''"> and driver = #{driver}</if>
|
||||
<if test="directory != null and directory != ''"> and directory = #{directory}</if>
|
||||
<if test="uploadTime != null and uploadTime != ''"> and upload_time = #{uploadTime}</if>
|
||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEducationPaperParamByParamId" parameterType="String" resultMap="EducationPaperParamResult">
|
||||
<include refid="selectEducationPaperParamVo"/>
|
||||
where param_id = #{paramId}
|
||||
</select>
|
||||
<select id="selectEducationPaperParamByTaskId" resultMap="EducationPaperParamResult">
|
||||
<include refid="selectEducationPaperParamVo"/>
|
||||
where task_id =#{taskId}
|
||||
</select>
|
||||
|
||||
<insert id="insertEducationPaperParam" parameterType="EducationPaperParam">
|
||||
insert into education_paper_param
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="paramId != null">param_id,</if>
|
||||
<if test="taskId != null">task_id,</if>
|
||||
<if test="isExamPassword != null">is_exam_password,</if>
|
||||
<if test="examPassword != null">exam_password,</if>
|
||||
<if test="usb != null">usb,</if>
|
||||
<if test="saveGrades != null">save_grades,</if>
|
||||
<if test="driver != null">driver,</if>
|
||||
<if test="directory != null">directory,</if>
|
||||
<if test="uploadTime != null">upload_time,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="isRepeat != null">is_repeat,</if>
|
||||
<if test="isAnswer != null">is_answer,</if>
|
||||
<if test="isLook != null">is_look,</if>
|
||||
<if test="isConnect != null">is_connect,</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="paramId != null">#{paramId},</if>
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="isExamPassword != null">#{isExamPassword},</if>
|
||||
<if test="examPassword != null">#{examPassword},</if>
|
||||
<if test="usb != null">#{usb},</if>
|
||||
<if test="saveGrades != null">#{saveGrades},</if>
|
||||
<if test="driver != null">#{driver},</if>
|
||||
<if test="directory != null">#{directory},</if>
|
||||
<if test="uploadTime != null">#{uploadTime},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="isRepeat != null">#{isRepeat},</if>
|
||||
<if test="isAnswer != null">#{isAnswer},</if>
|
||||
<if test="isLook != null">#{isLook},</if>
|
||||
<if test="isConnect != null">#{isConnect},</if>
|
||||
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEducationPaperParam" parameterType="EducationPaperParam">
|
||||
update education_paper_param
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="isExamPassword != null">is_exam_password = #{isExamPassword},</if>
|
||||
<if test="examPassword != null">exam_password = #{examPassword},</if>
|
||||
<if test="usb != null">usb = #{usb},</if>
|
||||
<if test="saveGrades != null">save_grades = #{saveGrades},</if>
|
||||
<if test="driver != null">driver = #{driver},</if>
|
||||
<if test="directory != null">directory = #{directory},</if>
|
||||
<if test="uploadTime != null">upload_time = #{uploadTime},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="isRepeat != null">is_repeat = #{isRepeat},</if>
|
||||
<if test="isAnswer != null">is_answer = #{isAnswer},</if>
|
||||
<if test="isLook != null">is_look = #{isLook},</if>
|
||||
<if test="isConnect != null">is_connect = #{isConnect},</if>
|
||||
|
||||
|
||||
</trim>
|
||||
where param_id = #{paramId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEducationPaperParamByParamId" parameterType="String">
|
||||
delete from education_paper_param where param_id = #{paramId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEducationPaperParamByParamIds" parameterType="String">
|
||||
delete from education_paper_param where param_id in
|
||||
<foreach item="paramId" collection="array" open="(" separator="," close=")">
|
||||
#{paramId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user