<?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.WFootscanMapper">
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.WFootscan">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Dec 16 13:44:53 CST 2016.
    -->
    <id column="FootScanID" jdbcType="INTEGER" property="footscanid" />
    <result column="Deviceid" jdbcType="VARCHAR" property="deviceid" />
    <result column="Openid" jdbcType="VARCHAR" property="openid" />
    <result column="Mobile" jdbcType="VARCHAR" property="mobile" />
    <result column="Sex" jdbcType="TINYINT" property="sex" />
    <result column="VIPID" jdbcType="VARCHAR" property="vipid" />
    <result column="Area" jdbcType="VARCHAR" property="area" />
    <result column="Vit" jdbcType="VARCHAR" property="vit" />
    <result column="ScanTime" jdbcType="TIMESTAMP" property="scantime" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Dec 16 13:44:53 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 Fri Dec 16 13:44:53 CST 2016.
    -->
    FootScanID, Deviceid, Openid, Mobile, Sex, VIPID, Area, Vit, ScanTime
  </sql>
  <select id="selectByExample" parameterType="com.fuxi.ws.data.entity.WFootscanExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Dec 16 13:44:53 CST 2016.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from W_FootScan
    <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 Fri Dec 16 13:44:53 CST 2016.
    -->
    select 
    <include refid="Base_Column_List" />
    from W_FootScan
    where FootScanID = #{footscanid,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 Fri Dec 16 13:44:53 CST 2016.
    -->
    delete from W_FootScan
    where FootScanID = #{footscanid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.WFootscan">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Dec 16 13:44:53 CST 2016.
    -->
    insert into W_FootScan (FootScanID, Deviceid, Openid, 
      Mobile, Sex, VIPID, 
      Area, Vit, ScanTime
      )
    values (#{footscanid,jdbcType=INTEGER}, #{deviceid,jdbcType=VARCHAR}, #{openid,jdbcType=VARCHAR}, 
      #{mobile,jdbcType=VARCHAR}, #{sex,jdbcType=TINYINT}, #{vipid,jdbcType=VARCHAR}, 
      #{area,jdbcType=VARCHAR}, #{vit,jdbcType=VARCHAR}, #{scantime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.WFootscan">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Dec 16 13:44:53 CST 2016.
    -->
    insert into W_FootScan
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="footscanid != null">
        FootScanID,
      </if>
      <if test="deviceid != null">
        Deviceid,
      </if>
      <if test="openid != null">
        Openid,
      </if>
      <if test="mobile != null">
        Mobile,
      </if>
      <if test="sex != null">
        Sex,
      </if>
      <if test="vipid != null">
        VIPID,
      </if>
      <if test="area != null">
        Area,
      </if>
      <if test="vit != null">
        Vit,
      </if>
      <if test="scantime != null">
        ScanTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="footscanid != null">
        #{footscanid,jdbcType=INTEGER},
      </if>
      <if test="deviceid != null">
        #{deviceid,jdbcType=VARCHAR},
      </if>
      <if test="openid != null">
        #{openid,jdbcType=VARCHAR},
      </if>
      <if test="mobile != null">
        #{mobile,jdbcType=VARCHAR},
      </if>
      <if test="sex != null">
        #{sex,jdbcType=TINYINT},
      </if>
      <if test="vipid != null">
        #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="area != null">
        #{area,jdbcType=VARCHAR},
      </if>
      <if test="vit != null">
        #{vit,jdbcType=VARCHAR},
      </if>
      <if test="scantime != null">
        #{scantime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.WFootscanExample" resultType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Dec 16 13:44:53 CST 2016.
    -->
    select count(*) from W_FootScan
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.WFootscan">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Dec 16 13:44:53 CST 2016.
    -->
    update W_FootScan
    <set>
      <if test="deviceid != null">
        Deviceid = #{deviceid,jdbcType=VARCHAR},
      </if>
      <if test="openid != null">
        Openid = #{openid,jdbcType=VARCHAR},
      </if>
      <if test="mobile != null">
        Mobile = #{mobile,jdbcType=VARCHAR},
      </if>
      <if test="sex != null">
        Sex = #{sex,jdbcType=TINYINT},
      </if>
      <if test="vipid != null">
        VIPID = #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="area != null">
        Area = #{area,jdbcType=VARCHAR},
      </if>
      <if test="vit != null">
        Vit = #{vit,jdbcType=VARCHAR},
      </if>
      <if test="scantime != null">
        ScanTime = #{scantime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where FootScanID = #{footscanid,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WFootscan">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Dec 16 13:44:53 CST 2016.
    -->
    update W_FootScan
    set Deviceid = #{deviceid,jdbcType=VARCHAR},
      Openid = #{openid,jdbcType=VARCHAR},
      Mobile = #{mobile,jdbcType=VARCHAR},
      Sex = #{sex,jdbcType=TINYINT},
      VIPID = #{vipid,jdbcType=VARCHAR},
      Area = #{area,jdbcType=VARCHAR},
      Vit = #{vit,jdbcType=VARCHAR},
      ScanTime = #{scantime,jdbcType=TIMESTAMP}
    where FootScanID = #{footscanid,jdbcType=INTEGER}
  </update>
</mapper>