sqlmap-associate.xml 1.42 KB
<?xml version="1.0" encoding="UTF-8"?>
<sqlMap namespace="associate">
    <insert id="set">
        INSERT INTO `tbl_partner_info` (`auth`,`type`,`uid`,`token`,`refresh_token`,`expires_in`,`create_time`) VALUES (:auth,:type,:uid,:token,:refresh_token,:expires_in,:create_time) ON DUPLICATE KEY UPDATE `uid`=:uid,`token`=:token,`refresh_token`=:refresh_token,`expires_in`=:expires_in,`create_time`=:create_time
    </insert>
    <select id="get">
        SELECT `id`,`uid`,`token`,`refresh_token`,`expires_in`,`create_time` FROM `tbl_partner_info` WHERE `auth`=:auth AND `type`=:type
    </select>
    <select id="getByUid">
        SELECT `id`,`type`,`auth`,`token`,`refresh_token`,`expires_in`,`create_time` FROM `tbl_partner_info` WHERE `uid`=:uid
    </select>
    <update id="upd">
        UPDATE `tbl_partner_info` SET #STRING# WHERE `auth`=:auth AND `type`=:type
    </update>
    <delete id="del">
        DELETE FROM `tbl_partner_info` WHERE `auth`=:auth AND `type`=:type
    </delete>
    <insert id="setBasicInfo">
        INSERT IGNORE INTO `tbl_basic_info` (#FIELDS#) VALUES (#STRING#)
    </insert>
    <insert id="setAuthInfo">
        INSERT INTO `tbl_auth_info` (`uid`,`type`,`auth_id`,`password`,`password_salt`,`create_time`) VALUES (:uid,:type,:auth_id,:password,:password_salt,:create_time) ON DUPLICATE KEY UPDATE `auth_id`=:auth_id,`password`=:password,`password_salt`=:password_salt,`create_time`=:create_time
    </insert>
</sqlMap>