sqlmap-auth.xml
2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?xml version="1.0" encoding="UTF-8"?>
<sqlMap namespace="auth">
<select id="getAuthByTypeAndAid">
SELECT * FROM `tbl_auth_info` where `type` = :type AND `auth_id`=:auth_id LIMIT 1
</select>
<insert id="setAuth">
INSERT INTO `tbl_auth_info` (`uid`,`type`,`auth_id`,`create_time`) values (:uid, :type, :auth_id,:create_time) ON DUPLICATE KEY UPDATE `uid` = :uid, `auth_id` = :auth_id
</insert>
<delete id="delAuth">
DELETE FROM `tbl_auth_info` WHERE `uid`=:uid and `type`=:type and `auth_id`=:auth_id
</delete>
<select id="getAllAuth">
SELECT type,auth_id FROM `tbl_auth_info` WHERE `uid`=:uid
</select>
<delete id="deleteUser">
DELETE FROM `tbl_basic_info` WHERE `uid`=:uid;
DELETE FROM `tbl_password` WHERE `uid`=:uid;
DELETE FROM `tbl_auth_info` WHERE `uid`=:uid;
</delete>
<insert id="setUserinfo">
INSERT INTO `tbl_basic_info` (#fields#) VALUES (#string#)
</insert>
<update id="updateUserinfo">
UPDATE `tbl_basic_info` SET #upstring# WHERE `uid`=:uid
</update>
<select id="getUserinfo">
SELECT #fields# FROM `tbl_basic_info` where `uid` = :uid LIMIT 1
</select>
<insert id="setPassword">
INSERT INTO `tbl_password` (`uid`,`password`,`password_salt`) values (:uid, :password, :password_salt) ON DUPLICATE KEY UPDATE `password` = :password , `password_salt`=:password_salt
</insert>
<select id="getPassword">
SELECT * FROM `tbl_password` WHERE `uid`=:uid
</select>
<update id="updAuth">
UPDATE `tbl_auth_info` SET `auth_id`=:auth_id WHERE uid=:id AND type=:type
</update>
<select id="getYohobuyAccountByShowId">
SELECT * FROM `tbl_show_relevance` WHERE `show_uid`=:show_uid
</select>
<select id="getShowUidBySsoId">
SELECT sso_uid,show_uid FROM `tbl_show_relevance` WHERE `sso_uid` IN (#sso_uid#)
</select>
<insert id="relevanceYohobuyAccount">
INSERT INTO `tbl_show_relevance` (`show_uid`,`sso_uid`,`create_time`) values (:show_uid, :sso_uid, UNIX_TIMESTAMP())
</insert>
<delete id="removeYohobuyAccount">
DELETE FROM `tbl_show_relevance` WHERE `show_uid` = :show_uid and `sso_uid`=:sso_uid
</delete>
<select id="getFacebookRela">
SELECT `openid` FROM `tbl_facebook_rela` WHERE `new_openid`=:new_openid
</select>
</sqlMap>