<?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.tanpu.fund.mapper.generator.PersonCompanyPositionMappingMapper"> <resultMap id="BaseResultMap" type="com.tanpu.fund.entity.generator.PersonCompanyPositionMapping"> <!--@mbg.generated--> <!--@Table person_company_position_mapping--> <id column="id" jdbcType="VARCHAR" property="id" /> <result column="personnel_id" jdbcType="VARCHAR" property="personnelId" /> <result column="company_id" jdbcType="VARCHAR" property="companyId" /> <result column="personnel_type" jdbcType="INTEGER" property="personnelType" /> <result column="position" jdbcType="VARCHAR" property="position" /> <result column="department" jdbcType="VARCHAR" property="department" /> <result column="is_default" jdbcType="INTEGER" property="isDefault" /> <result column="start_date" jdbcType="DATE" property="startDate" /> <result column="end_date" jdbcType="DATE" property="endDate" /> <result column="position_order" jdbcType="INTEGER" property="positionOrder" /> <result column="create_by" jdbcType="VARCHAR" property="createBy" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="delete_tag" jdbcType="INTEGER" property="deleteTag" /> </resultMap> <sql id="Example_Where_Clause"> <!--@mbg.generated--> <where> <foreach collection="oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause"> <!--@mbg.generated--> <where> <foreach collection="example.oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List"> <!--@mbg.generated--> id, personnel_id, company_id, personnel_type, `position`, department, is_default, start_date, end_date, position_order, create_by, create_time, update_by, update_time, delete_tag </sql> <select id="selectByExample" parameterType="com.tanpu.fund.entity.generator.PersonCompanyPositionMappingExample" resultMap="BaseResultMap"> <!--@mbg.generated--> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from person_company_position_mapping <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <!--@mbg.generated--> select <include refid="Base_Column_List" /> from person_company_position_mapping where id = #{id,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> <!--@mbg.generated--> delete from person_company_position_mapping where id = #{id,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="com.tanpu.fund.entity.generator.PersonCompanyPositionMappingExample"> <!--@mbg.generated--> delete from person_company_position_mapping <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.tanpu.fund.entity.generator.PersonCompanyPositionMapping"> <!--@mbg.generated--> insert into person_company_position_mapping (id, personnel_id, company_id, personnel_type, `position`, department, is_default, start_date, end_date, position_order, create_by, create_time, update_by, update_time, delete_tag ) values (#{id,jdbcType=VARCHAR}, #{personnelId,jdbcType=VARCHAR}, #{companyId,jdbcType=VARCHAR}, #{personnelType,jdbcType=INTEGER}, #{position,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, #{isDefault,jdbcType=INTEGER}, #{startDate,jdbcType=DATE}, #{endDate,jdbcType=DATE}, #{positionOrder,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteTag,jdbcType=INTEGER} ) </insert> <insert id="insertSelective" parameterType="com.tanpu.fund.entity.generator.PersonCompanyPositionMapping"> <!--@mbg.generated--> insert into person_company_position_mapping <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="personnelId != null"> personnel_id, </if> <if test="companyId != null"> company_id, </if> <if test="personnelType != null"> personnel_type, </if> <if test="position != null"> `position`, </if> <if test="department != null"> department, </if> <if test="isDefault != null"> is_default, </if> <if test="startDate != null"> start_date, </if> <if test="endDate != null"> end_date, </if> <if test="positionOrder != null"> position_order, </if> <if test="createBy != null"> create_by, </if> <if test="createTime != null"> create_time, </if> <if test="updateBy != null"> update_by, </if> <if test="updateTime != null"> update_time, </if> <if test="deleteTag != null"> delete_tag, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="personnelId != null"> #{personnelId,jdbcType=VARCHAR}, </if> <if test="companyId != null"> #{companyId,jdbcType=VARCHAR}, </if> <if test="personnelType != null"> #{personnelType,jdbcType=INTEGER}, </if> <if test="position != null"> #{position,jdbcType=VARCHAR}, </if> <if test="department != null"> #{department,jdbcType=VARCHAR}, </if> <if test="isDefault != null"> #{isDefault,jdbcType=INTEGER}, </if> <if test="startDate != null"> #{startDate,jdbcType=DATE}, </if> <if test="endDate != null"> #{endDate,jdbcType=DATE}, </if> <if test="positionOrder != null"> #{positionOrder,jdbcType=INTEGER}, </if> <if test="createBy != null"> #{createBy,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> #{deleteTag,jdbcType=INTEGER}, </if> </trim> </insert> <select id="countByExample" parameterType="com.tanpu.fund.entity.generator.PersonCompanyPositionMappingExample" resultType="java.lang.Long"> <!--@mbg.generated--> select count(*) from person_company_position_mapping <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> <!--@mbg.generated--> update person_company_position_mapping <set> <if test="record.id != null"> id = #{record.id,jdbcType=VARCHAR}, </if> <if test="record.personnelId != null"> personnel_id = #{record.personnelId,jdbcType=VARCHAR}, </if> <if test="record.companyId != null"> company_id = #{record.companyId,jdbcType=VARCHAR}, </if> <if test="record.personnelType != null"> personnel_type = #{record.personnelType,jdbcType=INTEGER}, </if> <if test="record.position != null"> `position` = #{record.position,jdbcType=VARCHAR}, </if> <if test="record.department != null"> department = #{record.department,jdbcType=VARCHAR}, </if> <if test="record.isDefault != null"> is_default = #{record.isDefault,jdbcType=INTEGER}, </if> <if test="record.startDate != null"> start_date = #{record.startDate,jdbcType=DATE}, </if> <if test="record.endDate != null"> end_date = #{record.endDate,jdbcType=DATE}, </if> <if test="record.positionOrder != null"> position_order = #{record.positionOrder,jdbcType=INTEGER}, </if> <if test="record.createBy != null"> create_by = #{record.createBy,jdbcType=VARCHAR}, </if> <if test="record.createTime != null"> create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.updateBy != null"> update_by = #{record.updateBy,jdbcType=VARCHAR}, </if> <if test="record.updateTime != null"> update_time = #{record.updateTime,jdbcType=TIMESTAMP}, </if> <if test="record.deleteTag != null"> delete_tag = #{record.deleteTag,jdbcType=INTEGER}, </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map"> <!--@mbg.generated--> update person_company_position_mapping set id = #{record.id,jdbcType=VARCHAR}, personnel_id = #{record.personnelId,jdbcType=VARCHAR}, company_id = #{record.companyId,jdbcType=VARCHAR}, personnel_type = #{record.personnelType,jdbcType=INTEGER}, `position` = #{record.position,jdbcType=VARCHAR}, department = #{record.department,jdbcType=VARCHAR}, is_default = #{record.isDefault,jdbcType=INTEGER}, start_date = #{record.startDate,jdbcType=DATE}, end_date = #{record.endDate,jdbcType=DATE}, position_order = #{record.positionOrder,jdbcType=INTEGER}, create_by = #{record.createBy,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, update_by = #{record.updateBy,jdbcType=VARCHAR}, update_time = #{record.updateTime,jdbcType=TIMESTAMP}, delete_tag = #{record.deleteTag,jdbcType=INTEGER} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.tanpu.fund.entity.generator.PersonCompanyPositionMapping"> <!--@mbg.generated--> update person_company_position_mapping <set> <if test="personnelId != null"> personnel_id = #{personnelId,jdbcType=VARCHAR}, </if> <if test="companyId != null"> company_id = #{companyId,jdbcType=VARCHAR}, </if> <if test="personnelType != null"> personnel_type = #{personnelType,jdbcType=INTEGER}, </if> <if test="position != null"> `position` = #{position,jdbcType=VARCHAR}, </if> <if test="department != null"> department = #{department,jdbcType=VARCHAR}, </if> <if test="isDefault != null"> is_default = #{isDefault,jdbcType=INTEGER}, </if> <if test="startDate != null"> start_date = #{startDate,jdbcType=DATE}, </if> <if test="endDate != null"> end_date = #{endDate,jdbcType=DATE}, </if> <if test="positionOrder != null"> position_order = #{positionOrder,jdbcType=INTEGER}, </if> <if test="createBy != null"> create_by = #{createBy,jdbcType=VARCHAR}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> update_by = #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> delete_tag = #{deleteTag,jdbcType=INTEGER}, </if> </set> where id = #{id,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="com.tanpu.fund.entity.generator.PersonCompanyPositionMapping"> <!--@mbg.generated--> update person_company_position_mapping set personnel_id = #{personnelId,jdbcType=VARCHAR}, company_id = #{companyId,jdbcType=VARCHAR}, personnel_type = #{personnelType,jdbcType=INTEGER}, `position` = #{position,jdbcType=VARCHAR}, department = #{department,jdbcType=VARCHAR}, is_default = #{isDefault,jdbcType=INTEGER}, start_date = #{startDate,jdbcType=DATE}, end_date = #{endDate,jdbcType=DATE}, position_order = #{positionOrder,jdbcType=INTEGER}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP}, delete_tag = #{deleteTag,jdbcType=INTEGER} where id = #{id,jdbcType=VARCHAR} </update> <update id="updateBatch" parameterType="java.util.List"> <!--@mbg.generated--> update person_company_position_mapping <trim prefix="set" suffixOverrides=","> <trim prefix="personnel_id = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.personnelId,jdbcType=VARCHAR} </foreach> </trim> <trim prefix="company_id = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.companyId,jdbcType=VARCHAR} </foreach> </trim> <trim prefix="personnel_type = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.personnelType,jdbcType=INTEGER} </foreach> </trim> <trim prefix="`position` = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.position,jdbcType=VARCHAR} </foreach> </trim> <trim prefix="department = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.department,jdbcType=VARCHAR} </foreach> </trim> <trim prefix="is_default = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.isDefault,jdbcType=INTEGER} </foreach> </trim> <trim prefix="start_date = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.startDate,jdbcType=DATE} </foreach> </trim> <trim prefix="end_date = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.endDate,jdbcType=DATE} </foreach> </trim> <trim prefix="position_order = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.positionOrder,jdbcType=INTEGER} </foreach> </trim> <trim prefix="create_by = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.createBy,jdbcType=VARCHAR} </foreach> </trim> <trim prefix="create_time = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP} </foreach> </trim> <trim prefix="update_by = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.updateBy,jdbcType=VARCHAR} </foreach> </trim> <trim prefix="update_time = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP} </foreach> </trim> <trim prefix="delete_tag = case" suffix="end,"> <foreach collection="list" index="index" item="item"> when id = #{item.id,jdbcType=VARCHAR} then #{item.deleteTag,jdbcType=INTEGER} </foreach> </trim> </trim> where id in <foreach close=")" collection="list" item="item" open="(" separator=", "> #{item.id,jdbcType=VARCHAR} </foreach> </update> <update id="updateBatchSelective" parameterType="java.util.List"> <!--@mbg.generated--> update person_company_position_mapping <trim prefix="set" suffixOverrides=","> <trim prefix="personnel_id = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.personnelId != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.personnelId,jdbcType=VARCHAR} </if> </foreach> </trim> <trim prefix="company_id = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.companyId != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.companyId,jdbcType=VARCHAR} </if> </foreach> </trim> <trim prefix="personnel_type = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.personnelType != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.personnelType,jdbcType=INTEGER} </if> </foreach> </trim> <trim prefix="`position` = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.position != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.position,jdbcType=VARCHAR} </if> </foreach> </trim> <trim prefix="department = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.department != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.department,jdbcType=VARCHAR} </if> </foreach> </trim> <trim prefix="is_default = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.isDefault != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.isDefault,jdbcType=INTEGER} </if> </foreach> </trim> <trim prefix="start_date = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.startDate != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.startDate,jdbcType=DATE} </if> </foreach> </trim> <trim prefix="end_date = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.endDate != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.endDate,jdbcType=DATE} </if> </foreach> </trim> <trim prefix="position_order = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.positionOrder != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.positionOrder,jdbcType=INTEGER} </if> </foreach> </trim> <trim prefix="create_by = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.createBy != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.createBy,jdbcType=VARCHAR} </if> </foreach> </trim> <trim prefix="create_time = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.createTime != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP} </if> </foreach> </trim> <trim prefix="update_by = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.updateBy != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.updateBy,jdbcType=VARCHAR} </if> </foreach> </trim> <trim prefix="update_time = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.updateTime != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP} </if> </foreach> </trim> <trim prefix="delete_tag = case" suffix="end,"> <foreach collection="list" index="index" item="item"> <if test="item.deleteTag != null"> when id = #{item.id,jdbcType=VARCHAR} then #{item.deleteTag,jdbcType=INTEGER} </if> </foreach> </trim> </trim> where id in <foreach close=")" collection="list" item="item" open="(" separator=", "> #{item.id,jdbcType=VARCHAR} </foreach> </update> <insert id="batchInsert" parameterType="map"> <!--@mbg.generated--> insert into person_company_position_mapping (id, personnel_id, company_id, personnel_type, `position`, department, is_default, start_date, end_date, position_order, create_by, create_time, update_by, update_time, delete_tag) values <foreach collection="list" item="item" separator=","> (#{item.id,jdbcType=VARCHAR}, #{item.personnelId,jdbcType=VARCHAR}, #{item.companyId,jdbcType=VARCHAR}, #{item.personnelType,jdbcType=INTEGER}, #{item.position,jdbcType=VARCHAR}, #{item.department,jdbcType=VARCHAR}, #{item.isDefault,jdbcType=INTEGER}, #{item.startDate,jdbcType=DATE}, #{item.endDate,jdbcType=DATE}, #{item.positionOrder,jdbcType=INTEGER}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteTag,jdbcType=INTEGER} ) </foreach> </insert> <insert id="insertOrUpdate" parameterType="com.tanpu.fund.entity.generator.PersonCompanyPositionMapping"> <!--@mbg.generated--> insert into person_company_position_mapping (id, personnel_id, company_id, personnel_type, `position`, department, is_default, start_date, end_date, position_order, create_by, create_time, update_by, update_time, delete_tag) values (#{id,jdbcType=VARCHAR}, #{personnelId,jdbcType=VARCHAR}, #{companyId,jdbcType=VARCHAR}, #{personnelType,jdbcType=INTEGER}, #{position,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR}, #{isDefault,jdbcType=INTEGER}, #{startDate,jdbcType=DATE}, #{endDate,jdbcType=DATE}, #{positionOrder,jdbcType=INTEGER}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteTag,jdbcType=INTEGER} ) on duplicate key update id = #{id,jdbcType=VARCHAR}, personnel_id = #{personnelId,jdbcType=VARCHAR}, company_id = #{companyId,jdbcType=VARCHAR}, personnel_type = #{personnelType,jdbcType=INTEGER}, `position` = #{position,jdbcType=VARCHAR}, department = #{department,jdbcType=VARCHAR}, is_default = #{isDefault,jdbcType=INTEGER}, start_date = #{startDate,jdbcType=DATE}, end_date = #{endDate,jdbcType=DATE}, position_order = #{positionOrder,jdbcType=INTEGER}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP}, delete_tag = #{deleteTag,jdbcType=INTEGER} </insert> <insert id="insertOrUpdateSelective" parameterType="com.tanpu.fund.entity.generator.PersonCompanyPositionMapping"> <!--@mbg.generated--> insert into person_company_position_mapping <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> id, </if> <if test="personnelId != null"> personnel_id, </if> <if test="companyId != null"> company_id, </if> <if test="personnelType != null"> personnel_type, </if> <if test="position != null"> `position`, </if> <if test="department != null"> department, </if> <if test="isDefault != null"> is_default, </if> <if test="startDate != null"> start_date, </if> <if test="endDate != null"> end_date, </if> <if test="positionOrder != null"> position_order, </if> <if test="createBy != null"> create_by, </if> <if test="createTime != null"> create_time, </if> <if test="updateBy != null"> update_by, </if> <if test="updateTime != null"> update_time, </if> <if test="deleteTag != null"> delete_tag, </if> </trim> values <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null"> #{id,jdbcType=VARCHAR}, </if> <if test="personnelId != null"> #{personnelId,jdbcType=VARCHAR}, </if> <if test="companyId != null"> #{companyId,jdbcType=VARCHAR}, </if> <if test="personnelType != null"> #{personnelType,jdbcType=INTEGER}, </if> <if test="position != null"> #{position,jdbcType=VARCHAR}, </if> <if test="department != null"> #{department,jdbcType=VARCHAR}, </if> <if test="isDefault != null"> #{isDefault,jdbcType=INTEGER}, </if> <if test="startDate != null"> #{startDate,jdbcType=DATE}, </if> <if test="endDate != null"> #{endDate,jdbcType=DATE}, </if> <if test="positionOrder != null"> #{positionOrder,jdbcType=INTEGER}, </if> <if test="createBy != null"> #{createBy,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> #{deleteTag,jdbcType=INTEGER}, </if> </trim> on duplicate key update <trim suffixOverrides=","> <if test="id != null"> id = #{id,jdbcType=VARCHAR}, </if> <if test="personnelId != null"> personnel_id = #{personnelId,jdbcType=VARCHAR}, </if> <if test="companyId != null"> company_id = #{companyId,jdbcType=VARCHAR}, </if> <if test="personnelType != null"> personnel_type = #{personnelType,jdbcType=INTEGER}, </if> <if test="position != null"> `position` = #{position,jdbcType=VARCHAR}, </if> <if test="department != null"> department = #{department,jdbcType=VARCHAR}, </if> <if test="isDefault != null"> is_default = #{isDefault,jdbcType=INTEGER}, </if> <if test="startDate != null"> start_date = #{startDate,jdbcType=DATE}, </if> <if test="endDate != null"> end_date = #{endDate,jdbcType=DATE}, </if> <if test="positionOrder != null"> position_order = #{positionOrder,jdbcType=INTEGER}, </if> <if test="createBy != null"> create_by = #{createBy,jdbcType=VARCHAR}, </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateBy != null"> update_by = #{updateBy,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> update_time = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="deleteTag != null"> delete_tag = #{deleteTag,jdbcType=INTEGER}, </if> </trim> </insert> </mapper>