<?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.WVipphotodtlMapper" >
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.WVipphotodtl" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jul 28 10:26:32 CST 2016.
    -->
    <id column="PhotoID" property="photoid" jdbcType="BIGINT" />
    <result column="VIPID" property="vipid" jdbcType="VARCHAR" />
    <result column="PhotoIndex" property="photoindex" jdbcType="SMALLINT" />
    <result column="PhotoUrl" property="photourl" jdbcType="VARCHAR" />
    <result column="EmployeeID" property="employeeid" jdbcType="VARCHAR" />
    <result column="Created" property="created" jdbcType="TIMESTAMP" />
  </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 Jul 28 10:26:32 CST 2016.
    -->
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" 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 Jul 28 10:26:32 CST 2016.
    -->
    PhotoID, VIPID, PhotoIndex, PhotoUrl, EmployeeID, Created
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.fuxi.ws.data.entity.WVipphotodtlExample" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jul 28 10:26:32 CST 2016.
    -->
    select
    <if test="distinct" >
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from W_VipPhotoDtl
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jul 28 10:26:32 CST 2016.
    -->
    select 
    <include refid="Base_Column_List" />
    from W_VipPhotoDtl
    where PhotoID = #{photoid,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jul 28 10:26:32 CST 2016.
    -->
    delete from W_VipPhotoDtl
    where PhotoID = #{photoid,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.WVipphotodtl" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jul 28 10:26:32 CST 2016.
    -->
    insert into W_VipPhotoDtl (PhotoID, VIPID, PhotoIndex, 
      PhotoUrl, EmployeeID, Created
      )
    values (#{photoid,jdbcType=BIGINT}, #{vipid,jdbcType=VARCHAR}, #{photoindex,jdbcType=SMALLINT}, 
      #{photourl,jdbcType=VARCHAR}, #{employeeid,jdbcType=VARCHAR}, #{created,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.WVipphotodtl" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jul 28 10:26:32 CST 2016.
    -->
    insert into W_VipPhotoDtl
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="photoid != null" >
        PhotoID,
      </if>
      <if test="vipid != null" >
        VIPID,
      </if>
      <if test="photoindex != null" >
        PhotoIndex,
      </if>
      <if test="photourl != null" >
        PhotoUrl,
      </if>
      <if test="employeeid != null" >
        EmployeeID,
      </if>
      <if test="created != null" >
        Created,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="photoid != null" >
        #{photoid,jdbcType=BIGINT},
      </if>
      <if test="vipid != null" >
        #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="photoindex != null" >
        #{photoindex,jdbcType=SMALLINT},
      </if>
      <if test="photourl != null" >
        #{photourl,jdbcType=VARCHAR},
      </if>
      <if test="employeeid != null" >
        #{employeeid,jdbcType=VARCHAR},
      </if>
      <if test="created != null" >
        #{created,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.WVipphotodtlExample" resultType="java.lang.Integer" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jul 28 10:26:32 CST 2016.
    -->
    select count(*) from W_VipPhotoDtl
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.WVipphotodtl" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jul 28 10:26:32 CST 2016.
    -->
    update W_VipPhotoDtl
    <set >
      <if test="vipid != null" >
        VIPID = #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="photoindex != null" >
        PhotoIndex = #{photoindex,jdbcType=SMALLINT},
      </if>
      <if test="photourl != null" >
        PhotoUrl = #{photourl,jdbcType=VARCHAR},
      </if>
      <if test="employeeid != null" >
        EmployeeID = #{employeeid,jdbcType=VARCHAR},
      </if>
      <if test="created != null" >
        Created = #{created,jdbcType=TIMESTAMP},
      </if>
    </set>
    where PhotoID = #{photoid,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WVipphotodtl" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Thu Jul 28 10:26:32 CST 2016.
    -->
    update W_VipPhotoDtl
    set VIPID = #{vipid,jdbcType=VARCHAR},
      PhotoIndex = #{photoindex,jdbcType=SMALLINT},
      PhotoUrl = #{photourl,jdbcType=VARCHAR},
      EmployeeID = #{employeeid,jdbcType=VARCHAR},
      Created = #{created,jdbcType=TIMESTAMP}
    where PhotoID = #{photoid,jdbcType=BIGINT}
  </update>
</mapper>