<?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.goldenwater.slaj.eutr.mapper.BisEutrExamStraMapper">
    <resultMap type="com.goldenwater.slaj.eutr.domain.BisEutrExamStra" id="BisEutrExamStraResult">
        <result property="guid" column="guid"/>
        <result property="examGuid" column="exam_guid"/>
        <result property="straName" column="stra_name"/>
        <result property="straType" column="stra_type"/>
        <result property="eqNum" column="eq_num"/>
        <result property="eqScore" column="eq_score"/>
        <result property="note" column="note"/>
        <result property="collTime" column="coll_time"/>
        <result property="updTime" column="upd_time"/>
        <result property="recPers" column="rec_pers"/>
    </resultMap>
    <sql id="selectBisEutrExamStraVo">
        select guid, exam_guid, stra_name, stra_type, eq_num, eq_score,
               note, coll_time, upd_time, rec_pers
        from bis_eutr_exam_stra
    </sql>
    <select id="selectBisEutrExamStraByGuid" parameterType="String" resultMap="BisEutrExamStraResult">
        <include refid="selectBisEutrExamStraVo"/>
        where guid = #{guid}
    </select>
    <select id="selectBisEutrExamStraList" parameterType="com.goldenwater.slaj.eutr.domain.BisEutrExamStra" resultMap="BisEutrExamStraResult">
        <include refid="selectBisEutrExamStraVo"/>
        <where>
            <if test="examGuid != null and examGuid != ''">AND exam_guid = #{examGuid}</if>
            <if test="straType != null and straType != ''">AND stra_type = #{straType}</if>
        </where>
    </select>
    <insert id="insertBisEutrExamStra" parameterType="com.goldenwater.slaj.eutr.domain.BisEutrExamStra">
        insert into bis_eutr_exam_stra (
            guid, exam_guid, stra_name, stra_type, eq_num, eq_score,
            note, coll_time, upd_time, rec_pers
        ) values (
            #{guid}, #{examGuid}, #{straName}, #{straType}, #{eqNum}, #{eqScore},
            #{note}, #{collTime}, #{updTime}, #{recPers}
        )
    </insert>
    <update id="updateBisEutrExamStra" parameterType="com.goldenwater.slaj.eutr.domain.BisEutrExamStra">
        update bis_eutr_exam_stra
        <set>
            <if test="examGuid != null">exam_guid = #{examGuid},</if>
            <if test="straName != null">stra_name = #{straName},</if>
            <if test="straType != null">stra_type = #{straType},</if>
            <if test="eqNum != null">eq_num = #{eqNum},</if>
            <if test="eqScore != null">eq_score = #{eqScore},</if>
            <if test="note != null">note = #{note},</if>
            <if test="updTime != null">upd_time = #{updTime},</if>
            <if test="recPers != null">rec_pers = #{recPers},</if>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteBisEutrExamStraByGuid" parameterType="String">
        delete from bis_eutr_exam_stra where guid = #{guid}
    </delete>
    <delete id="deleteBisEutrExamStraByGuids" parameterType="String">
        delete from bis_eutr_exam_stra where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>
