<?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.TBusiHazUiMapper">
    <resultMap type="com.goldenwater.slaj.hazard.domain.TBusiHazUi" id="TBusiHazUiResult">
        <result property="guid" column="guid"/>
        <result property="createTime" column="create_time"/>
        <result property="orgGuid" column="org_guid"/>
        <result property="id" column="id"/>
        <result property="engNum" column="eng_num"/>
        <result property="ybHaz" column="yb_haz"/>
        <result property="zdHaz" column="zd_haz"/>
        <result property="yxYbHaz" column="yx_yb_haz"/>
        <result property="yxZdHaz" column="yx_zd_haz"/>
        <result property="ybGkHaz" column="yb_gk_haz"/>
        <result property="zdGkHaz" column="zd_gk_haz"/>
        <result property="yxYbGk" column="yx_yb_gk"/>
        <result property="yxZdGk" column="yx_zd_gk"/>
        <result property="count" column="count"/>
    </resultMap>
    <sql id="selectTBusiHazUiVo">
        select guid, create_time, org_guid, id, eng_num, yb_haz, zd_haz, yx_yb_haz, yx_zd_haz, yb_gk_haz, zd_gk_haz, yx_yb_gk, yx_zd_gk, count
        from t_busi_haz_ui
    </sql>
    <select id="selectTBusiHazUiByGuid" parameterType="String" resultMap="TBusiHazUiResult">
        <include refid="selectTBusiHazUiVo"/>
        where guid = #{guid}
    </select>
    <select id="selectTBusiHazUiList" parameterType="com.goldenwater.slaj.hazard.domain.TBusiHazUi" resultMap="TBusiHazUiResult">
        <include refid="selectTBusiHazUiVo"/>
        <where>
            <if test="orgGuid != null and orgGuid != ''">AND org_guid = #{orgGuid}</if>
            <if test="guid != null and guid != ''">AND guid = #{guid}</if>
        </where>
    </select>
    <insert id="insertTBusiHazUi" parameterType="com.goldenwater.slaj.hazard.domain.TBusiHazUi">
        insert into t_busi_haz_ui (
            guid, create_time, org_guid, id, eng_num, yb_haz, zd_haz, yx_yb_haz, yx_zd_haz, yb_gk_haz, zd_gk_haz, yx_yb_gk, yx_zd_gk, count
        ) 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)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}, #{$(System.Collections.Hashtable.Prop)}
        )
    </insert>
    <update id="updateTBusiHazUi" parameterType="com.goldenwater.slaj.hazard.domain.TBusiHazUi">
        update t_busi_haz_ui
        <set>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="orgGuid != null">org_guid = #{orgGuid},</if>
            <if test="id != null">id = #{id},</if>
            <if test="engNum != null">eng_num = #{engNum},</if>
            <if test="ybHaz != null">yb_haz = #{ybHaz},</if>
            <if test="zdHaz != null">zd_haz = #{zdHaz},</if>
            <if test="yxYbHaz != null">yx_yb_haz = #{yxYbHaz},</if>
            <if test="yxZdHaz != null">yx_zd_haz = #{yxZdHaz},</if>
            <if test="ybGkHaz != null">yb_gk_haz = #{ybGkHaz},</if>
            <if test="zdGkHaz != null">zd_gk_haz = #{zdGkHaz},</if>
            <if test="yxYbGk != null">yx_yb_gk = #{yxYbGk},</if>
            <if test="yxZdGk != null">yx_zd_gk = #{yxZdGk},</if>
            <if test="count != null">count = #{count},</if>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteTBusiHazUiByGuid" parameterType="String">
        delete from t_busi_haz_ui where guid = #{guid}
    </delete>
    <delete id="deleteTBusiHazUiByGuids" parameterType="String">
        delete from t_busi_haz_ui where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>