<?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.chaozhanggui.dao.system.dao.TbPlussCacheInfoMapper">
  <resultMap id="BaseResultMap" type="com.chaozhanggui.dao.system.entity.TbPlussCacheInfo">
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="keyCode" jdbcType="VARCHAR" property="keycode" />
    <result column="appId" jdbcType="VARCHAR" property="appid" />
    <result column="appSercet" jdbcType="VARCHAR" property="appsercet" />
    <result column="accessToken" jdbcType="VARCHAR" property="accesstoken" />
    <result column="refreshToken" jdbcType="VARCHAR" property="refreshtoken" />
    <result column="expires_in" jdbcType="BIGINT" property="expiresIn" />
    <result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
  </resultMap>
  <sql id="Base_Column_List">
    id, keyCode, appId, appSercet, accessToken, refreshToken, expires_in, createTime
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_pluss_cache_info
    where id = #{id,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tb_pluss_cache_info
    where id = #{id,jdbcType=INTEGER}
  </delete>
  <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussCacheInfo">
    insert into tb_pluss_cache_info (id, keyCode, appId, 
      appSercet, accessToken, refreshToken, 
      expires_in, createTime)
    values (#{id,jdbcType=INTEGER}, #{keycode,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, 
      #{appsercet,jdbcType=VARCHAR}, #{accesstoken,jdbcType=VARCHAR}, #{refreshtoken,jdbcType=VARCHAR}, 
      #{expiresIn,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussCacheInfo">
    insert into tb_pluss_cache_info
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="keycode != null">
        keyCode,
      </if>
      <if test="appid != null">
        appId,
      </if>
      <if test="appsercet != null">
        appSercet,
      </if>
      <if test="accesstoken != null">
        accessToken,
      </if>
      <if test="refreshtoken != null">
        refreshToken,
      </if>
      <if test="expiresIn != null">
        expires_in,
      </if>
      <if test="createtime != null">
        createTime,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=INTEGER},
      </if>
      <if test="keycode != null">
        #{keycode,jdbcType=VARCHAR},
      </if>
      <if test="appid != null">
        #{appid,jdbcType=VARCHAR},
      </if>
      <if test="appsercet != null">
        #{appsercet,jdbcType=VARCHAR},
      </if>
      <if test="accesstoken != null">
        #{accesstoken,jdbcType=VARCHAR},
      </if>
      <if test="refreshtoken != null">
        #{refreshtoken,jdbcType=VARCHAR},
      </if>
      <if test="expiresIn != null">
        #{expiresIn,jdbcType=BIGINT},
      </if>
      <if test="createtime != null">
        #{createtime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussCacheInfo">
    update tb_pluss_cache_info
    <set>
      <if test="keycode != null">
        keyCode = #{keycode,jdbcType=VARCHAR},
      </if>
      <if test="appid != null">
        appId = #{appid,jdbcType=VARCHAR},
      </if>
      <if test="appsercet != null">
        appSercet = #{appsercet,jdbcType=VARCHAR},
      </if>
      <if test="accesstoken != null">
        accessToken = #{accesstoken,jdbcType=VARCHAR},
      </if>
      <if test="refreshtoken != null">
        refreshToken = #{refreshtoken,jdbcType=VARCHAR},
      </if>
      <if test="expiresIn != null">
        expires_in = #{expiresIn,jdbcType=BIGINT},
      </if>
      <if test="createtime != null">
        createTime = #{createtime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussCacheInfo">
    update tb_pluss_cache_info
    set keyCode = #{keycode,jdbcType=VARCHAR},
      appId = #{appid,jdbcType=VARCHAR},
      appSercet = #{appsercet,jdbcType=VARCHAR},
      accessToken = #{accesstoken,jdbcType=VARCHAR},
      refreshToken = #{refreshtoken,jdbcType=VARCHAR},
      expires_in = #{expiresIn,jdbcType=BIGINT},
      createTime = #{createtime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=INTEGER}
  </update>
</mapper>