Onlinereg.class.php
5.58 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<?php
/**
* 资讯业务处理
*
*/
class Facade_Onlinereg
{
//参展商
const TYPE_ONLINE_EXHIBITOR = 0;
//赞助商
const TYPE_ONLINE_SPONSOR = 1;
//媒体
const TYPE_ONLINE_MEDIA = 2;
//手册参展商
const TYPE_ONLINE_DOWNLOAD_EXHIBITOR = 0;
//手册媒体
const TYPE_ONLINE_DOWNLOAD_MEDIA = 1;
/**
* 服务
*/
private static $service = null;
/**
*
* @return Service_Index
*/
private static function service ()
{
if (! isset(self::$service))
{
self::$service = new Service_Onlinereg();
}
return self::$service;
}
/**
* 设置商家信息
*
* @param string $name
* @param string $type
* @param string $sex
* @param int $brand_reg_type
* @param int $is_enter_yohobuy
* @param int $profession
* @param string $product_type
* @param string $country
* @param string $city
* @param string $company
* @param string $contact
* @param string $telphone
* @param string $mobile
* @param string $email
* @param string $relation
* @param string $website
* @param string $introduction
* @param int $is_3c
* @param string $place
* @param string $files
* @param string $zipcode
* @return int
*/
public static function setSellerInfo($name, $type, $sex, $brand_reg_type, $is_enter_yohobuy, $profession, $product_type, $country, $city,
$company, $contact, $telphone, $mobile, $email, $relation, $website, $introduction, $is_3c, $place, $files, $zipcode)
{
$file = '';
if(is_array($files))
{
$file = implode('|', $files);
} else {
$file = $files;
}
return self::service()->setSellerInfo($name, $type, $sex, $brand_reg_type, $is_enter_yohobuy, $profession, $product_type, $country, $city,
$company, $contact, $telphone, $mobile, $email, $relation, $website, $introduction, $is_3c, $place, $file, $zipcode);
}
/**
* 获取商家列表
*
* @param int $type
* @param int $offset
* @param int $limit
* @return array
*/
public static function getSellerListByType($type, $offset = 1, $limit = 10)
{
return self::service()->getSellerListByType($type, $offset, $limit);
}
/**
* 根据type获取总数
*
* @param int $type
* @return array
*/
public static function getSellerTotalByType($type)
{
return self::service()->getSellerTotalByType($type);
}
/**
* 根据ID获取商家
*
* @param int $id
* @return array
*/
public static function getSellerById($id)
{
return self::service()->getSellerById($id);
}
/**
* 设置媒体信息
*
* @param string $name
* @param string $profession
* @param int $sex
* @param string $company
* @param string $introduction
* @param string $website
* @param string $city
* @param string $email
* @param string $mobile
* @param string $telphone
* @param string $address
* @param string $zipcode
* @return int
*/
public static function setMediaInfo($name, $profession, $sex, $company, $introduction, $website, $city,
$email, $mobile, $telphone, $address, $zipcode)
{
return self::service()->setMediaInfo($name, $profession, $sex, $company, $introduction, $website, $city,
$email, $mobile, $telphone, $address, $zipcode);
}
/**
* 获取下载列表
*
* @param int $type
* @param int $offset
* @param int $limit
* @return array
*/
public static function getDownloadListByType($type, $offset, $limit)
{
return self::service()->getDownloadListByType($type, $offset, $limit);
}
/**
* 获取下载总数
*
* @param int $type
* @return array
*/
public static function getDownloadTotalByType($type)
{
return self::service()->getDownloadTotalByType($type);
}
/**
* 根据ID设置下载信息
*
* @param int $id
* @param string $title
* @param string $cover
* @param string $file
* @param string $source
* @param string $source_link
* @return boolean
*/
public static function setDownloadInfoById($id, $title, $cover, $file, $source, $source_link)
{
return self::service()->setDownloadInfoById($id, $title, $cover, $file, $source, $source_link);
}
/**
* 设置下载信息
*
* @param string $title
* @param string $cover
* @param string $file
* @param string $source
* @param string $source_link
* @param string $type
* @return boolean
*/
public static function setDownloadInfo($title, $cover, $file, $source, $source_link, $type)
{
return self::service()->setDownloadInfo($title, $cover, $file, $source, $source_link, $type);
}
/**
* 获取下载信息
*
* @param int $id
* @return array
*/
public static function getDownloadById($id)
{
return self::service()->getDownloadById($id);
}
/**
* 删除下载信息
*
* @param int $id
* @return boolean
*/
public static function delDownload($id)
{
return self::service()->delDownload($id);
}
/**
* 设置商家信息
*
* @param array $data
* @return boolean
*/
public static function setSeller(array $data)
{
return self::service()->setSeller($data);
}
}