<?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="pwc.taxtech.atms.dao.CitDraftAccountMappingMapper"> <insert id="insertBatch" parameterType="java.util.List"> insert into cit_draft_account_mapping (<include refid="Base_Column_List"/>) values <foreach collection="list" item="item" index="index" separator=","> <trim prefix="(" suffix=")" suffixOverrides=","> <choose> <when test="item.id != null">#{item.id,jdbcType=BIGINT},</when> <otherwise>0,</otherwise> </choose> <choose> <when test="item.organizationId != null">#{item.organizationId,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.projectId != null">#{item.projectId,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.period != null">#{item.period,jdbcType=INTEGER},</when> <otherwise>0,</otherwise> </choose> <choose> <when test="item.source != null">#{item.source,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.draftCode != null">#{item.draftCode,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.draftName != null">#{item.draftName,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.largeAttribute != null">#{item.largeAttribute,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.attribute != null">#{item.attribute,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.wpPosition != null">#{item.wpPosition,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.acctCode != null">#{item.acctCode,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.accountName != null">#{item.accountName,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.plRowSet != null">#{item.plRowSet,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.bsRowSet != null">#{item.bsRowSet,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.fetchNumber != null">#{item.fetchNumber,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.remark != null">#{item.remark,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.createdBy != null">#{item.createdBy,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.updatedBy != null">#{item.updatedBy,jdbcType=VARCHAR},</when> <otherwise>'',</otherwise> </choose> <choose> <when test="item.createTime != null">#{item.createTime,jdbcType=TIMESTAMP},</when> <otherwise>CURRENT_TIMESTAMP,</otherwise> </choose> <choose> <when test="item.updateTime != null">#{item.updateTime,jdbcType=TIMESTAMP},</when> <otherwise>CURRENT_TIMESTAMP,</otherwise> </choose> </trim> </foreach>; SELECT 1 FROM DUAL; </insert> </mapper>