<?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="sizeSqlMapper">
	<sql id="base_column">
		id,width,height
	</sql>

	<select id="findAllSize"  resultType="com.cloudcross.ssp.model.Size">
		select <include refid="base_column"/> 
		from t_size order by id desc
	</select>

	<select id="findSize" parameterType="int" resultType="com.cloudcross.ssp.model.Size">
		select <include refid="base_column"/>  
		from t_size where id = #{id} 
	</select>
	
	<select id="findSizeId" parameterType = "map" resultType="com.cloudcross.ssp.model.Size">
		select <include refid="base_column"/> 
		from t_size 
		where width = #{width} and height = #{height}
	</select>
</mapper>