<#list fieldList! as field>
<#-- 字典 start -->
<#if field.fieldType == "radio" || field.fieldType == "checkbox" || field.fieldType == "select">
#if>
<#-- 字典 end -->
<#-- 联表 start -->
<#if field.fieldType == "innerJoin" || field.fieldType == "leftJoin" || field.fieldType == "rightJoin">
<#list field.listJoinTableField! as joinTableField>
<#if joinTableField.listShow == 1>
#if>
#list>
#if>
<#-- 联表 end -->
#list>
INSERT INTO ${tablePrefix}${underLineTableName}(
${underLineTableName}_id,
<#list fieldList! as field>
${field.underLineFieldName},
#list>
creator,
gmt_create,
modifier,
gmt_modified,
is_delete
) VALUES(
${r"#{"}${firstLowerTableName}Id${r"}"},
<#list fieldList! as field>
${r"#{"}${field.fieldName}${r"}"},
#list>
${r"#{creator}"},
${r"#{gmtCreate}"},
${r"#{modifier}"},
${r"#{gmtModified}"},
${r"#{isDelete}"}
)
UPDATE
${tablePrefix}${underLineTableName}
SET
is_delete = 1,
modifier = ${r"#{modifier}"},
gmt_modified = ${r"#{gmtModified}"}
WHERE
${underLineTableName}_id IN
${r"#{"}${firstLowerTableName}${r"Ids[${index}]}"}
DELETE FROM
${tablePrefix}${underLineTableName}
WHERE
${underLineTableName}_id IN
${r"#{"}${firstLowerTableName}${r"Ids[${index}]}"}
UPDATE
${tablePrefix}${underLineTableName}
SET
<#list fieldList! as field>
<#if field.fieldType == "number" || field.fieldType == "double">
${field.underLineFieldName} = ${r"#{"}${field.fieldName}${r"}"},
<#else>
${field.underLineFieldName} = ${r"#{"}${field.fieldName}${r"}"},
#if>
#list>
modifier = ${r"#{modifier}"},
gmt_modified = ${r"#{gmtModified}"}
WHERE
${underLineTableName}_id = ${r"#{"}${firstLowerTableName}${r"Id}"}