<?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.hazard.mapper.TBusiHazIdenMwZMapper">
    <resultMap type="com.goldenwater.slaj.hazard.domain.TBusiHazIdenMwZ" id="TBusiHazIdenMwZResult">
        <result property="guid" column="guid"/>
        <result property="hazGuid" column="haz_guid"/>
        <result property="hazGrade" column="haz_grade"/>
        <result property="otlcolQgwTnygts" column="otlcol_qgw_tnygts"/>
        <result property="guideIn" column="guide_in"/>
        <result property="createPer" column="create_per"/>
        <result property="createTime" column="create_time"/>
        <result property="updatePer" column="update_per"/>
        <result property="updateTime" column="update_time"/>
        <result property="acciCause" column="acci_cause"/>
    </resultMap>
    <sql id="selectTBusiHazIdenMwZVo">
        select guid, haz_guid, haz_grade, otlcol_qgw_tnygts, guide_in, create_per, create_time, update_per, update_time, acci_cause
        from t_busi_haz_iden_mw_z
    </sql>
    <select id="selectTBusiHazIdenMwZByGuid" parameterType="String" resultMap="TBusiHazIdenMwZResult">
        <include refid="selectTBusiHazIdenMwZVo"/>
        where guid = #{guid}
    </select>
    <select id="selectTBusiHazIdenMwZList" parameterType="com.goldenwater.slaj.hazard.domain.TBusiHazIdenMwZ" resultMap="TBusiHazIdenMwZResult">
        <include refid="selectTBusiHazIdenMwZVo"/>
        <where>
            <if test="hazGuid != null and hazGuid != ''">AND haz_guid = #{hazGuid}</if>
            <if test="guid != null and guid != ''">AND guid = #{guid}</if>
        </where>
    </select>
    <insert id="insertTBusiHazIdenMwZ" parameterType="com.goldenwater.slaj.hazard.domain.TBusiHazIdenMwZ">
        insert into t_busi_haz_iden_mw_z (
            guid, haz_guid, haz_grade, otlcol_qgw_tnygts, guide_in, create_per, create_time, update_per, update_time, acci_cause
        ) values (
            #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}
        )
    </insert>
    <update id="updateTBusiHazIdenMwZ" parameterType="com.goldenwater.slaj.hazard.domain.TBusiHazIdenMwZ">
        update t_busi_haz_iden_mw_z
        <set>
            <if test="hazGuid != null">haz_guid = #{hazGuid},</if>
            <if test="hazGrade != null">haz_grade = #{hazGrade},</if>
            <if test="otlcolQgwTnygts != null">otlcol_qgw_tnygts = #{otlcolQgwTnygts},</if>
            <if test="guideIn != null">guide_in = #{guideIn},</if>
            <if test="createPer != null">create_per = #{createPer},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updatePer != null">update_per = #{updatePer},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="acciCause != null">acci_cause = #{acciCause},</if>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteTBusiHazIdenMwZByGuid" parameterType="String">
        delete from t_busi_haz_iden_mw_z where guid = #{guid}
    </delete>
    <delete id="deleteTBusiHazIdenMwZByGuids" parameterType="String">
        delete from t_busi_haz_iden_mw_z where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>