<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${bean.pacageName}${bean.modulesName}.dao.${bean.className}Dao">
  <!-- Result Map -->
  <resultMap id="BaseResultMap" type="${bean.pacageName}${bean.modulesName}.bean.${bean.className}">
    <#list bean.fields as field>
    <result column="${field.fieldName}" property="${field.fieldJavaName}"/>
  </#list>
</resultMap>

  <!-- ${bean.tableName} table all fields -->
<sql id="Base_Column_List">
<#list bean.fields as field><#if field_index==0>${field.fieldName}
</#if><#if field_index!=0>,${field.fieldName}</#if></#list>
  </sql>

  <!-- 公共查询条件 -->
<sql id="Example_Where_Clause">
where deleted=0
<#list bean.fields as field>
<if test="${field.fieldJavaName}!=null <#if field.fieldType==" varchar">and ${field.fieldJavaName}!=''</#if>">and ${field.fieldName} = _#_{${field.fieldJavaName}}
</if>
  </#list>
  </sql>


  </mapper>


