<?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.WGoodslaudMapper" >
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.WGoodslaud" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Sep 02 10:59:43 CST 2015.
    -->
    <id column="LaudID" property="laudid" jdbcType="BIGINT" />
    <result column="GoodsID" property="goodsid" jdbcType="VARCHAR" />
    <result column="VIPID" property="vipid" jdbcType="VARCHAR" />
    <result column="LaudTime" property="laudtime" 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 Wed Sep 02 10:59:43 CST 2015.
    -->
    <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 Wed Sep 02 10:59:43 CST 2015.
    -->
    LaudID, GoodsID, VIPID, LaudTime
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.fuxi.ws.data.entity.WGoodslaudExample" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Sep 02 10:59:43 CST 2015.
    -->
    select
    <if test="distinct" >
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from W_GoodsLaud
    <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 Wed Sep 02 10:59:43 CST 2015.
    -->
    select 
    <include refid="Base_Column_List" />
    from W_GoodsLaud
    where LaudID = #{laudid,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 Wed Sep 02 10:59:43 CST 2015.
    -->
    delete from W_GoodsLaud
    where LaudID = #{laudid,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.WGoodslaud" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Sep 02 10:59:43 CST 2015.
    -->
    insert into W_GoodsLaud (LaudID, GoodsID, VIPID, 
      LaudTime)
    values (#{laudid,jdbcType=BIGINT}, #{goodsid,jdbcType=VARCHAR}, #{vipid,jdbcType=VARCHAR}, 
      #{laudtime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.WGoodslaud" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Sep 02 10:59:43 CST 2015.
    -->
    insert into W_GoodsLaud
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="laudid != null" >
        LaudID,
      </if>
      <if test="goodsid != null" >
        GoodsID,
      </if>
      <if test="vipid != null" >
        VIPID,
      </if>
      <if test="laudtime != null" >
        LaudTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="laudid != null" >
        #{laudid,jdbcType=BIGINT},
      </if>
      <if test="goodsid != null" >
        #{goodsid,jdbcType=VARCHAR},
      </if>
      <if test="vipid != null" >
        #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="laudtime != null" >
        #{laudtime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.WGoodslaudExample" resultType="java.lang.Integer" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Sep 02 10:59:43 CST 2015.
    -->
    select count(*) from W_GoodsLaud
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.WGoodslaud" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Sep 02 10:59:43 CST 2015.
    -->
    update W_GoodsLaud
    <set >
      <if test="goodsid != null" >
        GoodsID = #{goodsid,jdbcType=VARCHAR},
      </if>
      <if test="vipid != null" >
        VIPID = #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="laudtime != null" >
        LaudTime = #{laudtime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where LaudID = #{laudid,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WGoodslaud" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Wed Sep 02 10:59:43 CST 2015.
    -->
    update W_GoodsLaud
    set GoodsID = #{goodsid,jdbcType=VARCHAR},
      VIPID = #{vipid,jdbcType=VARCHAR},
      LaudTime = #{laudtime,jdbcType=TIMESTAMP}
    where LaudID = #{laudid,jdbcType=BIGINT}
  </update>
</mapper>