<?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.eme.mapper.BusiRegularEvaluMapper">
    <resultMap type="com.goldenwater.slaj.eme.domain.BusiRegularEvalu" id="BusiRegularEvaluResult">
        <result property="guid" column="guid"/>
        <result property="basicId" column="basic_id"/>
        <result property="evaTime" column="eva_time"/>
        <result property="orgGuid" column="org_guid"/>
        <result property="creperGuid" column="creper_guid"/>
        <result property="createTime" column="create_time"/>
        <result property="updperGuid" column="updper_guid"/>
        <result property="updateTime" column="update_time"/>
        <result property="evaDate" column="eva_date"/>
        <result property="evaResult" column="eva_result"/>
    </resultMap>
    <sql id="selectBusiRegularEvaluVo">
        select guid, basic_id, eva_time, org_guid, creper_guid, create_time,
               updper_guid, update_time, eva_date, eva_result
        from t_busi_regular_evalu
    </sql>
    <select id="selectBusiRegularEvaluByGuid" parameterType="String" resultMap="BusiRegularEvaluResult">
        <include refid="selectBusiRegularEvaluVo"/>
        where guid = #{guid}
    </select>
    <select id="selectBusiRegularEvaluList" parameterType="com.goldenwater.slaj.eme.domain.BusiRegularEvalu" resultMap="BusiRegularEvaluResult">
        <include refid="selectBusiRegularEvaluVo"/>
        <where>
            <if test="basicId != null and basicId != ''">AND basic_id = #{basicId}</if>
        </where>
    </select>
    <insert id="insertBusiRegularEvalu" parameterType="com.goldenwater.slaj.eme.domain.BusiRegularEvalu">
        insert into t_busi_regular_evalu (
            guid, basic_id, eva_time, org_guid, creper_guid, create_time,
            updper_guid, update_time, eva_date, eva_result
        ) values (
            #{guid}, #{basicId}, #{evaTime}, #{orgGuid}, #{creperGuid}, #{createTime},
            #{updperGuid}, #{updateTime}, #{evaDate}, #{evaResult}
        )
    </insert>
    <update id="updateBusiRegularEvalu" parameterType="com.goldenwater.slaj.eme.domain.BusiRegularEvalu">
        update t_busi_regular_evalu
        <set>
            <if test="basicId != null">basic_id = #{basicId},</if>
            <if test="evaTime != null">eva_time = #{evaTime},</if>
            <if test="orgGuid != null">org_guid = #{orgGuid},</if>
            <if test="creperGuid != null">creper_guid = #{creperGuid},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updperGuid != null">updper_guid = #{updperGuid},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="evaDate != null">eva_date = #{evaDate},</if>
            <if test="evaResult != null">eva_result = #{evaResult},</if>
        </set>
        where guid = #{guid}
    </update>
    <delete id="deleteBusiRegularEvaluByGuid" parameterType="String">
        delete from t_busi_regular_evalu where guid = #{guid}
    </delete>
    <delete id="deleteBusiRegularEvaluByGuids" parameterType="String">
        delete from t_busi_regular_evalu where guid in
        <foreach item="guid" collection="array" open="(" separator="," close=")">
            #{guid}
        </foreach>
    </delete>
</mapper>
