<?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.hidd.mapper.BisHiddInveMapper">
    <resultMap type="com.goldenwater.slaj.hidd.domain.BisHiddInve" id="BisHiddInveResult">
        <result property="guid" column="guid"/>
        <result property="hiddGuid" column="hidd_guid"/>
        <result property="inspOrgGuid" column="insp_org_guid"/>
        <result property="inspDate" column="insp_date"/>
        <result property="inspLeader" column="insp_leader"/>
        <result property="inspLeaderPost" column="insp_leader_post"/>
        <result property="inspMem" column="insp_mem"/>
        <result property="note" column="note"/>
        <result property="recPers" column="rec_pers"/>
        <result property="collTime" column="coll_time"/>
        <result property="updTime" column="upd_time"/>
        <result property="orgManage" column="org_manage"/>
        <result property="hiddContent" column="hidd_content"/>
    </resultMap>
    <sql id="selectBisHiddInveVo">
        select guid, hidd_guid, insp_org_guid, insp_date, insp_leader, insp_leader_post, insp_mem, note, rec_pers, coll_time, upd_time, org_manage, hidd_content
        from bis_hidd_inve
    </sql>
    <select id="selectBisHiddInveByGuid" parameterType="String" resultMap="BisHiddInveResult">
        <include refid="selectBisHiddInveVo"/>
        where guid = #{guid}
    </select>
    <select id="selectBisHiddInveList" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddInve" resultMap="BisHiddInveResult">
        <include refid="selectBisHiddInveVo"/>
        <where>
            <if test="hiddGuid != null and hiddGuid != ''">AND hidd_guid = #{hiddGuid}</if>
            <if test="inspOrgGuid != null and inspOrgGuid != ''">AND insp_org_guid = #{inspOrgGuid}</if>
            <if test="guid != null and guid != ''">AND guid = #{guid}</if>
        </where>
    </select>
    <insert id="insertBisHiddInve" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddInve">
        insert into bis_hidd_inve (guid, hidd_guid, insp_org_guid, insp_date, insp_leader, insp_leader_post, insp_mem, note, rec_pers, coll_time, upd_time, org_manage, hidd_content)
        values (#{guid}, #{hiddGuid}, #{inspOrgGuid}, #{inspDate}, #{inspLeader}, #{inspLeaderPost}, #{inspMem}, #{note}, #{recPers}, #{collTime}, #{updTime}, #{orgManage}, #{hiddContent})
    </insert>
    <update id="updateBisHiddInve" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddInve">
        update bis_hidd_inve
        <set>
            <if test="hiddGuid != null">hidd_guid = #{hiddGuid},</if>
            <if test="inspOrgGuid != null">insp_org_guid = #{inspOrgGuid},</if>
            <if test="inspDate != null">insp_date = #{inspDate},</if>
            <if test="inspLeader != null">insp_leader = #{inspLeader},</if>
            <if test="inspLeaderPost != null">insp_leader_post = #{inspLeaderPost},</if>
            <if test="inspMem != null">insp_mem = #{inspMem},</if>
            <if test="note != null">note = #{note},</if>
            <if test="recPers != null">rec_pers = #{recPers},</if>
            <if test="collTime != null">coll_time = #{collTime},</if>
            <if test="updTime != null">upd_time = #{updTime},</if>
            <if test="orgManage != null">org_manage = #{orgManage},</if>
            <if test="hiddContent != null">hidd_content = #{hiddContent},</if>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteBisHiddInveByGuid" parameterType="String">
        delete from bis_hidd_inve where guid = #{guid}
    </delete>
    <delete id="deleteBisHiddInveByGuids" parameterType="String">
        delete from bis_hidd_inve where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>
