<?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="SHyglHyyxPeoplemanagementMapper" >
    <!-- 通用查询映射结果 -->

    <select id="selectSHyglHyyxPeoplemanagementList" parameterType="pd" resultType="pd">
        select * from s_hygl_hyyx_peoplemanagement where 1=1
        <if test="id !=null and id !='' ">
            and id = #{id}
        </if>
        <if test="peopleName !=null and peopleName !='' ">
            and peopleName = #{peopleName}
        </if>
        <if test="peopleDefinition !=null and peopleDefinition !='' ">
            and peopleDefinition = #{peopleDefinition}
        </if>
        <if test="totalPeopleCount !=null and totalPeopleCount !='' ">
            and totalPeopleCount = #{totalPeopleCount}
        </if>
        <if test="successPeopleCount !=null and successPeopleCount !='' ">
            and successPeopleCount = #{successPeopleCount}
        </if>
        <if test="failurePeopleCount !=null and failurePeopleCount !='' ">
            and failurePeopleCount = #{failurePeopleCount}
        </if>
        <if test="updateMethod !=null and updateMethod !='' ">
            and updateMethod = #{updateMethod}
        </if>
        <if test="updateTime !=null and updateTime !='' ">
            and updateTime = #{updateTime}
        </if>
        <if test="createTime !=null and createTime !='' ">
            and createTime = #{createTime}
        </if>
        <if test="creator !=null and creator !='' ">
            and creator = #{creator}
        </if>
    </select>


    <update id="updateSHyglHyyxPeoplemanagement" parameterType="pd" >
        update s_hygl_hyyx_peoplemanagement
        <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
        <if test="peopleName !=null and peopleName !='' ">
            peopleName = #{peopleName},
        </if>
        <if test="peopleDefinition !=null and peopleDefinition !='' ">
            peopleDefinition = #{peopleDefinition},
        </if>
        <if test="totalPeopleCount !=null and totalPeopleCount !='' ">
            totalPeopleCount = #{totalPeopleCount},
        </if>
        <if test="successPeopleCount !=null and successPeopleCount !='' ">
            successPeopleCount = #{successPeopleCount},
        </if>
        <if test="failurePeopleCount !=null and failurePeopleCount !='' ">
            failurePeopleCount = #{failurePeopleCount},
        </if>
        <if test="updateMethod !=null and updateMethod !='' ">
            updateMethod = #{updateMethod},
        </if>
        <if test="updateTime !=null and updateTime !='' ">
            updateTime = #{updateTime},
        </if>
        <if test="createTime !=null and createTime !='' ">
            createTime = #{createTime},
        </if>
        <if test="creator !=null and creator !='' ">
            creator = #{creator},
        </if>
        </trim>
        <if test="up != null and up!=''">
            <if test="id != null and id!=''">
                where id=#{id}
            </if>
        </if>
    </update>

    <delete id="SHyglHyyxPeoplemanagementRemove" parameterType="pd">
        <if test="ids != null">
            delete from s_hygl_hyyx_peoplemanagement where
            <if test="ids != null">
                id in(${ids})
            </if>
        </if>
    </delete>

    <insert id="addSHyglHyyxPeoplemanagement" parameterType="pd" >

        insert into s_hygl_hyyx_peoplemanagement
        <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">

        <if test="peopleName !=null and peopleName !='' ">
            peopleName,
        </if>
        <if test="peopleDefinition !=null and peopleDefinition !='' ">
            peopleDefinition,
        </if>
        <if test="totalPeopleCount !=null and totalPeopleCount !='' ">
            totalPeopleCount,
        </if>
        <if test="successPeopleCount !=null and successPeopleCount !='' ">
            successPeopleCount,
        </if>
        <if test="failurePeopleCount !=null and failurePeopleCount !='' ">
            failurePeopleCount,
        </if>
        <if test="updateMethod !=null and updateMethod !='' ">
            updateMethod,
        </if>
        <if test="updateTime !=null and updateTime !='' ">
            updateTime,
        </if>
        <if test="createTime !=null and createTime !='' ">
            createTime,
        </if>
        <if test="creator !=null and creator !='' ">
            creator,
        </if>
        </trim>
        <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
        <if test="peopleName !=null and peopleName !='' ">
             #{peopleName},
        </if>
        <if test="peopleDefinition !=null and peopleDefinition !='' ">
             #{peopleDefinition},
        </if>
        <if test="totalPeopleCount !=null and totalPeopleCount !='' ">
             #{totalPeopleCount},
        </if>
        <if test="successPeopleCount !=null and successPeopleCount !='' ">
             #{successPeopleCount},
        </if>
        <if test="failurePeopleCount !=null and failurePeopleCount !='' ">
             #{failurePeopleCount},
        </if>
        <if test="updateMethod !=null and updateMethod !='' ">
             #{updateMethod},
        </if>
        <if test="updateTime !=null and updateTime !='' ">
             #{updateTime},
        </if>
        <if test="createTime !=null and createTime !='' ">
             #{createTime},
        </if>
        <if test="creator !=null and creator !='' ">
             #{creator},
        </if>
        </trim>

    </insert>

</mapper>
