<?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.WFootimgMapper">
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.WFootimg">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 CST 2016.
    -->
    <id column="FootImgID" jdbcType="INTEGER" property="footimgid" />
    <result column="FootScanID" jdbcType="INTEGER" property="footscanid" />
    <result column="RorL" jdbcType="TINYINT" property="rorl" />
    <result column="Img" jdbcType="VARCHAR" property="img" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 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 Wed Dec 14 18:09:50 CST 2016.
    -->
    FootImgID, FootScanID, RorL, Img
  </sql>
  <select id="selectByExample" parameterType="com.fuxi.ws.data.entity.WFootimgExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 CST 2016.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from W_FootImg
    <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.Integer" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 CST 2016.
    -->
    select 
    <include refid="Base_Column_List" />
    from W_FootImg
    where FootImgID = #{footimgid,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 CST 2016.
    -->
    delete from W_FootImg
    where FootImgID = #{footimgid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.WFootimg">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 CST 2016.
    -->
    insert into W_FootImg (FootImgID, FootScanID, RorL, 
      Img)
    values (#{footimgid,jdbcType=INTEGER}, #{footscanid,jdbcType=INTEGER}, #{rorl,jdbcType=TINYINT}, 
      #{img,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.WFootimg">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 CST 2016.
    -->
    insert into W_FootImg
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="footimgid != null">
        FootImgID,
      </if>
      <if test="footscanid != null">
        FootScanID,
      </if>
      <if test="rorl != null">
        RorL,
      </if>
      <if test="img != null">
        Img,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="footimgid != null">
        #{footimgid,jdbcType=INTEGER},
      </if>
      <if test="footscanid != null">
        #{footscanid,jdbcType=INTEGER},
      </if>
      <if test="rorl != null">
        #{rorl,jdbcType=TINYINT},
      </if>
      <if test="img != null">
        #{img,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.WFootimgExample" resultType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 CST 2016.
    -->
    select count(*) from W_FootImg
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.WFootimg">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 CST 2016.
    -->
    update W_FootImg
    <set>
      <if test="footscanid != null">
        FootScanID = #{footscanid,jdbcType=INTEGER},
      </if>
      <if test="rorl != null">
        RorL = #{rorl,jdbcType=TINYINT},
      </if>
      <if test="img != null">
        Img = #{img,jdbcType=VARCHAR},
      </if>
    </set>
    where FootImgID = #{footimgid,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WFootimg">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Dec 14 18:09:50 CST 2016.
    -->
    update W_FootImg
    set FootScanID = #{footscanid,jdbcType=INTEGER},
      RorL = #{rorl,jdbcType=TINYINT},
      Img = #{img,jdbcType=VARCHAR}
    where FootImgID = #{footimgid,jdbcType=INTEGER}
  </update>
</mapper>