<?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.ruixuan.isc.mapper.AccessTokenMapper">
    <update id="update" parameterType="com.ruixuan.isc.entity.KuaishouAccessToken">
 update kuaishou_access_token set access_token = #{accessToken},refresh_token = #{refreshToken}
 where id = #{id}
    </update>
    <update id="updateBytedance" parameterType="com.ruixuan.isc.entity.KuaishouAccessToken">
         update bytedance_access_token set access_token = #{accessToken},refresh_token = #{refreshToken},update_time = #{updateTime}
        where id = #{id}
    </update>


    <select id="getAccessToken" resultType="com.ruixuan.isc.entity.KuaishouAccessToken">
        select  * from kuaishou_access_token where id = #{regId} limit 1
    </select>
    <select id="getTokenInfos" resultType="com.ruixuan.isc.entity.KuaishouAccessToken">
        select *  from kuaishou_access_token
    </select>
    <select id="getByteDanceTokenInfos" resultType="com.ruixuan.isc.entity.KuaishouAccessToken">
         select *  from bytedance_access_token
    </select>
</mapper>