<?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.BisHiddRectAcceMapper">
    <resultMap type="com.goldenwater.slaj.hidd.domain.BisHiddRectAcce" id="BisHiddRectAcceResult">
        <result property="guid" column="guid"/>
        <result property="hiddGuid" column="hidd_guid"/>
        <result property="requCompDate" column="requ_comp_date"/>
        <result property="accepLegPers" column="accep_leg_pers"/>
        <result property="accepPers" column="accep_pers"/>
        <result property="accepDate" column="accep_date"/>
        <result property="accepOpin" column="accep_opin"/>
        <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="cancelState" column="cancel_state"/>
    </resultMap>
    <sql id="selectBisHiddRectAcceVo">
        select guid, hidd_guid, requ_comp_date, accep_leg_pers, accep_pers, accep_date, accep_opin, note, coll_time, upd_time, rec_pers, cancel_state
        from bis_hidd_rect_acce
    </sql>
    <select id="selectBisHiddRectAcceByGuid" parameterType="String" resultMap="BisHiddRectAcceResult">
        <include refid="selectBisHiddRectAcceVo"/>
        where guid = #{guid}
    </select>
    <select id="selectBisHiddRectAcceList" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddRectAcce" resultMap="BisHiddRectAcceResult">
        <include refid="selectBisHiddRectAcceVo"/>
        <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="insertBisHiddRectAcce" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddRectAcce">
        insert into bis_hidd_rect_acce (guid, hidd_guid, requ_comp_date, accep_leg_pers, accep_pers, accep_date, accep_opin, note, coll_time, upd_time, rec_pers, cancel_state)
        values (#{guid}, #{hiddGuid}, #{requCompDate}, #{accepLegPers}, #{accepPers}, #{accepDate}, #{accepOpin}, #{note}, #{collTime}, #{updTime}, #{recPers}, #{cancelState})
    </insert>
    <update id="updateBisHiddRectAcce" parameterType="com.goldenwater.slaj.hidd.domain.BisHiddRectAcce">
        update bis_hidd_rect_acce
        <set>
            <if test="hiddGuid != null">hidd_guid = #{hiddGuid},</if>
            <if test="requCompDate != null">requ_comp_date = #{requCompDate},</if>
            <if test="accepLegPers != null">accep_leg_pers = #{accepLegPers},</if>
            <if test="accepPers != null">accep_pers = #{accepPers},</if>
            <if test="accepDate != null">accep_date = #{accepDate},</if>
            <if test="accepOpin != null">accep_opin = #{accepOpin},</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="cancelState != null">cancel_state = #{cancelState},</if>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteBisHiddRectAcceByGuid" parameterType="String">
        delete from bis_hidd_rect_acce where guid = #{guid}
    </delete>
    <delete id="deleteBisHiddRectAcceByGuids" parameterType="String">
        delete from bis_hidd_rect_acce where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>
