<#if enableCache>
#if>
<#if baseResultMap>
<#list table.fields as field>
<#if field.keyFlag><#--生成主键排在第一位-->
<#if field.type?starts_with("int")>
<#elseif field.type?starts_with("datetime")>
<#elseif field.type?starts_with("text") || field.type?starts_with("longtext")>
<#else>
<#if field.type?contains("(")>
<#assign fType = field.type?substring(0, field.type?index_of("("))?upper_case/>
<#else>
#if>
#if>
#if>
#list>
<#list table.commonFields as field><#--生成公共字段 -->
<#if field.keyFlag>
<#if field.type?starts_with("int")>
<#elseif field.type?starts_with("datetime")>
<#elseif field.type?starts_with("text") || field.type?starts_with("longtext")>
<#else>
<#if field.type?contains("(")>
<#assign fType = field.type?substring(0, field.type?index_of("("))?upper_case/>
<#else>
#if>
#if>
<#else>
<#if field.type?starts_with("int")>
<#elseif field.type?starts_with("datetime")>
<#elseif field.type?starts_with("text") || field.type?starts_with("longtext") || field.type?starts_with("mediumtext")>
<#else>
<#if field.type?contains("(")>
<#assign fType = field.type?substring(0, field.type?index_of("("))?upper_case/>
<#else>
#if>
#if>
#if>
#list>
<#list table.fields as field>
<#if !field.keyFlag><#--生成普通字段 -->
<#assign myPropertyName="${field.propertyName}"/>
<#-- 自动注入注解 -->
<#if field.customMap.annotation?? && field.propertyName?ends_with("Id")>
<#assign myPropertyName="${field.propertyName!?substring(0,field.propertyName?index_of('Id'))}"/>
#if>
<#if field.type?starts_with("int")>
<#elseif field.type?starts_with("datetime")>
<#elseif field.type?starts_with("text") || field.type?starts_with("longtext") || field.type?starts_with("mediumtext")>
<#else>
<#if field.type?contains("(")>
<#assign fType = field.type?substring(0, field.type?index_of("("))?upper_case/>
<#else>
#if>
#if>
#if>
#list>
#if>
<#if baseColumnList>
${table.fieldNames}
#if>