<?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.BisHazMajRegWritRegTimeMapper">
    <resultMap type="com.goldenwater.slaj.hazard.domain.BisHazMajRegWritRegTime" id="BisHazMajRegWritRegTimeResult">
        <result property="guid" column="guid"/>
        <result property="hazGuid" column="haz_guid"/>
        <result property="regOrgGuid" column="reg_org_guid"/>
        <result property="regTime" column="reg_time"/>
        <result property="regCode" column="reg_code"/>
        <result property="writeOrgGuid" column="write_org_guid"/>
        <result property="writeCode" column="write_code"/>
        <result property="writeOffTime" column="write_off_time"/>
        <result property="hazStat" column="haz_stat"/>
        <result property="note" column="note"/>
        <result property="collTime" column="coll_time"/>
        <result property="updTime" column="upd_time"/>
        <result property="recPers" column="rec_pers"/>
        <result property="reviOpin" column="revi_opin"/>
        <result property="toDate" column="to_date"/>
        <result property="rn" column="rn"/>
    </resultMap>
    <sql id="selectBisHazMajRegWritRegTimeVo">
        select guid, haz_guid, reg_org_guid, reg_time, reg_code, write_org_guid, write_code, write_off_time, haz_stat, note, coll_time, upd_time, rec_pers, revi_opin, to_date, rn
        from bis_haz_maj_reg_writ_reg_time
    </sql>
    <select id="selectBisHazMajRegWritRegTimeByGuid" parameterType="String" resultMap="BisHazMajRegWritRegTimeResult">
        <include refid="selectBisHazMajRegWritRegTimeVo"/>
        where guid = #{guid}
    </select>
    <select id="selectBisHazMajRegWritRegTimeList" parameterType="com.goldenwater.slaj.hazard.domain.BisHazMajRegWritRegTime" resultMap="BisHazMajRegWritRegTimeResult">
        <include refid="selectBisHazMajRegWritRegTimeVo"/>
        <where>
            <if test="hazGuid != null and hazGuid != ''">AND haz_guid = #{hazGuid}</if>
            <if test="hazStat != null and hazStat != ''">AND haz_stat = #{hazStat}</if>
            <if test="guid != null and guid != ''">AND guid = #{guid}</if>
        </where>
    </select>
    <insert id="insertBisHazMajRegWritRegTime" parameterType="com.goldenwater.slaj.hazard.domain.BisHazMajRegWritRegTime">
        insert into bis_haz_maj_reg_writ_reg_time (
            guid, haz_guid, reg_org_guid, reg_time, reg_code, write_org_guid, write_code, write_off_time, haz_stat, note, coll_time, upd_time, rec_pers, revi_opin, to_date, rn
        ) 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)}, #{$(System.Collections.Hashtable.Prop)}
        )
    </insert>
    <update id="updateBisHazMajRegWritRegTime" parameterType="com.goldenwater.slaj.hazard.domain.BisHazMajRegWritRegTime">
        update bis_haz_maj_reg_writ_reg_time
        <set>
            <if test="hazGuid != null">haz_guid = #{hazGuid},</if>
            <if test="regOrgGuid != null">reg_org_guid = #{regOrgGuid},</if>
            <if test="regTime != null">reg_time = #{regTime},</if>
            <if test="regCode != null">reg_code = #{regCode},</if>
            <if test="writeOrgGuid != null">write_org_guid = #{writeOrgGuid},</if>
            <if test="writeCode != null">write_code = #{writeCode},</if>
            <if test="writeOffTime != null">write_off_time = #{writeOffTime},</if>
            <if test="hazStat != null">haz_stat = #{hazStat},</if>
            <if test="note != null">note = #{note},</if>
            <if test="collTime != null">coll_time = #{collTime},</if>
            <if test="updTime != null">upd_time = #{updTime},</if>
            <if test="recPers != null">rec_pers = #{recPers},</if>
            <if test="reviOpin != null">revi_opin = #{reviOpin},</if>
            <if test="toDate != null">to_date = #{toDate},</if>
            <if test="rn != null">rn = #{rn},</if>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteBisHazMajRegWritRegTimeByGuid" parameterType="String">
        delete from bis_haz_maj_reg_writ_reg_time where guid = #{guid}
    </delete>
    <delete id="deleteBisHazMajRegWritRegTimeByGuids" parameterType="String">
        delete from bis_haz_maj_reg_writ_reg_time where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>