From d151aff1477848e729097b2780ebd5813814f854 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 23 Jul 2018 21:34:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90insert?= =?UTF-8?q?=E5=90=8E=E7=BC=80=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/vm/xml/Mapper.xml.vm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/resources/templates/vm/xml/Mapper.xml.vm b/src/main/resources/templates/vm/xml/Mapper.xml.vm index 60ba37dd..f82e7cbc 100644 --- a/src/main/resources/templates/vm/xml/Mapper.xml.vm +++ b/src/main/resources/templates/vm/xml/Mapper.xml.vm @@ -29,19 +29,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - insert into ${tableName} ( + insert into ${tableName} + #foreach($column in $columns) #if($column.columnName != $primaryKey.columnName || $primaryKey.extra != 'auto_increment') - $column.columnName#if($velocityCount != $columns.size()), #end + $column.columnName, #end #end - )values( + + #foreach($column in $columns) #if($column.columnName != $primaryKey.columnName || $primaryKey.extra != 'auto_increment') - #{$column.attrname}#if($velocityCount != $columns.size()), #end + #{$column.attrname}, #end #end - ) +