sqlmap-import.xml
2.66 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
<?xml version="1.0" encoding="UTF-8"?>
<sqlMap namespace="import">
<select id="getUserProfile">
SELECT a.* FROM user_profile a, user_openid b WHERE a.uid = b.uid ORDER BY a.create_time LIMIT :offset, :limit
</select>
<select id="getUserProfileBack">
SELECT * FROM (SELECT * FROM user_profile ORDER BY create_time LIMIT :offset, :limit) c
WHERE NOT EXISTS (SELECT 1 FROM yohobuy_import_log b WHERE c.uid = b.yohobuy_uid AND b.import_status in(1,2))
</select>
<select id="getUserProfileTotal">
SELECT COUNT(*) FROm user_profile
</select>
<select id="getUserBase">
SELECT * FROM user_base WHERE uid = :uid
</select>
<insert id="setYohobuyLog">
INSERT INTO yohobuy_import_log VALUES(:yohobuy_uid, :sso_uid, :import_status, :create_time) ON DUPLICATE KEY UPDATE import_status = :import_status, create_time = :create_time
</insert>
<select id="getYohobuyLogTotal">
SELECT COUNT(*) FROM yohobuy_import_log
</select>
<select id="getYohobuyLog">
SELECT * FROM yohobuy_import_log WHERE yohobuy_uid = :yohobuy_uid
</select>
<select id="getYohobuyOpenId">
SELECT * FROM user_openid WHERE refer_id IN (10,11,12,13,14,15,16,18) LIMIT :offset, :limit
</select>
<select id="getYohobuyOpenIdByUid">
SELECT * FROM user_openid WHERE uid = :uid
</select>
<insert id="setYohobuyPartnerLog">
INSERT INTO yohobuy_partner_import_log VALUES(:yohobuy_uid, :sso_uid, :open_id, :import_status, :create_time) ON DUPLICATE KEY UPDATE open_id =:open_id, import_status = :import_status, create_time = :create_time
</insert>
<select id="getShowPartner">
SELECT * FROM tbl_partner LIMIT :offset, :limit
</select>
<select id="getShowMemberBasic">
SELECT * FROM tbl_member_basic WHERE uid = :uid
</select>
<insert id="setShowPartnerLog">
INSERT INTO show_partner_import_log VALUES(:show_uid, :sso_uid, :import_status, :create_time) ON DUPLICATE KEY UPDATE import_status = :import_status, create_time = :create_time
</insert>
<select id="getYohoMember">
SELECT * FROM (SELECT a.common_email, a.password, a.status,a.id,b.* FROM tbl_member a LEFT JOIN tbl_member_basic b ON a.id = b.uid) c LEFT JOIN tbl_member_mobile d ON c.uid = d.uid
LIMIT :offset, :limit
</select>
<select id="getYohoPartner">
SELECT * FROM tbl_partner_login WHERE uid = :uid
</select>
<insert id="setYohoLog">
INSERT INTO yoho_import_log VALUES(:yoho_uid, :sso_uid, :import_status, :create_time) ON DUPLICATE KEY UPDATE sso_uid = :sso_uid, import_status = :import_status, create_time = :create_time
</insert>
</sqlMap>