<?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="com.hotent.base.example.dao.StudentDao">
	<resultMap id="Student"
		type="com.hotent.base.example.model.Student">
		<id property="id" column="ID_" jdbcType="VARCHAR" />
		<result property="name" column="NAME_" jdbcType="VARCHAR" />
		<result property="birthday" column="BIRTHDAY_"
			jdbcType="TIMESTAMP" />
		<result property="sex" column="SEX_" jdbcType="NUMERIC" />
		<result property="desc" column="DESC_" jdbcType="VARCHAR" />
	</resultMap>

	<select id="selectPage" resultType="com.hotent.base.example.model.Student">
		select * 
		<if test="ew.paramNameValuePairs.dbType=='mysql'">
		, id_ as tmp
		</if>
		from ex_student ${ew.customSqlSegment} 
	</select>
	
	<select id="getSingleByName" resultType="com.hotent.base.example.model.Student">
		select *
		from ex_student where name_=#{name}
	</select>
</mapper>