IIosTokenDao.xml 5.59 KB
<?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.yoho.message.dal.IIosTokenDao" >
  <resultMap id="BaseResultMap" type="com.yoho.message.dal.model.IosToken" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="uid" property="uid" jdbcType="INTEGER" />
    <result column="token" property="token" jdbcType="VARCHAR" />
    <result column="version" property="version" jdbcType="VARCHAR" />
    <result column="create_time" property="createTime" jdbcType="INTEGER" />
    <result column="last_update_time" property="lastUpdateTime" jdbcType="INTEGER" />
    <result column="status" property="status" jdbcType="TINYINT" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, uid, token, version, create_time, last_update_time, status
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from ios_token
    where id = #{id,jdbcType=INTEGER}
  </select>
  <select id="selectByToken" resultMap="BaseResultMap" parameterType="java.lang.String" >
    SELECT
    <include refid="Base_Column_List" />
    FROM ios_token
    WHERE token = #{token,jdbcType=VARCHAR}
    LIMIT 1
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from ios_token
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.yoho.message.dal.model.IosToken" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into ios_token (id, uid, token, 
      version, create_time, last_update_time, 
      status)
    values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{token,jdbcType=VARCHAR}, 
      #{version,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER}, #{lastUpdateTime,jdbcType=INTEGER}, 
      #{status,jdbcType=TINYINT})
  </insert>
  <insert id="insertSelective" parameterType="com.yoho.message.dal.model.IosToken" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into ios_token
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="uid != null" >
        uid,
      </if>
      <if test="token != null" >
        token,
      </if>
      <if test="version != null" >
        version,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="lastUpdateTime != null" >
        last_update_time,
      </if>
      <if test="status != null" >
        status,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=INTEGER},
      </if>
      <if test="uid != null" >
        #{uid,jdbcType=INTEGER},
      </if>
      <if test="token != null" >
        #{token,jdbcType=VARCHAR},
      </if>
      <if test="version != null" >
        #{version,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=INTEGER},
      </if>
      <if test="lastUpdateTime != null" >
        #{lastUpdateTime,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        #{status,jdbcType=TINYINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.yoho.message.dal.model.IosToken" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update ios_token
    <set >
      <if test="uid != null" >
        uid = #{uid,jdbcType=INTEGER},
      </if>
      <if test="token != null" >
        token = #{token,jdbcType=VARCHAR},
      </if>
      <if test="version != null" >
        version = #{version,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=INTEGER},
      </if>
      <if test="lastUpdateTime != null" >
        last_update_time = #{lastUpdateTime,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=TINYINT},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.yoho.message.dal.model.IosToken" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update ios_token
    set uid = #{uid,jdbcType=INTEGER},
      token = #{token,jdbcType=VARCHAR},
      version = #{version,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=INTEGER},
      last_update_time = #{lastUpdateTime,jdbcType=INTEGER},
      status = #{status,jdbcType=TINYINT}
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateStatusSelective" parameterType="com.yoho.message.dal.model.IosToken" >
    update ios_token 
    set status = #{status,jdbcType=TINYINT},
    last_update_time = #{lastUpdateTime,jdbcType=INTEGER}
    where token = #{token,jdbcType=VARCHAR}
  </update>
</mapper>