123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <?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.book.dao.cps.mapper.PtokenMapper">
- <resultMap id="BaseResultMap" type="com.book.dao.cps.pojo.Ptoken">
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="platform_id" jdbcType="INTEGER" property="platformId" />
- <result column="refresh_token" jdbcType="VARCHAR" property="refreshToken" />
- <result column="admin_id" jdbcType="VARCHAR" property="adminId" />
- <result column="createtime" jdbcType="INTEGER" property="createtime" />
- <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
- </resultMap>
- <sql id="Base_Column_List">
- id, platform_id, refresh_token, admin_id, createtime, updatetime
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from ptoken
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="selectAll" resultType="com.book.dao.cps.pojo.Ptoken">
- select * from ptoken;
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- delete from ptoken
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.book.dao.cps.pojo.Ptoken" useGeneratedKeys="true">
- insert into ptoken (platform_id, refresh_token, admin_id,
- createtime, updatetime)
- values (#{platformId,jdbcType=INTEGER}, #{refreshToken,jdbcType=VARCHAR}, #{adminId,jdbcType=VARCHAR},
- #{createtime,jdbcType=INTEGER}, #{updatetime,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.book.dao.cps.pojo.Ptoken" useGeneratedKeys="true">
- insert into ptoken
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="platformId != null">
- platform_id,
- </if>
- <if test="refreshToken != null">
- refresh_token,
- </if>
- <if test="adminId != null">
- admin_id,
- </if>
- <if test="createtime != null">
- createtime,
- </if>
- <if test="updatetime != null">
- updatetime,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="platformId != null">
- #{platformId,jdbcType=INTEGER},
- </if>
- <if test="refreshToken != null">
- #{refreshToken,jdbcType=VARCHAR},
- </if>
- <if test="adminId != null">
- #{adminId,jdbcType=VARCHAR},
- </if>
- <if test="createtime != null">
- #{createtime,jdbcType=INTEGER},
- </if>
- <if test="updatetime != null">
- #{updatetime,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.book.dao.cps.pojo.Ptoken">
- update ptoken
- <set>
- <if test="platformId != null">
- platform_id = #{platformId,jdbcType=INTEGER},
- </if>
- <if test="refreshToken != null">
- refresh_token = #{refreshToken,jdbcType=VARCHAR},
- </if>
- <if test="adminId != null">
- admin_id = #{adminId,jdbcType=VARCHAR},
- </if>
- <if test="createtime != null">
- createtime = #{createtime,jdbcType=INTEGER},
- </if>
- <if test="updatetime != null">
- updatetime = #{updatetime,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.book.dao.cps.pojo.Ptoken">
- update ptoken
- set platform_id = #{platformId,jdbcType=INTEGER},
- refresh_token = #{refreshToken,jdbcType=VARCHAR},
- admin_id = #{adminId,jdbcType=VARCHAR},
- createtime = #{createtime,jdbcType=INTEGER},
- updatetime = #{updatetime,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|