<?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="cn.superdesk.uniorder.dao.mapper.organisation.SysCliqueOrgMapperEx">


    <insert id="insertSelective" parameterType="cn.superdesk.uniorder.dao.entity.organisation.SysCliqueOrg">
        <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
            SELECT LAST_INSERT_ID()
        </selectKey>
        insert into sys_clique_org
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="cliqueId != null">
                clique_id,
            </if>
            <if test="orgId != null">
                org_id,
            </if>
            <if test="higherPid != null">
                higher_pid,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=BIGINT},
            </if>
            <if test="cliqueId != null">
                #{cliqueId,jdbcType=BIGINT},
            </if>
            <if test="orgId != null">
                #{orgId,jdbcType=BIGINT},
            </if>
            <if test="higherPid != null">
                #{higherPid,jdbcType=BIGINT},
            </if>
        </trim>
    </insert>
</mapper>