<?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.gyee.frame.mapper.auto.PushMessageMapper">
  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.PushMessage">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="DECIMAL" property="id" />
    <result column="KEY" jdbcType="VARCHAR" property="key" />
    <result column="MSG" jdbcType="VARCHAR" property="msg" />
    <result column="GETTIME" jdbcType="TIMESTAMP" property="gettime" />
    <result column="TAG" jdbcType="VARCHAR" property="tag" />
    <result column="ALLREADER" jdbcType="VARCHAR" property="allreader" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <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="Update_By_Example_Where_Clause">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <where>
      <foreach collection="example.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 - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    ID, KEY, MSG, GETTIME, TAG, ALLREADER
  </sql>
  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.PushMessageExample" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from PUSHMESSAGE
    <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.Short" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from PUSHMESSAGE
    where ID = #{id,jdbcType=DECIMAL}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from PUSHMESSAGE
    where ID = #{id,jdbcType=DECIMAL}
  </delete>
  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.PushMessageExample">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from PUSHMESSAGE
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.gyee.frame.model.auto.PushMessage">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into PUSHMESSAGE (ID, KEY, MSG, 
      GETTIME, TAG, ALLREADER
      )
    values (#{id,jdbcType=DECIMAL}, #{key,jdbcType=VARCHAR}, #{msg,jdbcType=VARCHAR}, 
      #{gettime,jdbcType=TIMESTAMP}, #{tag,jdbcType=VARCHAR}, #{allreader,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.PushMessage">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into PUSHMESSAGE
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        ID,
      </if>
      <if test="key != null">
        KEY,
      </if>
      <if test="msg != null">
        MSG,
      </if>
      <if test="gettime != null">
        GETTIME,
      </if>
      <if test="tag != null">
        TAG,
      </if>
      <if test="allreader != null">
        ALLREADER,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=DECIMAL},
      </if>
      <if test="key != null">
        #{key,jdbcType=VARCHAR},
      </if>
      <if test="msg != null">
        #{msg,jdbcType=VARCHAR},
      </if>
      <if test="gettime != null">
        #{gettime,jdbcType=TIMESTAMP},
      </if>
      <if test="tag != null">
        #{tag,jdbcType=VARCHAR},
      </if>
      <if test="allreader != null">
        #{allreader,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.gyee.frame.model.auto.PushMessageExample" resultType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select count(*) from PUSHMESSAGE
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update PUSHMESSAGE
    <set>
      <if test="record.id != null">
        ID = #{record.id,jdbcType=DECIMAL},
      </if>
      <if test="record.key != null">
        KEY = #{record.key,jdbcType=VARCHAR},
      </if>
      <if test="record.msg != null">
        MSG = #{record.msg,jdbcType=VARCHAR},
      </if>
      <if test="record.gettime != null">
        GETTIME = #{record.gettime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.tag != null">
        TAG = #{record.tag,jdbcType=VARCHAR},
      </if>
      <if test="record.allreader != null">
        ALLREADER = #{record.allreader,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update PUSHMESSAGE
    set ID = #{record.id,jdbcType=DECIMAL},
      KEY = #{record.key,jdbcType=VARCHAR},
      MSG = #{record.msg,jdbcType=VARCHAR},
      GETTIME = #{record.gettime,jdbcType=TIMESTAMP},
      TAG = #{record.tag,jdbcType=VARCHAR},
      ALLREADER = #{record.allreader,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.PushMessage">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update PUSHMESSAGE
    <set>
      <if test="key != null">
        KEY = #{key,jdbcType=VARCHAR},
      </if>
      <if test="msg != null">
        MSG = #{msg,jdbcType=VARCHAR},
      </if>
      <if test="gettime != null">
        GETTIME = #{gettime,jdbcType=TIMESTAMP},
      </if>
      <if test="tag != null">
        TAG = #{tag,jdbcType=VARCHAR},
      </if>
      <if test="allreader != null">
        ALLREADER = #{allreader,jdbcType=VARCHAR},
      </if>
    </set>
    where ID = #{id,jdbcType=DECIMAL}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.PushMessage">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update PUSHMESSAGE
    set KEY = #{key,jdbcType=VARCHAR},
      MSG = #{msg,jdbcType=VARCHAR},
      GETTIME = #{gettime,jdbcType=TIMESTAMP},
      TAG = #{tag,jdbcType=VARCHAR},
      ALLREADER = #{allreader,jdbcType=VARCHAR}
    where ID = #{id,jdbcType=DECIMAL}
  </update>
</mapper>