<?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.fuxi.ws.data.dao.SizeMapper">
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.Size">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    <id column="SizeID" jdbcType="VARCHAR" property="sizeid" />
    <result column="No" jdbcType="VARCHAR" property="no" />
    <result column="Size" jdbcType="VARCHAR" property="size" />
    <result column="OtherFlag" jdbcType="BIT" property="otherflag" />
    <result column="UseFlag" jdbcType="BIT" property="useflag" />
    <result column="Memo" jdbcType="VARCHAR" property="memo" />
    <result column="UK" jdbcType="VARCHAR" property="uk" />
    <result column="USA" jdbcType="VARCHAR" property="usa" />
    <result column="Size_EShop" jdbcType="VARCHAR" property="sizeEshop" />
    <result column="SupplierID" jdbcType="INTEGER" property="supplierid" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    SizeID, No, Size, OtherFlag, UseFlag, Memo, UK, USA, Size_EShop, SupplierID
  </sql>
  <select id="selectByExample" parameterType="com.fuxi.ws.data.entity.SizeExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from Size
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    select 
    <include refid="Base_Column_List" />
    from Size
    where SizeID = #{sizeid,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    delete from Size
    where SizeID = #{sizeid,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.Size">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    insert into Size (SizeID, No, Size, 
      OtherFlag, UseFlag, Memo, UK, 
      USA, Size_EShop, SupplierID
      )
    values (#{sizeid,jdbcType=VARCHAR}, #{no,jdbcType=VARCHAR}, #{size,jdbcType=VARCHAR}, 
      #{otherflag,jdbcType=BIT}, #{useflag,jdbcType=BIT}, #{memo,jdbcType=VARCHAR}, #{uk,jdbcType=VARCHAR}, 
      #{usa,jdbcType=VARCHAR}, #{sizeEshop,jdbcType=VARCHAR}, #{supplierid,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.Size">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    insert into Size
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="sizeid != null">
        SizeID,
      </if>
      <if test="no != null">
        No,
      </if>
      <if test="size != null">
        Size,
      </if>
      <if test="otherflag != null">
        OtherFlag,
      </if>
      <if test="useflag != null">
        UseFlag,
      </if>
      <if test="memo != null">
        Memo,
      </if>
      <if test="uk != null">
        UK,
      </if>
      <if test="usa != null">
        USA,
      </if>
      <if test="sizeEshop != null">
        Size_EShop,
      </if>
      <if test="supplierid != null">
        SupplierID,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="sizeid != null">
        #{sizeid,jdbcType=VARCHAR},
      </if>
      <if test="no != null">
        #{no,jdbcType=VARCHAR},
      </if>
      <if test="size != null">
        #{size,jdbcType=VARCHAR},
      </if>
      <if test="otherflag != null">
        #{otherflag,jdbcType=BIT},
      </if>
      <if test="useflag != null">
        #{useflag,jdbcType=BIT},
      </if>
      <if test="memo != null">
        #{memo,jdbcType=VARCHAR},
      </if>
      <if test="uk != null">
        #{uk,jdbcType=VARCHAR},
      </if>
      <if test="usa != null">
        #{usa,jdbcType=VARCHAR},
      </if>
      <if test="sizeEshop != null">
        #{sizeEshop,jdbcType=VARCHAR},
      </if>
      <if test="supplierid != null">
        #{supplierid,jdbcType=INTEGER},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.SizeExample" resultType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    select count(*) from Size
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.Size">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    update Size
    <set>
      <if test="no != null">
        No = #{no,jdbcType=VARCHAR},
      </if>
      <if test="size != null">
        Size = #{size,jdbcType=VARCHAR},
      </if>
      <if test="otherflag != null">
        OtherFlag = #{otherflag,jdbcType=BIT},
      </if>
      <if test="useflag != null">
        UseFlag = #{useflag,jdbcType=BIT},
      </if>
      <if test="memo != null">
        Memo = #{memo,jdbcType=VARCHAR},
      </if>
      <if test="uk != null">
        UK = #{uk,jdbcType=VARCHAR},
      </if>
      <if test="usa != null">
        USA = #{usa,jdbcType=VARCHAR},
      </if>
      <if test="sizeEshop != null">
        Size_EShop = #{sizeEshop,jdbcType=VARCHAR},
      </if>
      <if test="supplierid != null">
        SupplierID = #{supplierid,jdbcType=INTEGER},
      </if>
    </set>
    where SizeID = #{sizeid,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.Size">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Dec 06 16:09:37 CST 2016.
    -->
    update Size
    set No = #{no,jdbcType=VARCHAR},
      Size = #{size,jdbcType=VARCHAR},
      OtherFlag = #{otherflag,jdbcType=BIT},
      UseFlag = #{useflag,jdbcType=BIT},
      Memo = #{memo,jdbcType=VARCHAR},
      UK = #{uk,jdbcType=VARCHAR},
      USA = #{usa,jdbcType=VARCHAR},
      Size_EShop = #{sizeEshop,jdbcType=VARCHAR},
      SupplierID = #{supplierid,jdbcType=INTEGER}
    where SizeID = #{sizeid,jdbcType=VARCHAR}
  </update>
  
  <select id="getsize" parameterType="java.util.HashMap" resultType="java.util.LinkedHashMap"> 
  		select SizeID,No,Size from Size 
    <if test="conditions != null and conditions != ''">
		where			
		${conditions}
	</if>
	order by No,Size
  </select>
</mapper>