<?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.BisHiddRectProgMapper">
    <resultMap type="com.goldenwater.slaj.hidd.domain.BisHiddRectProg" id="BisHiddRectProgResult">
        <result property="guid" column="guid"/>
        <result property="hiddGuid" column="hidd_guid"/>
        <result property="rectProg" column="rect_prog"/>
        <result property="note" column="note"/>
        <result property="collTime" column="coll_time"/>
        <result property="updTime" column="upd_time"/>
        <result property="recPers" column="rec_pers"/>
    </resultMap>
    <sql id="selectBisHiddRectProgVo">
        select guid, hidd_guid, rect_prog, note, coll_time, upd_time, rec_pers
        from bis_hidd_rect_prog
    </sql>
    <select id="selectBisHiddRectProgByGuid" parameterType="String" resultMap="BisHiddRectProgResult">
        <include refid="selectBisHiddRectProgVo"/>
        where guid = #{guid}
    </select>
    <select id="selectBisHiddRectProgList" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddRectProg" resultMap="BisHiddRectProgResult">
        <include refid="selectBisHiddRectProgVo"/>
        <where>
            <if test="hiddGuid != null and hiddGuid != ''">AND hidd_guid = #{hiddGuid}</if>
            <if test="guid != null and guid != ''">AND guid = #{guid}</if>
        </where>
    </select>
    <insert id="insertBisHiddRectProg" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddRectProg">
        insert into bis_hidd_rect_prog (guid, hidd_guid, rect_prog, note, coll_time, upd_time, rec_pers)
        values (#{guid}, #{hiddGuid}, #{rectProg}, #{note}, #{collTime}, #{updTime}, #{recPers})
    </insert>
    <update id="updateBisHiddRectProg" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddRectProg">
        update bis_hidd_rect_prog
        <set>
            <if test="hiddGuid != null">hidd_guid = #{hiddGuid},</if>
            <if test="rectProg != null">rect_prog = #{rectProg},</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>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteBisHiddRectProgByGuid" parameterType="String">
        delete from bis_hidd_rect_prog where guid = #{guid}
    </delete>
    <delete id="deleteBisHiddRectProgByGuids" parameterType="String">
        delete from bis_hidd_rect_prog where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>
