<?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="${packageName}.mapper.${ClassName}Mapper">

    <!-- 通用查询映射结果 -->
    <resultMap type="${packageName}.entity.${ClassName}" id="BaseResultMap">
#foreach ($column in $columns)
#if ($column.isPk == "1")
        <id column="${column.columnName}" property="${column.javaField}"/>
#else
        <result column="${column.columnName}" property="${column.javaField}"/>
#end
#end
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
#foreach ($column in $columns)
        ${column.columnName}#if($foreach.count != $columns.size()),#end

#end
    </sql>

</mapper>
