<?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.WUvMapper">
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.WUv">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jan 14 15:39:23 CST 2016.
    -->
    <id column="UVID" jdbcType="INTEGER" property="uvid" />
    <result column="VIPID" jdbcType="VARCHAR" property="vipid" />
    <result column="Created" jdbcType="TIMESTAMP" property="created" />
    <result column="Type" jdbcType="TINYINT" property="type" />
    <result column="GoodsID" jdbcType="VARCHAR" property="goodsid" />
    <result column="FormID" jdbcType="INTEGER" property="formid" />
    <result column="IP" jdbcType="VARCHAR" property="ip" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jan 14 15:39:23 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 Thu Jan 14 15:39:23 CST 2016.
    -->
    UVID, VIPID, Created, Type, GoodsID, FormID, IP
  </sql>
  <select id="selectByExample" parameterType="com.fuxi.ws.data.entity.WUvExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jan 14 15:39:23 CST 2016.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from W_UV
    <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 Thu Jan 14 15:39:23 CST 2016.
    -->
    select 
    <include refid="Base_Column_List" />
    from W_UV
    where UVID = #{uvid,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 Thu Jan 14 15:39:23 CST 2016.
    -->
    delete from W_UV
    where UVID = #{uvid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.WUv">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jan 14 15:39:23 CST 2016.
    -->
    insert into W_UV (UVID, VIPID, Created, 
      Type, GoodsID, FormID, 
      IP)
    values (#{uvid,jdbcType=INTEGER}, #{vipid,jdbcType=VARCHAR}, #{created,jdbcType=TIMESTAMP}, 
      #{type,jdbcType=TINYINT}, #{goodsid,jdbcType=VARCHAR}, #{formid,jdbcType=INTEGER}, 
      #{ip,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.WUv">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jan 14 15:39:23 CST 2016.
    -->
    insert into W_UV
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="uvid != null">
        UVID,
      </if>
      <if test="vipid != null">
        VIPID,
      </if>
      <if test="created != null">
        Created,
      </if>
      <if test="type != null">
        Type,
      </if>
      <if test="goodsid != null">
        GoodsID,
      </if>
      <if test="formid != null">
        FormID,
      </if>
      <if test="ip != null">
        IP,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="uvid != null">
        #{uvid,jdbcType=INTEGER},
      </if>
      <if test="vipid != null">
        #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="created != null">
        #{created,jdbcType=TIMESTAMP},
      </if>
      <if test="type != null">
        #{type,jdbcType=TINYINT},
      </if>
      <if test="goodsid != null">
        #{goodsid,jdbcType=VARCHAR},
      </if>
      <if test="formid != null">
        #{formid,jdbcType=INTEGER},
      </if>
      <if test="ip != null">
        #{ip,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.WUvExample" resultType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jan 14 15:39:23 CST 2016.
    -->
    select count(*) from W_UV
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.WUv">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jan 14 15:39:23 CST 2016.
    -->
    update W_UV
    <set>
      <if test="vipid != null">
        VIPID = #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="created != null">
        Created = #{created,jdbcType=TIMESTAMP},
      </if>
      <if test="type != null">
        Type = #{type,jdbcType=TINYINT},
      </if>
      <if test="goodsid != null">
        GoodsID = #{goodsid,jdbcType=VARCHAR},
      </if>
      <if test="formid != null">
        FormID = #{formid,jdbcType=INTEGER},
      </if>
      <if test="ip != null">
        IP = #{ip,jdbcType=VARCHAR},
      </if>
    </set>
    where UVID = #{uvid,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WUv">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jan 14 15:39:23 CST 2016.
    -->
    update W_UV
    set VIPID = #{vipid,jdbcType=VARCHAR},
      Created = #{created,jdbcType=TIMESTAMP},
      Type = #{type,jdbcType=TINYINT},
      GoodsID = #{goodsid,jdbcType=VARCHAR},
      FormID = #{formid,jdbcType=INTEGER},
      IP = #{ip,jdbcType=VARCHAR}
    where UVID = #{uvid,jdbcType=INTEGER}
  </update>
</mapper>