<?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.engine.organization.mapper.staff.StaffsMapper">
    <resultMap id="BaseResultMap" type="com.engine.organization.entity.staff.po.StaffsPO">
        <result column="id" property="id"/>
        <result column="staff_id" property="staffId"/>
        <result column="business_type" property="businessType"/>
        <result column="change_num" property="changeNum"/>
        <result column="business_source" property="businessSource"/>
        <result column="requestid" property="requestId"/>
        <result column="creator" property="creator"/>
        <result column="delete_type" property="deleteType"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>

    <!-- 表字段 -->
    <sql id="baseColumns">
        t
        .
        id
        , t.staff_id
        , t.business_type
        , t.change_num
        , t.business_source
        , t.staff_num
        , t.requestid
    </sql>


    <insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.staff.po.StaffsPO" keyProperty="id"
            keyColumn="id" useGeneratedKeys="true">
        INSERT INTO jcl_org_staffs
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="creator != null">
                creator,
            </if>
            <if test="deleteType != null">
                delete_type,
            </if>
            <if test="createTime != null">
                create_time,
            </if>
            <if test="updateTime != null">
                update_time,
            </if>
            <if test="staffId != null ">
                staff_id,
            </if>
            <if test="businessType != null ">
                business_type,
            </if>
            <if test="changeNum != null ">
                change_num,
            </if>
            <if test="businessSource != null ">
                business_source,
            </if>
            <if test="requestId != null ">
                requestid,
            </if>
            <if test="description != null ">
                description,
            </if>
        </trim>
        <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
            <if test="creator != null">
                #{creator},
            </if>
            <if test="deleteType != null">
                #{deleteType},
            </if>
            <if test="createTime != null">
                #{createTime},
            </if>
            <if test="updateTime != null">
                #{updateTime},
            </if>

            <if test="staffId != null ">
                #{staffId},
            </if>
            <if test="businessType != null ">
                #{businessType},
            </if>
            <if test="changeNum != null ">
                #{changeNum},
            </if>
            <if test="businessSource != null ">
                #{businessSource},
            </if>
            <if test="requestId != null ">
                #{requestId},
            </if>
            <if test="description != null ">
                #{description},
            </if>
        </trim>
    </insert>

</mapper>