<?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.eme.mapper.BusiDrillEvaMapper">
    <resultMap type="com.goldenwater.slaj.eme.domain.BusiDrillEva" id="BusiDrillEvaResult">
        <result property="deGuid" column="de_guid"/>
        <result property="basicId" column="basic_id"/>
        <result property="evaTime" column="eva_time"/>
        <result property="orgGuid" column="org_guid"/>
        <result property="creperGuid" column="creper_guid"/>
        <result property="createTime" column="create_time"/>
        <result property="updperGuid" column="updper_guid"/>
        <result property="updateTime" column="update_time"/>
        <result property="assess" column="assess"/>
        <result property="drGuid" column="dr_guid"/>
    </resultMap>
    <sql id="selectBusiDrillEvaVo">
        select de_guid, basic_id, eva_time, org_guid, creper_guid, create_time,
               updper_guid, update_time, assess, dr_guid
        from t_busi_drill_eva
    </sql>
    <select id="selectBusiDrillEvaByGuid" parameterType="String" resultMap="BusiDrillEvaResult">
        <include refid="selectBusiDrillEvaVo"/>
        where de_guid = #{deGuid}
    </select>
    <select id="selectBusiDrillEvaList" parameterType="com.goldenwater.slaj.eme.domain.BusiDrillEva" resultMap="BusiDrillEvaResult">
        <include refid="selectBusiDrillEvaVo"/>
        <where>
            <if test="basicId != null and basicId != ''">AND basic_id = #{basicId}</if>
            <if test="drGuid != null and drGuid != ''">AND dr_guid = #{drGuid}</if>
        </where>
    </select>
    <insert id="insertBusiDrillEva" parameterType="com.goldenwater.slaj.eme.domain.BusiDrillEva">
        insert into t_busi_drill_eva (
            de_guid, basic_id, eva_time, org_guid, creper_guid, create_time,
            updper_guid, update_time, assess, dr_guid
        ) values (
            #{deGuid}, #{basicId}, #{evaTime}, #{orgGuid}, #{creperGuid}, #{createTime},
            #{updperGuid}, #{updateTime}, #{assess}, #{drGuid}
        )
    </insert>
    <update id="updateBusiDrillEva" parameterType="com.goldenwater.slaj.eme.domain.BusiDrillEva">
        update t_busi_drill_eva
        <set>
            <if test="basicId != null">basic_id = #{basicId},</if>
            <if test="evaTime != null">eva_time = #{evaTime},</if>
            <if test="orgGuid != null">org_guid = #{orgGuid},</if>
            <if test="creperGuid != null">creper_guid = #{creperGuid},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updperGuid != null">updper_guid = #{updperGuid},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="assess != null">assess = #{assess},</if>
            <if test="drGuid != null">dr_guid = #{drGuid},</if>
        </set>
        where de_guid = #{deGuid}
    </update>
    <delete id="deleteBusiDrillEvaByGuid" parameterType="String">
        delete from t_busi_drill_eva where de_guid = #{deGuid}
    </delete>
    <delete id="deleteBusiDrillEvaByGuids" parameterType="String">
        delete from t_busi_drill_eva where de_guid in
        <foreach item="deGuid" collection="array" open="(" separator="," close=")">
            #{deGuid}
        </foreach>
    </delete>
</mapper>
