<?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.WGuidecommentMapper">
  <resultMap id="BaseResultMap" type="com.fuxi.ws.data.entity.WGuidecomment">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 20 10:28:48 CST 2017.
    -->
    <id column="CommentID" jdbcType="BIGINT" property="commentid" />
    <result column="VIPID" jdbcType="VARCHAR" property="vipid" />
    <result column="EmployeeID" jdbcType="VARCHAR" property="employeeid" />
    <result column="EShopOrderID" jdbcType="INTEGER" property="eshoporderid" />
    <result column="Fitting" jdbcType="BIGINT" property="fitting" />
    <result column="ComLevel" jdbcType="TINYINT" property="comlevel" />
    <result column="Context" jdbcType="NVARCHAR" property="context" />
    <result column="Created" jdbcType="TIMESTAMP" property="created" />
    <result column="OrderType" jdbcType="TINYINT" property="ordertype" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 20 10:28:48 CST 2017.
    -->
    <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 Tue Jun 20 10:28:48 CST 2017.
    -->
    CommentID, VIPID, EmployeeID, EShopOrderID, Fitting, ComLevel, Context, Created, 
    OrderType
  </sql>
  <select id="selectByExample" parameterType="com.fuxi.ws.data.entity.WGuidecommentExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 20 10:28:48 CST 2017.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    'false' as QUERYID,
    <include refid="Base_Column_List" />
    from W_GuideComment
    <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.Long" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 20 10:28:48 CST 2017.
    -->
    select 
    <include refid="Base_Column_List" />
    from W_GuideComment
    where CommentID = #{commentid,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 Tue Jun 20 10:28:48 CST 2017.
    -->
    delete from W_GuideComment
    where CommentID = #{commentid,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.fuxi.ws.data.entity.WGuidecomment">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 20 10:28:48 CST 2017.
    -->
    insert into W_GuideComment (CommentID, VIPID, EmployeeID, 
      EShopOrderID, Fitting, ComLevel, 
      Context, Created, OrderType
      )
    values (#{commentid,jdbcType=BIGINT}, #{vipid,jdbcType=VARCHAR}, #{employeeid,jdbcType=VARCHAR}, 
      #{eshoporderid,jdbcType=INTEGER}, #{fitting,jdbcType=BIGINT}, #{comlevel,jdbcType=TINYINT}, 
      #{context,jdbcType=NVARCHAR}, #{created,jdbcType=TIMESTAMP}, #{ordertype,jdbcType=TINYINT}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.fuxi.ws.data.entity.WGuidecomment">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 20 10:28:48 CST 2017.
    -->
    insert into W_GuideComment
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="commentid != null">
        CommentID,
      </if>
      <if test="vipid != null">
        VIPID,
      </if>
      <if test="employeeid != null">
        EmployeeID,
      </if>
      <if test="eshoporderid != null">
        EShopOrderID,
      </if>
      <if test="fitting != null">
        Fitting,
      </if>
      <if test="comlevel != null">
        ComLevel,
      </if>
      <if test="context != null">
        Context,
      </if>
      <if test="created != null">
        Created,
      </if>
      <if test="ordertype != null">
        OrderType,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="commentid != null">
        #{commentid,jdbcType=BIGINT},
      </if>
      <if test="vipid != null">
        #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="employeeid != null">
        #{employeeid,jdbcType=VARCHAR},
      </if>
      <if test="eshoporderid != null">
        #{eshoporderid,jdbcType=INTEGER},
      </if>
      <if test="fitting != null">
        #{fitting,jdbcType=BIGINT},
      </if>
      <if test="comlevel != null">
        #{comlevel,jdbcType=TINYINT},
      </if>
      <if test="context != null">
        #{context,jdbcType=NVARCHAR},
      </if>
      <if test="created != null">
        #{created,jdbcType=TIMESTAMP},
      </if>
      <if test="ordertype != null">
        #{ordertype,jdbcType=TINYINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.fuxi.ws.data.entity.WGuidecommentExample" resultType="java.lang.Integer">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 20 10:28:48 CST 2017.
    -->
    select count(*) from W_GuideComment
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.fuxi.ws.data.entity.WGuidecomment">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 20 10:28:48 CST 2017.
    -->
    update W_GuideComment
    <set>
      <if test="vipid != null">
        VIPID = #{vipid,jdbcType=VARCHAR},
      </if>
      <if test="employeeid != null">
        EmployeeID = #{employeeid,jdbcType=VARCHAR},
      </if>
      <if test="eshoporderid != null">
        EShopOrderID = #{eshoporderid,jdbcType=INTEGER},
      </if>
      <if test="fitting != null">
        Fitting = #{fitting,jdbcType=BIGINT},
      </if>
      <if test="comlevel != null">
        ComLevel = #{comlevel,jdbcType=TINYINT},
      </if>
      <if test="context != null">
        Context = #{context,jdbcType=NVARCHAR},
      </if>
      <if test="created != null">
        Created = #{created,jdbcType=TIMESTAMP},
      </if>
      <if test="ordertype != null">
        OrderType = #{ordertype,jdbcType=TINYINT},
      </if>
    </set>
    where CommentID = #{commentid,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.fuxi.ws.data.entity.WGuidecomment">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
      This element was generated on Tue Jun 20 10:28:48 CST 2017.
    -->
    update W_GuideComment
    set VIPID = #{vipid,jdbcType=VARCHAR},
      EmployeeID = #{employeeid,jdbcType=VARCHAR},
      EShopOrderID = #{eshoporderid,jdbcType=INTEGER},
      Fitting = #{fitting,jdbcType=BIGINT},
      ComLevel = #{comlevel,jdbcType=TINYINT},
      Context = #{context,jdbcType=NVARCHAR},
      Created = #{created,jdbcType=TIMESTAMP},
      OrderType = #{ordertype,jdbcType=TINYINT}
    where CommentID = #{commentid,jdbcType=BIGINT}
  </update>
</mapper>