Import.class.php
3.23 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
/**
* 数据导入
*
* @name Service_Import
* @package service
* @copyright yoho.inc
* @version 5.0 (2014-3-14 13:47:57)
* @author whb <huanbao.wang@yoho.cn>
*/
class Service_Import extends Lib_Service
{
const ROUTER = 'import.yh_history.import';
public function getUserProfile($offset, $limit)
{
$params = array('offset'=> $offset, 'limit' => $limit);
return self::service(self::ROUTER)->cache(false)->fetchAssoc('getUserProfile', $params);
}
public function getUserProfileTotal()
{
return self::service(self::ROUTER)->cache(false)->fetchOne('getUserProfileTotal');
}
public function getUserBase($uid)
{
return self::service(self::ROUTER)->cache(false)->fetchRow('getUserBase', array('uid' => $uid));
}
public function setYohobuyLog($yohobuy_uid, $sso_uid, $import_status)
{
$params = array('yohobuy_uid' => $yohobuy_uid, 'sso_uid'=> $sso_uid,
'import_status' => $import_status, 'create_time' => time());
return self::service(self::ROUTER)->cache(false)->insert('setYohobuyLog', $params)->status();
}
public function setYohobuyPartnerLog($yohobuy_uid, $sso_uid, $open_id, $import_status)
{
$params = array('yohobuy_uid' => $yohobuy_uid, 'sso_uid'=> $sso_uid,'open_id'=>$open_id, 'import_status' => $import_status, 'create_time' => time());
return self::service(self::ROUTER)->cache(false)->insert('setYohobuyPartnerLog', $params)->status();
}
public function getYohobuyLogTotal()
{
return self::service(self::ROUTER)->cache(false)->fetchOne('getYohobuyLogTotal');
}
public function getYohobuyLog($yohobuy_uid)
{
return self::service(self::ROUTER)->cache(false)->fetchRow('getYohobuyLog', array('yohobuy_uid' => $yohobuy_uid));
}
public function getYohobuyOpenIdByUid($uid)
{
return self::service(self::ROUTER)->cache(false)->fetchAssoc('getYohobuyOpenIdByUid', array('uid' => $uid));
}
public function getShowPartner($offset, $limit)
{
return self::service(self::ROUTER)->cache(false)->fetchAssoc('getShowPartner', array('offset'=> $offset, 'limit' => $limit));
}
public function getShowMemberBasic($uid)
{
return self::service(self::ROUTER)->cache(false)->fetchRow('getShowMemberBasic', array('uid' => $uid));
}
public function setShowPartnerLog($show_uid, $sso_uid, $import_status)
{
$params = array('show_uid' => $show_uid, 'sso_uid'=> $sso_uid,'import_status' => $import_status, 'create_time' => time());
return self::service(self::ROUTER)->cache(false)->insert('setShowPartnerLog', $params)->status();
}
public function getYohoMember($offset, $limit)
{
$params = array('offset'=> $offset, 'limit' => $limit);
return self::service(self::ROUTER)->cache(false)->fetchAssoc('getYohoMember', $params);
}
public function getYohoMobile($uid)
{
return self::service(self::ROUTER)->cache(false)->fetchRow('getYohoMobile', array('uid' => $uid));
}
public function getYohoPartner($uid)
{
return self::service(self::ROUTER)->cache(false)->fetchRow('getYohoPartner', array('uid' => $uid));
}
public function setYohoLog($yoho_uid, $sso_uid, $import_status)
{
$params = array('yoho_uid' => $yoho_uid, 'sso_uid'=> $sso_uid,'import_status' => $import_status, 'create_time' => time());
return self::service(self::ROUTER)->cache(false)->insert('setYohoLog', $params)->status();
}
}