<#include "../function.ftl"> <#include "../variable.ftl"> <#assign pkVar=getPkVar(model) > <#assign foreignKey=model.foreignKey> <#-- 模板开始 --> <#list colList as col> <#assign colName=convertUnderLine(col.columnName)> <#if (col.isPK)> <#else> <#list colList as col>${col.columnName?upper_case}<#if col_has_next>, INSERT INTO ${tableName?upper_case} () VALUES (<#list colList as col><#assign colName=convertUnderLine(col.columnName)><#noparse>#{${colName},jdbcType=${getJdbcType(col.colDbType)}<#noparse>}<#if col_has_next>, ) <#-- --> UPDATE ${tableName?upper_case} SET <#list commonList as col> <#assign colName=convertUnderLine(col.columnName)> ${col.columnName?upper_case}=<#noparse>#{${colName},jdbcType=${getJdbcType(col.colDbType)}<#noparse>}<#if col_has_next>, WHERE ${pk?upper_case}=<#noparse>#{${convertUnderLine(pk)}} DELETE FROM ${tableName?upper_case} WHERE ${pk?upper_case}=<#noparse>#{${convertUnderLine(pk)}} <#if sub?exists && sub==true> <#assign foreignKeyVar=convertUnderLine(foreignKey)> DELETE FROM ${tableName?upper_case} WHERE ${foreignKey?upper_case}=<#noparse>#{mainId}