|
@@ -0,0 +1,115 @@
|
|
|
|
+<?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="com.ruoyi.sim.mapper.RealExamFaultMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="RealExamFault" id="RealExamFaultResult">
|
|
|
|
+ <result property="refId" column="ref_id"/>
|
|
|
|
+ <result property="examId" column="exam_id"/>
|
|
|
|
+ <result property="faultId" column="fault_id"/>
|
|
|
|
+ <result property="flag" column="flag"/>
|
|
|
|
+ <result property="questionValue" column="question_value"/>
|
|
|
|
+ <result property="answerValue" column="answer_value"/>
|
|
|
|
+ <result property="minus" column="minus"/>
|
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectRealExamFaultVo">
|
|
|
|
+ select ref_id,
|
|
|
|
+ exam_id,
|
|
|
|
+ fault_id,
|
|
|
|
+ flag,
|
|
|
|
+ question_value,
|
|
|
|
+ answer_value,
|
|
|
|
+ minus,
|
|
|
|
+ create_by,
|
|
|
|
+ create_time,
|
|
|
|
+ update_by,
|
|
|
|
+ update_time,
|
|
|
|
+ remark
|
|
|
|
+ from sim_real_exam_fault
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectRealExamFaultList" parameterType="RealExamFault" resultMap="RealExamFaultResult">
|
|
|
|
+ <include refid="selectRealExamFaultVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="examId != null ">and exam_id = #{examId}</if>
|
|
|
|
+ <if test="faultId != null and faultId != ''">and fault_id = #{faultId}</if>
|
|
|
|
+ <if test="flag != null and flag != ''">and flag = #{flag}</if>
|
|
|
|
+ <if test="questionValue != null and questionValue != ''">and question_value = #{questionValue}</if>
|
|
|
|
+ <if test="answerValue != null and answerValue != ''">and answer_value = #{answerValue}</if>
|
|
|
|
+ <if test="minus != null ">and minus = #{minus}</if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectRealExamFaultByRefId" parameterType="Long" resultMap="RealExamFaultResult">
|
|
|
|
+ <include refid="selectRealExamFaultVo"/>
|
|
|
|
+ where ref_id = #{refId}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertRealExamFault" parameterType="RealExamFault" useGeneratedKeys="true" keyProperty="refId">
|
|
|
|
+ insert into sim_real_exam_fault
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="examId != null">exam_id,</if>
|
|
|
|
+ <if test="faultId != null and faultId != ''">fault_id,</if>
|
|
|
|
+ <if test="flag != null and flag != ''">flag,</if>
|
|
|
|
+ <if test="questionValue != null">question_value,</if>
|
|
|
|
+ <if test="answerValue != null">answer_value,</if>
|
|
|
|
+ <if test="minus != null">minus,</if>
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="examId != null">#{examId},</if>
|
|
|
|
+ <if test="faultId != null and faultId != ''">#{faultId},</if>
|
|
|
|
+ <if test="flag != null and flag != ''">#{flag},</if>
|
|
|
|
+ <if test="questionValue != null">#{questionValue},</if>
|
|
|
|
+ <if test="answerValue != null">#{answerValue},</if>
|
|
|
|
+ <if test="minus != null">#{minus},</if>
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateRealExamFault" parameterType="RealExamFault">
|
|
|
|
+ update sim_real_exam_fault
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="examId != null">exam_id = #{examId},</if>
|
|
|
|
+ <if test="faultId != null and faultId != ''">fault_id = #{faultId},</if>
|
|
|
|
+ <if test="flag != null and flag != ''">flag = #{flag},</if>
|
|
|
|
+ <if test="questionValue != null">question_value = #{questionValue},</if>
|
|
|
|
+ <if test="answerValue != null">answer_value = #{answerValue},</if>
|
|
|
|
+ <if test="minus != null">minus = #{minus},</if>
|
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where ref_id = #{refId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteRealExamFaultByRefId" parameterType="Long">
|
|
|
|
+ delete
|
|
|
|
+ from sim_real_exam_fault
|
|
|
|
+ where ref_id = #{refId}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteRealExamFaultByRefIds" parameterType="String">
|
|
|
|
+ delete from sim_real_exam_fault where ref_id in
|
|
|
|
+ <foreach item="refId" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{refId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|