<?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.WVipsearchplanMapper" >
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.WVipsearchplan" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Mar 31 15:06:20 CST 2017.
    -->
    <id column="PlanID" property="planid" jdbcType="INTEGER" />
    <result column="UserID" property="userid" jdbcType="INTEGER" />
    <result column="PlanName" property="planname" jdbcType="VARCHAR" />
    <result column="PlanContext" property="plancontext" jdbcType="VARCHAR" />
  </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 Mar 31 15:06:20 CST 2017.
    -->
    <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 Fri Mar 31 15:06:20 CST 2017.
    -->
    PlanID, UserID, PlanName, PlanContext
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.fuxi.ws.data.entity.WVipsearchplanExample" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Mar 31 15:06:20 CST 2017.
    -->
    select
    <if test="distinct" >
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from W_VipSearchPlan
    <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.Integer" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Mar 31 15:06:20 CST 2017.
    -->
    select 
    <include refid="Base_Column_List" />
    from W_VipSearchPlan
    where PlanID = #{planid,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 Mar 31 15:06:20 CST 2017.
    -->
    delete from W_VipSearchPlan
    where PlanID = #{planid,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.WVipsearchplan" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Mar 31 15:06:20 CST 2017.
    -->
    insert into W_VipSearchPlan (PlanID, UserID, PlanName, 
      PlanContext)
    values (#{planid,jdbcType=INTEGER}, #{userid,jdbcType=INTEGER}, #{planname,jdbcType=VARCHAR}, 
      #{plancontext,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.WVipsearchplan" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Mar 31 15:06:20 CST 2017.
    -->
    insert into W_VipSearchPlan
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="planid != null" >
        PlanID,
      </if>
      <if test="userid != null" >
        UserID,
      </if>
      <if test="planname != null" >
        PlanName,
      </if>
      <if test="plancontext != null" >
        PlanContext,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="planid != null" >
        #{planid,jdbcType=INTEGER},
      </if>
      <if test="userid != null" >
        #{userid,jdbcType=INTEGER},
      </if>
      <if test="planname != null" >
        #{planname,jdbcType=VARCHAR},
      </if>
      <if test="plancontext != null" >
        #{plancontext,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.WVipsearchplanExample" resultType="java.lang.Integer" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Mar 31 15:06:20 CST 2017.
    -->
    select count(*) from W_VipSearchPlan
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.WVipsearchplan" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Mar 31 15:06:20 CST 2017.
    -->
    update W_VipSearchPlan
    <set >
      <if test="userid != null" >
        UserID = #{userid,jdbcType=INTEGER},
      </if>
      <if test="planname != null" >
        PlanName = #{planname,jdbcType=VARCHAR},
      </if>
      <if test="plancontext != null" >
        PlanContext = #{plancontext,jdbcType=VARCHAR},
      </if>
    </set>
    where PlanID = #{planid,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WVipsearchplan" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Fri Mar 31 15:06:20 CST 2017.
    -->
    update W_VipSearchPlan
    set UserID = #{userid,jdbcType=INTEGER},
      PlanName = #{planname,jdbcType=VARCHAR},
      PlanContext = #{plancontext,jdbcType=VARCHAR}
    where PlanID = #{planid,jdbcType=INTEGER}
  </update>
</mapper>