Commit 397ba268 authored by neo's avatar neo

[dev] add xml for batch insert

parent 82b94634
......@@ -5,7 +5,33 @@
<insert id="batchInsert" parameterType="pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig">
INSERT ALL
<foreach collection="list" item="item">
INTO PERIOD_CELL_TEMPLATE_CONFIG VALUES
INTO PERIOD_CELL_TEMPLATE_CONFIG (
ID,
PERIOD,
CELL_TEMPLATE_ID,
REPORT_TEMPLATE_ID,
DATA_SOURCE_TYPE,
FORMULA,
PARSED_FORMULA,
FORMULA_DESCRIPTION,
ACCOUNT_CODES,
INVOICE_TYPE,
TAX_RATE,
INVOICE_AMOUNT_TYPE,
MODEL_IDS,
CREATE_BY,
CREATE_TIME,
UPDATE_BY,
UPDATE_TIME,
INVOICE_CATEGORY,
FORMULA_DATA_SOURCE,
VALIDATION,
PARSED_VALIDATION,
VALIDATION_DESCRIPTION,
VOUCHER_KEYWORD,
CELL_TEMPLATE_CONFIG_ID,
KEY_VALUE_PARSED_FORMULA
) VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
<choose>
<when test="item.id != null">#{item.id,jdbcType=INTEGER},</when>
......
......@@ -83,6 +83,10 @@
<when test="item.createBy != null">#{item.createBy,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise>
</choose>
<choose>
<when test="item.updateBy != null">#{item.updateBy,jdbcType=VARCHAR},</when>
<otherwise>' ',</otherwise>
</choose>
</trim>
</foreach>
SELECT 1 FROM DUAL
......@@ -126,4 +130,4 @@
AND TEMPLATE.IS_ACTIVE_ASSOCIATION=1
</select>
</mapper>
\ No newline at end of file
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment