profile_thrift_client 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0962e2f2aa809118308c7bc5e162a0b5e5b8f312
4
+ data.tar.gz: 9d31fa4c710fea8934e3e875c760598e6138e7d2
5
+ SHA512:
6
+ metadata.gz: 693d037935f41eea4712dbec106e1a3755bd0b7efb1cf7e5568438c860706912f4b49ae485ed20b75892e1af63c3e30e5a033b1645d319c61927ed5e18060eb5
7
+ data.tar.gz: ccae273b8384afcd9317fac42ccc02da7c42a62f77f463fb137eca41f04c036cea2883305adc03eaed10598128d0cb7908ebdafa04895c39c5e97eee3c8b713b
@@ -0,0 +1,282 @@
1
+ require 'remote_profile_constants'
2
+ require 'remote_profile_types'
3
+ require 'remote_user_profile_service'
4
+ require 'remote_user_vip_service'
5
+ require 'logger'
6
+
7
+ module Profile
8
+ module Thrift
9
+
10
+ DEFAULT_CONFIG = {
11
+ 'protocol' => 'compact',
12
+ 'transport' => 'socket',
13
+ 'transport_warpper' => 'framed',
14
+ 'size' => 1,
15
+ 'timeout' => 30,
16
+ 'test_on_borrow' => true,
17
+ 'multiplexed' => true,
18
+ 'pool_timeout' => 12
19
+ }
20
+
21
+ class LoggerFactory
22
+ @@logger = nil
23
+ def self.getLogger(name)
24
+ if @@logger.nil?
25
+ if @@logger.nil?
26
+ log_path = "../profile-client.log"
27
+ log_level = "error";
28
+ logger = Logger.new(log_path,'daily')
29
+ logger.level = Logger::const_get(log_level.upcase)
30
+ @@logger = logger;
31
+ end
32
+ end
33
+ @@logger
34
+ end
35
+ end
36
+
37
+ class ThriftUserProfileService
38
+
39
+ def initialize(config = {})
40
+ if config['servers'].nil?
41
+ raise 'servers must be determined!'
42
+ return
43
+ end
44
+ config = DEFAULT_CONFIG.merge(config)
45
+ config['client_class'] = 'Profile::Thrift::RemoteUserProfileService::Client'
46
+ @thriftClient = ThriftClient.new(config)
47
+ @@logger = LoggerFactory.getLogger("ThriftUserProfileService")
48
+ end
49
+
50
+ def destroy
51
+ @@logger.error("before ThriftUserProfileService destroy")
52
+ begin
53
+ @thriftClient.destroy
54
+ rescue Exception => e
55
+ @@logger.error("ThriftUserProfileService destroy error !! #{e.message}" + "\n" + e.backtrace.join("\n"))
56
+ end
57
+ @@logger.error("thriftUserProfileService destroyed!")
58
+ end
59
+
60
+ def save(profile = {})
61
+ if (profile['uid'].nil?)
62
+ return
63
+ end
64
+ profile = Profile::Thrift::Profile.new(profile)
65
+ @thriftClient.save(profile)
66
+ end
67
+
68
+ def getProfileByUid(uid)
69
+ profile = @thriftClient.getProfileByUid(uid)
70
+ return convert_profile_to_hash(profile)
71
+ end
72
+
73
+ def getProfileByUids(uids)
74
+ profile_map = @thriftClient.getProfileByUids(uids)
75
+ unless profile_map.nil?
76
+ hash_profile_map = {}
77
+ profile_map.each do |k, v|
78
+ hash_profile_map[k] = convert_profile_to_hash(v)
79
+ end
80
+ return hash_profile_map
81
+ end
82
+ return nil
83
+ end
84
+
85
+ def getNicknameByUid(uid)
86
+ @thriftClient.getNicknameByUid(uid)
87
+ end
88
+
89
+ def getMultiNickNameByUids(uidList)
90
+ @thriftClient.getMultiNickNameByUids(uidList)
91
+ end
92
+
93
+ def queryUserSimpleInfo(uid)
94
+ begin
95
+ if uid && uid.to_i > 0
96
+ info = @thriftClient.queryUserSimpleInfo(uid)
97
+ info = convert_user_simpleinfo_to_hash(info)
98
+ end
99
+ unless info
100
+ @@logger.error("query user basic info return nil, uid:#{uid}")
101
+ end
102
+ return info
103
+ rescue Exception => e
104
+ @logger.error("query user simple info error, uid:#{uid}, cause by : #{e.message},"+"\n"+e.backtrace.join("\n"))
105
+ if info
106
+ @@logger.error("simpleinfo:#{info.inspect}")
107
+ end
108
+ end
109
+ end
110
+
111
+ def getMultiUserSimpleInfos(uids)
112
+ if uids.nil? || uids.size == 0
113
+ return nil
114
+ end
115
+ info_map = @thriftClient.getMultiUserSimpleInfos(uids)
116
+ unless info_map.nil?
117
+ hash_info_map = {}
118
+ info_map.each do |k, v|
119
+ hash_info_map[k] = convert_user_simpleinfo_to_hash(v)
120
+ end
121
+ return hash_info_map
122
+ end
123
+ return nil
124
+ end
125
+
126
+ def queryUserBasicInfo(uid)
127
+ begin
128
+ if uid && uid.to_i > 0
129
+ info = @thriftClient.queryUserBasicInfo(uid)
130
+ info = convert_user_basicinfo_to_hash(info)
131
+ end
132
+ unless info
133
+ @@logger.error("query user basic info return nil , uid: #{uid}")
134
+ end
135
+ return info
136
+ rescue Exception => e
137
+ @@logger.error("query user basic info error, uid: #{uid},cause by :#{e.message}," + " \n" + e.backtrace.join("\n"))
138
+ if info
139
+ @@logger.error("info : #{info.inspect}")
140
+ end
141
+ end
142
+ end
143
+
144
+ def getMultiUserBasicInfos(uids)
145
+ info_map = @thriftClient.getMultiUserBasicInfos(uids)
146
+ unless info_map.nil?
147
+ hash_info_map = {}
148
+ info_map.each do |k, v|
149
+ hash_info_map[k] = convert_user_basicinfo_to_hash(v)
150
+ end
151
+ return hash_info_map
152
+ end
153
+ return nil
154
+ end
155
+
156
+ def getProfileByNickname(nickname)
157
+ profile_list = @thriftClient.getProfileByNickname(nickname)
158
+ unless profile_list.nil?
159
+ hash_profile_list = []
160
+ profile_list.each do |p|
161
+ hash_profile_list << convert_profile_to_hash(p)
162
+ end
163
+ return hash_profile_list
164
+ end
165
+ return nil
166
+ end
167
+
168
+ def checkNickname(oldNickname, nickname)
169
+ @thriftClient.checkNickname(oldNickname, nickname)
170
+ end
171
+
172
+ def checkNicknameFormat(nickname)
173
+ @thriftClient.checkNicknameFormat(nickname)
174
+ end
175
+
176
+ def checkNicknameDuplicate(oldNickname, nickname)
177
+ @thriftClient.checkNicknameDuplicate(oldNickname, nickname)
178
+ end
179
+
180
+ def getProfielByEmail(email)
181
+ convert_profile_to_hash(@thriftClient.getProfielByEmail(email))
182
+ end
183
+
184
+ def convert_profile_to_hash(profile)
185
+ unless profile.nil? || profile.isNull
186
+ profile = profile.to_hash
187
+ if profile['createTime'] > 0
188
+ profile['createTime'] = Time.at(profile['createTime'] / 1000).to_s
189
+ else
190
+ profile['createTime'] = nil
191
+ end
192
+ if profile['lastModifyTime'] > 0
193
+ profile['lastModifyTime'] = Time.at(profile['lastModifyTime'] / 1000).to_s
194
+ else
195
+ profile['lastModifyTime'] = nil
196
+ end
197
+
198
+ if profile['loginBanStart'] > 0
199
+ profile['loginBanStart'] = Time.at(profile['loginBanStart'] / 1000).to_s
200
+ else
201
+ profile['loginBanStart'] = nil
202
+ end
203
+
204
+ if profile['loginBanEnd'] > 0
205
+ profile['loginBanEnd'] = Time.at(profile['loginBanEnd'] / 1000).to_s
206
+ else
207
+ profile['loginBanEnd'] = nil
208
+ end
209
+
210
+ return profile
211
+ end
212
+ return nil
213
+ end
214
+
215
+ def convert_user_basicinfo_to_hash(profile)
216
+ unless profile.nil? || profile.isNull
217
+ profile = profile.to_hash
218
+ if profile['createdTime'] > 0
219
+ profile['createdTime'] = Time.at(profile['createdTime'] / 1000).to_s
220
+ else
221
+ profile['createdTime'] = nil
222
+ end
223
+
224
+ if profile['loginBanStart'] > 0
225
+ profile['loginBanStart'] = Time.at(profile['loginBanStart'] / 1000).to_s
226
+ else
227
+ profile['loginBanStart'] = nil
228
+ end
229
+
230
+ if profile['loginBanEnd'] > 0
231
+ profile['loginBanEnd'] = Time.at(profile['loginBanEnd'] / 1000).to_s
232
+ else
233
+ profile['loginBanEnd'] = nil
234
+ end
235
+
236
+ if profile['vCategoryId'] <= 0
237
+ profile['vCategoryId'] = nil
238
+ end
239
+
240
+ return profile
241
+ end
242
+ return nil
243
+ end
244
+
245
+ def convert_user_simpleinfo_to_hash(simple_info)
246
+ return simple_info.to_hash
247
+ end
248
+ end
249
+
250
+ class ThriftUserVipService
251
+
252
+ def initialize(config = {})
253
+ if config['servers'].nil?
254
+ raise 'servers must be determined!'
255
+ return
256
+ end
257
+ config = DEFAULT_CONFIG.merge(config)
258
+ config['client_class'] = 'Profile::Thrift::RemoteUserVipService::Client'
259
+ @thriftClient = ThriftClient.new(config)
260
+ @@logger = LoggerFactory.getLogger("RemoteUserVipService")
261
+ end
262
+
263
+ def destroy
264
+ @@logger.error("before RemoteUserVipService destroy")
265
+ begin
266
+ @thriftClient.destroy
267
+ rescue Exception => e
268
+ @@logger.error("RemoteUserVipService destroy error !! #{e.message}" + "\n" + e.backtrace.join("\n"))
269
+ end
270
+ @@logger.error("RemoteUserVipService destroyed!")
271
+ end
272
+
273
+ def setVipEndAt(uid, endAt)
274
+ if uid.to_id==0 || endAt.nil?
275
+ raise 'uid and endAt must be determined!'
276
+ return
277
+ end
278
+ @thriftClient.setVipEndAt(uid, (endAt.to_f * 1000).to_i)
279
+ end
280
+ end
281
+ end
282
+ end
@@ -0,0 +1,13 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+ require 'remote_profile_types'
9
+
10
+ module Profile
11
+ module Thrift
12
+ end
13
+ end
@@ -0,0 +1,370 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.1)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ module Profile
10
+ module Thrift
11
+ class Profile
12
+ include ::Thrift::Struct, ::Thrift::Struct_Union
13
+ UID = 1
14
+ NICKNAME = 2
15
+ GENDER = 3
16
+ BIRTHYEAR = 4
17
+ BIRTHMONTH = 5
18
+ BIRTHDAY = 6
19
+ ISSECRETYEAR = 7
20
+ BLOODTYPE = 8
21
+ CONSTELLATION = 9
22
+ HOMECOUNTRY = 10
23
+ HOMEPROVINCE = 11
24
+ HOMECITY = 12
25
+ HOMETOWN = 13
26
+ COUNTRY = 14
27
+ PROVINCE = 15
28
+ CITY = 16
29
+ TOWN = 17
30
+ MOBILE = 18
31
+ TELEPHONE = 19
32
+ PROFESSION = 20
33
+ FINISHSCHOOL = 21
34
+ PERSONALHOMEPAGE = 22
35
+ PERSONALCOMMENT = 23
36
+ PERSONALSIGNATURE = 24
37
+ LOGOPIC = 25
38
+ EMAIL = 26
39
+ CREATETIME = 27
40
+ LASTMODIFYTIME = 28
41
+ CONTACTADDRESS = 29
42
+ CONTACTEMAIL = 30
43
+ QQ = 31
44
+ MSN = 32
45
+ STATUS = 33
46
+ SUBEMAIL = 34
47
+ SUITID = 35
48
+ THIRDPARTYUSERID = 36
49
+ WEIBONAME = 37
50
+ LARGEPIC = 38
51
+ MIDDLEPIC = 39
52
+ SMALLPIC = 40
53
+ ISCOMPLETED = 41
54
+ ISROBOT = 42
55
+ ISVERIFIED = 43
56
+ ISBLACKLISTED = 44
57
+ ISDELETED = 45
58
+ REGISTEREDIP = 46
59
+ ISVEMAIL = 47
60
+ ISVMOBILE = 48
61
+ LASTTRACKID = 49
62
+ REALNAME = 50
63
+ IDENTIFICATION = 51
64
+ IDENTIFICATIONTYPE = 52
65
+ ISLOGINBAN = 53
66
+ LOGINBANSTART = 54
67
+ LOGINBANEND = 55
68
+ PTITLE = 56
69
+ TASKCOMPLETEPROFILE = 57
70
+ TASKFOLLOW = 58
71
+ TASKDOWNLOADAPP = 59
72
+ TASKEMAIL = 60
73
+ ISGUIDECOMPLETED = 61
74
+ VCOMPANY = 62
75
+ VTAGS = 63
76
+ VCATEGORYID = 64
77
+ REGISTERCATEGORY = 65
78
+ REGISTERCLIENTTYPE = 66
79
+ THIRDPARTYID = 67
80
+ PERSONDESCRIBE = 68
81
+ GUIDEPLAYPANEL = 69
82
+ GUIDEVOICEPANEL = 70
83
+ GUIDESHAREPANEL = 71
84
+ BACKGROUNDPIC = 72
85
+ WEBBACKGROUNDPIC = 73
86
+ WEBBACKGROUNDPICPOSITIONY = 74
87
+ WEBBACKGROUNDPICPOSITIONX = 75
88
+ ISNULL = 76
89
+
90
+ FIELDS = {
91
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
92
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname', :optional => true},
93
+ GENDER => {:type => ::Thrift::Types::STRING, :name => 'gender', :optional => true},
94
+ BIRTHYEAR => {:type => ::Thrift::Types::I32, :name => 'birthYear'},
95
+ BIRTHMONTH => {:type => ::Thrift::Types::I32, :name => 'birthMonth'},
96
+ BIRTHDAY => {:type => ::Thrift::Types::I32, :name => 'birthDay'},
97
+ ISSECRETYEAR => {:type => ::Thrift::Types::I32, :name => 'isSecretYear'},
98
+ BLOODTYPE => {:type => ::Thrift::Types::STRING, :name => 'bloodType', :optional => true},
99
+ CONSTELLATION => {:type => ::Thrift::Types::STRING, :name => 'constellation', :optional => true},
100
+ HOMECOUNTRY => {:type => ::Thrift::Types::STRING, :name => 'homeCountry', :optional => true},
101
+ HOMEPROVINCE => {:type => ::Thrift::Types::STRING, :name => 'homeProvince', :optional => true},
102
+ HOMECITY => {:type => ::Thrift::Types::STRING, :name => 'homeCity', :optional => true},
103
+ HOMETOWN => {:type => ::Thrift::Types::STRING, :name => 'homeTown', :optional => true},
104
+ COUNTRY => {:type => ::Thrift::Types::STRING, :name => 'country', :optional => true},
105
+ PROVINCE => {:type => ::Thrift::Types::STRING, :name => 'province', :optional => true},
106
+ CITY => {:type => ::Thrift::Types::STRING, :name => 'city', :optional => true},
107
+ TOWN => {:type => ::Thrift::Types::STRING, :name => 'town', :optional => true},
108
+ MOBILE => {:type => ::Thrift::Types::STRING, :name => 'mobile', :optional => true},
109
+ TELEPHONE => {:type => ::Thrift::Types::STRING, :name => 'telephone', :optional => true},
110
+ PROFESSION => {:type => ::Thrift::Types::STRING, :name => 'profession', :optional => true},
111
+ FINISHSCHOOL => {:type => ::Thrift::Types::STRING, :name => 'finishSchool', :optional => true},
112
+ PERSONALHOMEPAGE => {:type => ::Thrift::Types::STRING, :name => 'personalHomepage', :optional => true},
113
+ PERSONALCOMMENT => {:type => ::Thrift::Types::STRING, :name => 'personalComment', :optional => true},
114
+ PERSONALSIGNATURE => {:type => ::Thrift::Types::STRING, :name => 'personalSignature', :optional => true},
115
+ LOGOPIC => {:type => ::Thrift::Types::STRING, :name => 'logoPic', :optional => true},
116
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
117
+ CREATETIME => {:type => ::Thrift::Types::I64, :name => 'createTime'},
118
+ LASTMODIFYTIME => {:type => ::Thrift::Types::I64, :name => 'lastModifyTime'},
119
+ CONTACTADDRESS => {:type => ::Thrift::Types::STRING, :name => 'contactAddress', :optional => true},
120
+ CONTACTEMAIL => {:type => ::Thrift::Types::STRING, :name => 'contactEmail', :optional => true},
121
+ QQ => {:type => ::Thrift::Types::STRING, :name => 'qq', :optional => true},
122
+ MSN => {:type => ::Thrift::Types::STRING, :name => 'msn', :optional => true},
123
+ STATUS => {:type => ::Thrift::Types::STRING, :name => 'status', :optional => true},
124
+ SUBEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'subEmail'},
125
+ SUITID => {:type => ::Thrift::Types::I32, :name => 'suitId'},
126
+ THIRDPARTYUSERID => {:type => ::Thrift::Types::I64, :name => 'thirdpartyUserId'},
127
+ WEIBONAME => {:type => ::Thrift::Types::STRING, :name => 'weiboName', :optional => true},
128
+ LARGEPIC => {:type => ::Thrift::Types::STRING, :name => 'largePic', :optional => true},
129
+ MIDDLEPIC => {:type => ::Thrift::Types::STRING, :name => 'middlePic', :optional => true},
130
+ SMALLPIC => {:type => ::Thrift::Types::STRING, :name => 'smallPic', :optional => true},
131
+ ISCOMPLETED => {:type => ::Thrift::Types::BOOL, :name => 'isCompleted'},
132
+ ISROBOT => {:type => ::Thrift::Types::BOOL, :name => 'isRobot'},
133
+ ISVERIFIED => {:type => ::Thrift::Types::BOOL, :name => 'isVerified'},
134
+ ISBLACKLISTED => {:type => ::Thrift::Types::BOOL, :name => 'isBlacklisted'},
135
+ ISDELETED => {:type => ::Thrift::Types::BOOL, :name => 'isDeleted'},
136
+ REGISTEREDIP => {:type => ::Thrift::Types::STRING, :name => 'registeredIp', :optional => true},
137
+ ISVEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'isVEmail'},
138
+ ISVMOBILE => {:type => ::Thrift::Types::BOOL, :name => 'isVMobile'},
139
+ LASTTRACKID => {:type => ::Thrift::Types::I64, :name => 'lastTrackId'},
140
+ REALNAME => {:type => ::Thrift::Types::STRING, :name => 'realName', :optional => true},
141
+ IDENTIFICATION => {:type => ::Thrift::Types::STRING, :name => 'identification', :optional => true},
142
+ IDENTIFICATIONTYPE => {:type => ::Thrift::Types::I16, :name => 'identificationType'},
143
+ ISLOGINBAN => {:type => ::Thrift::Types::BOOL, :name => 'isLoginBan'},
144
+ LOGINBANSTART => {:type => ::Thrift::Types::I64, :name => 'loginBanStart'},
145
+ LOGINBANEND => {:type => ::Thrift::Types::I64, :name => 'loginBanEnd'},
146
+ PTITLE => {:type => ::Thrift::Types::STRING, :name => 'ptitle', :optional => true},
147
+ TASKCOMPLETEPROFILE => {:type => ::Thrift::Types::BOOL, :name => 'taskCompleteProfile'},
148
+ TASKFOLLOW => {:type => ::Thrift::Types::BOOL, :name => 'taskFollow'},
149
+ TASKDOWNLOADAPP => {:type => ::Thrift::Types::BOOL, :name => 'taskDownloadApp'},
150
+ TASKEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'taskEmail'},
151
+ ISGUIDECOMPLETED => {:type => ::Thrift::Types::BOOL, :name => 'isGuideCompleted'},
152
+ VCOMPANY => {:type => ::Thrift::Types::STRING, :name => 'vCompany', :optional => true},
153
+ VTAGS => {:type => ::Thrift::Types::STRING, :name => 'vTags', :optional => true},
154
+ VCATEGORYID => {:type => ::Thrift::Types::I32, :name => 'vCategoryId'},
155
+ REGISTERCATEGORY => {:type => ::Thrift::Types::STRING, :name => 'registerCategory', :optional => true},
156
+ REGISTERCLIENTTYPE => {:type => ::Thrift::Types::I16, :name => 'registerClientType'},
157
+ THIRDPARTYID => {:type => ::Thrift::Types::I64, :name => 'thirdpartyId'},
158
+ PERSONDESCRIBE => {:type => ::Thrift::Types::STRING, :name => 'personDescribe', :optional => true},
159
+ GUIDEPLAYPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guidePlayPanel'},
160
+ GUIDEVOICEPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guideVoicePanel'},
161
+ GUIDESHAREPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guideSharePanel'},
162
+ BACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'backgroundPic', :optional => true},
163
+ WEBBACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'webBackgroundPic', :optional => true},
164
+ WEBBACKGROUNDPICPOSITIONY => {:type => ::Thrift::Types::DOUBLE, :name => 'webBackgroundPicPositionY'},
165
+ WEBBACKGROUNDPICPOSITIONX => {:type => ::Thrift::Types::DOUBLE, :name => 'webBackgroundPicPositionX'},
166
+ ISNULL => {:type => ::Thrift::Types::BOOL, :name => 'isNull'}
167
+ }
168
+
169
+ def struct_fields; FIELDS; end
170
+
171
+ def validate
172
+ end
173
+
174
+ ::Thrift::Struct.generate_accessors self
175
+ end
176
+
177
+ class UserBasicInfo
178
+ include ::Thrift::Struct, ::Thrift::Struct_Union
179
+ UID = 1
180
+ NICKNAME = 2
181
+ LOGOPIC = 3
182
+ BACKGROUNDPIC = 4
183
+ WEBBACKGROUNDPIC = 5
184
+ WEBBACKGROUNDPICPOSITIONX = 6
185
+ WEBBACKGROUNDPICPOSITIONY = 7
186
+ EMAIL = 8
187
+ ACCOUNT = 9
188
+ MOBILE = 10
189
+ THIRDPARTYNAME = 11
190
+ ISVERIFIED = 12
191
+ ISCOMPLETED = 13
192
+ ISVEMAIL = 14
193
+ ISVMOBILE = 15
194
+ ISROBOT = 16
195
+ PROVINCE = 17
196
+ CITY = 18
197
+ TOWN = 19
198
+ COUNTRY = 20
199
+ PERSONALSIGNATURE = 21
200
+ PTITLE = 22
201
+ ISGUIDECOMPLETED = 23
202
+ TASKCOMPLETEPROFILE = 24
203
+ TASKFOLLOW = 25
204
+ TASKDOWNLOADAPP = 26
205
+ TASKEMAIL = 27
206
+ VCOMPANY = 28
207
+ VTAGS = 29
208
+ VCATEGORYID = 30
209
+ CREATEDTIME = 31
210
+ ISLOGINBAN = 32
211
+ LOGINBANSTART = 33
212
+ LOGINBANEND = 34
213
+ ISDELETED = 35
214
+ REGISTERCATEGORY = 36
215
+ PERSONDESCRIBE = 37
216
+ GUIDEPLAYPANEL = 38
217
+ GUIDEVOICEPANEL = 39
218
+ GUIDESHAREPANEL = 40
219
+ ISINBLACKLIST = 41
220
+ ISNULL = 42
221
+
222
+ FIELDS = {
223
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
224
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname', :optional => true},
225
+ LOGOPIC => {:type => ::Thrift::Types::STRING, :name => 'logoPic', :optional => true},
226
+ BACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'backgroundPic', :optional => true},
227
+ WEBBACKGROUNDPIC => {:type => ::Thrift::Types::STRING, :name => 'webBackgroundPic', :optional => true},
228
+ WEBBACKGROUNDPICPOSITIONX => {:type => ::Thrift::Types::DOUBLE, :name => 'webBackgroundPicPositionX'},
229
+ WEBBACKGROUNDPICPOSITIONY => {:type => ::Thrift::Types::DOUBLE, :name => 'webBackgroundPicPositionY'},
230
+ EMAIL => {:type => ::Thrift::Types::STRING, :name => 'email', :optional => true},
231
+ ACCOUNT => {:type => ::Thrift::Types::STRING, :name => 'account', :optional => true},
232
+ MOBILE => {:type => ::Thrift::Types::STRING, :name => 'mobile', :optional => true},
233
+ THIRDPARTYNAME => {:type => ::Thrift::Types::STRING, :name => 'thirdpartyName', :optional => true},
234
+ ISVERIFIED => {:type => ::Thrift::Types::BOOL, :name => 'isVerified'},
235
+ ISCOMPLETED => {:type => ::Thrift::Types::BOOL, :name => 'isCompleted'},
236
+ ISVEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'isVEmail'},
237
+ ISVMOBILE => {:type => ::Thrift::Types::BOOL, :name => 'isVMobile'},
238
+ ISROBOT => {:type => ::Thrift::Types::BOOL, :name => 'isRobot'},
239
+ PROVINCE => {:type => ::Thrift::Types::STRING, :name => 'province', :optional => true},
240
+ CITY => {:type => ::Thrift::Types::STRING, :name => 'city', :optional => true},
241
+ TOWN => {:type => ::Thrift::Types::STRING, :name => 'town', :optional => true},
242
+ COUNTRY => {:type => ::Thrift::Types::STRING, :name => 'country', :optional => true},
243
+ PERSONALSIGNATURE => {:type => ::Thrift::Types::STRING, :name => 'personalSignature', :optional => true},
244
+ PTITLE => {:type => ::Thrift::Types::STRING, :name => 'ptitle', :optional => true},
245
+ ISGUIDECOMPLETED => {:type => ::Thrift::Types::BOOL, :name => 'isGuideCompleted'},
246
+ TASKCOMPLETEPROFILE => {:type => ::Thrift::Types::BOOL, :name => 'taskCompleteProfile'},
247
+ TASKFOLLOW => {:type => ::Thrift::Types::BOOL, :name => 'taskFollow'},
248
+ TASKDOWNLOADAPP => {:type => ::Thrift::Types::BOOL, :name => 'taskDownloadApp'},
249
+ TASKEMAIL => {:type => ::Thrift::Types::BOOL, :name => 'taskEmail'},
250
+ VCOMPANY => {:type => ::Thrift::Types::STRING, :name => 'vCompany', :optional => true},
251
+ VTAGS => {:type => ::Thrift::Types::STRING, :name => 'vTags', :optional => true},
252
+ VCATEGORYID => {:type => ::Thrift::Types::I32, :name => 'vCategoryId'},
253
+ CREATEDTIME => {:type => ::Thrift::Types::I64, :name => 'createdTime'},
254
+ ISLOGINBAN => {:type => ::Thrift::Types::BOOL, :name => 'isLoginBan'},
255
+ LOGINBANSTART => {:type => ::Thrift::Types::I64, :name => 'loginBanStart'},
256
+ LOGINBANEND => {:type => ::Thrift::Types::I64, :name => 'loginBanEnd'},
257
+ ISDELETED => {:type => ::Thrift::Types::BOOL, :name => 'isDeleted'},
258
+ REGISTERCATEGORY => {:type => ::Thrift::Types::STRING, :name => 'registerCategory', :optional => true},
259
+ PERSONDESCRIBE => {:type => ::Thrift::Types::STRING, :name => 'personDescribe', :optional => true},
260
+ GUIDEPLAYPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guidePlayPanel'},
261
+ GUIDEVOICEPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guideVoicePanel'},
262
+ GUIDESHAREPANEL => {:type => ::Thrift::Types::BOOL, :name => 'guideSharePanel'},
263
+ ISINBLACKLIST => {:type => ::Thrift::Types::BOOL, :name => 'isInBlackList'},
264
+ ISNULL => {:type => ::Thrift::Types::BOOL, :name => 'isNull'}
265
+ }
266
+
267
+ def struct_fields; FIELDS; end
268
+
269
+ def validate
270
+ end
271
+
272
+ ::Thrift::Struct.generate_accessors self
273
+ end
274
+
275
+ class PageUid
276
+ include ::Thrift::Struct, ::Thrift::Struct_Union
277
+ PAGEID = 1
278
+ PAGESIZE = 2
279
+ MAXPAGEID = 3
280
+ TOTALCOUNT = 4
281
+ DATA = 5
282
+
283
+ FIELDS = {
284
+ PAGEID => {:type => ::Thrift::Types::I32, :name => 'pageId'},
285
+ PAGESIZE => {:type => ::Thrift::Types::I32, :name => 'pageSize'},
286
+ MAXPAGEID => {:type => ::Thrift::Types::I32, :name => 'maxPageId'},
287
+ TOTALCOUNT => {:type => ::Thrift::Types::I32, :name => 'totalCount'},
288
+ DATA => {:type => ::Thrift::Types::LIST, :name => 'data', :element => {:type => ::Thrift::Types::I64}}
289
+ }
290
+
291
+ def struct_fields; FIELDS; end
292
+
293
+ def validate
294
+ end
295
+
296
+ ::Thrift::Struct.generate_accessors self
297
+ end
298
+
299
+ class UserSimpleInfo
300
+ include ::Thrift::Struct, ::Thrift::Struct_Union
301
+ UID = 1
302
+ NICKNAME = 2
303
+ LOGOPIC = 3
304
+ ISVERIFIED = 4
305
+ ISNULL = 5
306
+
307
+ FIELDS = {
308
+ UID => {:type => ::Thrift::Types::I64, :name => 'uid'},
309
+ NICKNAME => {:type => ::Thrift::Types::STRING, :name => 'nickname', :optional => true},
310
+ LOGOPIC => {:type => ::Thrift::Types::STRING, :name => 'logoPic', :optional => true},
311
+ ISVERIFIED => {:type => ::Thrift::Types::BOOL, :name => 'isVerified'},
312
+ ISNULL => {:type => ::Thrift::Types::BOOL, :name => 'isNull'}
313
+ }
314
+
315
+ def struct_fields; FIELDS; end
316
+
317
+ def validate
318
+ end
319
+
320
+ ::Thrift::Struct.generate_accessors self
321
+ end
322
+
323
+ class StatisticParameters
324
+ include ::Thrift::Struct, ::Thrift::Struct_Union
325
+ IP = 1
326
+ POSITIONX = 2
327
+ POSITIONY = 3
328
+ MAC = 4
329
+ DEVICEID = 5
330
+
331
+ FIELDS = {
332
+ IP => {:type => ::Thrift::Types::STRING, :name => 'ip', :optional => true},
333
+ POSITIONX => {:type => ::Thrift::Types::STRING, :name => 'positionx', :optional => true},
334
+ POSITIONY => {:type => ::Thrift::Types::STRING, :name => 'positiony', :optional => true},
335
+ MAC => {:type => ::Thrift::Types::STRING, :name => 'mac', :optional => true},
336
+ DEVICEID => {:type => ::Thrift::Types::STRING, :name => 'deviceId', :optional => true}
337
+ }
338
+
339
+ def struct_fields; FIELDS; end
340
+
341
+ def validate
342
+ end
343
+
344
+ ::Thrift::Struct.generate_accessors self
345
+ end
346
+
347
+ class ThriftCommonResponse
348
+ include ::Thrift::Struct, ::Thrift::Struct_Union
349
+ SUCCESS = 1
350
+ ERRORCODE = 2
351
+ ERRORMSG = 3
352
+ DATA = 4
353
+
354
+ FIELDS = {
355
+ SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'},
356
+ ERRORCODE => {:type => ::Thrift::Types::STRING, :name => 'errorCode', :optional => true},
357
+ ERRORMSG => {:type => ::Thrift::Types::STRING, :name => 'errorMsg', :optional => true},
358
+ DATA => {:type => ::Thrift::Types::STRING, :name => 'data', :optional => true}
359
+ }
360
+
361
+ def struct_fields; FIELDS; end
362
+
363
+ def validate
364
+ end
365
+
366
+ ::Thrift::Struct.generate_accessors self
367
+ end
368
+
369
+ end
370
+ end