TokenMapper.xml 1.41 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.huaheng.api.xinyi.mapper.TokenMapper">
    <resultMap id="BaseResultMap" type="com.huaheng.api.xinyi.domian.TokenEntity">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="access_token" jdbcType="INTEGER" property="access_token" />
        <result column="token_type" jdbcType="VARCHAR" property="token_type" />
    </resultMap>
    <sql id="Base_Column_List">
        <!--@mbg.generated-->
       id, access_token, token_type
    </sql>

    <select id="findOneByAll" resultMap="BaseResultMap">
        select * from token_entity limit 1
    </select>

    <!--auto generated by MybatisCodeHelper on 2019-12-29-->
    <insert id="insertSelective">
        INSERT INTO token_entity
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id!=null">id,</if>
            <if test="access_token!=null">access_token,</if>
            <if test="token_type!=null">token_type</if>
        </trim>
        VALUES
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id!=null">#{id,jdbcType=INTEGER},</if>
            <if test="access_token!=null">#{access_token,jdbcType=INTEGER},</if>
            <if test="token_type!=null">#{token_type,jdbcType=VARCHAR}</if>
        </trim>
    </insert>

</mapper>