黄学彪
2020-09-22 ade5917841b0fdcb1df7353ef7c56b1a1bdc9282
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
using System;
using System.Collections;
 
namespace Shared.Common
{
    public class SendDataToServer
    {
        #region IsExistingAccount 验证账号是否被使用 功能描述:验证手机和邮箱是否被注册
        [System.Serializable]
        public class IsExistingAccountReqDto
        {
            public IsExistingAccountObj ReqDto;
 
            public IsExistingAccountReqDto()
            {
                this.ReqDto = new IsExistingAccountObj();
            }
        }
        [System.Serializable]
        public class IsExistingAccountObj
        {
            public string Account;
        }
        #endregion
 
        #region GetAreaCode 获取国家或者地区代码列表 列如中国大陆86-暂时不需要传参-但是为了网路请求方法的统一,参数不能为空
        public class GetAreaCodeOBJ
        {
            public string RequestVersion;
        }
 
        #endregion
 
        #region LoginValidCode 使用验证码登录(不需要加00和区号,直接手机号就行)
        [System.Serializable]
        public class LoginValidCodeOBJ
        {
            public string Account;
            public string Code;
            public string Language;
            public int AreaCode;
        }
        #endregion
 
        #region SignPhone 功能描述:发送手机验证 --海外的需要加上00和区号
        [System.Serializable]
        public class SignPhoneReqDto
        {
            public RegisterSendVerCodeObj ReqDto;
 
            public SignPhoneReqDto()
            {
                this.ReqDto = new RegisterSendVerCodeObj();
            }
        }
 
        /// <summary>
        /// 邮箱和手机发送 --注册
        /// </summary>
        [System.Serializable]
        public class RegisterSendVerCodeObj
        {
            /// <summary>
            /// 之前为Phone 分布式后改为Account
            /// </summary>
            public string Account;
            /// <summary>
            /// 公司编号,国内使用手机短信验证码时,此字段填入0,国外手机短信验证码,此字段填入4
            /// 邮箱填0
            /// </summary>
            public int Company =0;
            /// <summary>
            /// 使用的语言
            /// </summary>
            public string Language;
            /// <summary>
            /// 国家地区代码,手机号发送验证码时使用 邮箱填0
            /// </summary>
            public int AreaCode=0;
        }
        /// <summary>
        /// 登录或者重置密码发送验证码
        /// </summary>
        [System.Serializable]
        public class LoginSendVerCodeObj
        {
            /// <summary>
            /// 之前为Phone 分布式后改为Account
            /// </summary>
            public string Account;
            /// <summary>
            /// 公司编号,国内使用手机短信验证码时,此字段填入0,国外手机短信验证码,此字段填入4
            /// 邮箱填0
            /// </summary>
            public int Company = 0;
            /// <summary>
            /// 使用的语言
            /// </summary>
            public string Language;
            /// <summary>
            /// 国家地区代码,手机号发送验证码时使用 邮箱填0
            /// </summary>
            public int AreaCode = 0;
        }
        #endregion
 
        #region ValidatorCode 功能描述:验证验证码
        /// <summary>
        /// 验证验证码
        /// </summary>
        [System.Serializable]
        public class ValidatorCodeObj
        {
            /// <summary>
            /// 之前为Phone 分布式后改为Account
            /// </summary>
            public string Account;
            /// <summary>
            /// 验证码
            /// </summary>
            public string Code;
            /// <summary>
            /// 使用的语言
            /// </summary>
            public string Language;
            /// <summary>
            /// 国家地区代码,手机号发送验证码时使用
            /// </summary>
            public int AreaCode;
        }
        #endregion
 
        #region 用户注册 功能描述:手机和邮箱注册
        /// <summary>
        /// 手机和邮箱注册--此前不需要单独验证验证码
        /// </summary>
        [System.Serializable]
        public class RegisterAccountObj
        {
            /// <summary>
            /// 用户账户
            /// </summary>
            public string Account;
            /// <summary>
            /// 用户密码(不加密)
            /// </summary>
            public string Password;
            /// <summary>
            /// 确认用户密码
            /// </summary>
            public string EnterPassword;
            /// <summary>
            /// 用户语言 用于查询当前用户所使用的语言
            /// 语言 (固定为:Chinese和English)
            /// </summary>
            public string Language;
            /// <summary>
            /// 验证码 
            /// </summary>
            public string Code;
            /// <summary>
            /// RegisterSoruce 注册来源:0:注册来自ON 软件 1:注册来自Zigbee
            ///默认值: 0
            /// </summary>
            public int RegisterSoruce;
            /// <summary>
            /// The area code.国家或者地区代码 列如中国大陆 86
            /// </summary>
            public int AreaCode;
        }
        #endregion
 
        #region Login 用户登录 功能描述:登录后获取访问令牌。
        [System.Serializable]
        public class LoginReqDto
        {
            public LoginObj ReqDto;
 
            public LoginReqDto()
            {
                this.ReqDto = new LoginObj();
            }
        }
        [System.Serializable]
        public class LoginObj
        {
            /// <summary>
            /// 用户账户
            /// </summary>
            public string Account;
            /// <summary>
            /// 用户密码(请使用32为MD5加密后转大写)
            /// </summary>
            public string Password;
            /// <summary>
            /// 登录来源,主要是为了区分此次登录是来源OnApp还是Zigbee App
            /// 默认值: null
            /// </summary>
            public string Source;
            /// <summary>
            /// Company 公司编号(0:HDL短信验证码 1:短信控制 2:酒店控制 3:忘记密码 100:安捷嘉 101:想天 102:安百纳 103:首城珑玺)
            /// 默认值: 0
            /// </summary>
            public int Company;
        }
        #endregion
 
        #region 第三方登录
 
       
        /// <summary>
        /// 添加或者更新微信授权登录信息
        /// </summary>
        [System.Serializable]
        public class AuthUser
        {
            /// <summary>
            /// 第三方token
            /// </summary>
            public string AccessToken;
            /// <summary>
            /// 刷新token
            /// </summary>
            public string RefreshToken;
            /// <summary>
            ///第三方用户唯一标识
            /// </summary>
            public string OpenID;
            /// <summary>
            /// 用户昵称
            /// </summary>
            public string UserName;
        }
 
        /// <summary>
        /// 第三方绑定账号
        /// </summary>
        [System.Serializable]
        public class BindAuthUser
        {
            /// <summary>
            /// 账号的Id
            /// </summary>
            public string AccountGuid;
            /// <summary>
            ///第三方用户唯一标识
            /// </summary>
            public string OpenID;
        }
 
        #endregion
 
 
        #region ForgetPasswordAction 功能描述:忘记密码,手机号找回密码方法
        /// <summary>
        /// 忘记密码
        /// </summary>
        [System.Serializable]
        public class ForgetPasswordObj
        {
            /// <summary>
            /// 之前为Phone 分布式后改为Account
            /// </summary>
            public string Account;
            /// <summary>
            /// 公司编号,国内使用手机短信验证码时,此字段填入0,国外手机短信验证码,此字段填入4
            /// 邮箱填0
            /// </summary>
            public int Company;
            /// <summary>
            /// 使用的语言
            /// </summary>
            public string Language;
            /// <summary>
            /// 国家地区代码,手机号发送验证码时使用 邮箱填0
            /// </summary>
            public int AreaCode;
        }
        /// <summary>
        /// 重置密码
        /// </summary>
        [System.Serializable]
        public class ResetPasswordObj
        {
            /// <summary>
            /// 之前为Phone 分布式后改为Account
            /// </summary>
            public string Account;
            /// <summary>
            /// 新密码
            /// </summary>
            public string Password;
            /// <summary>
            /// 确认密码
            /// </summary>
            public string AgainPassword;
            /// <summary>
            /// 国家地区代码,手机号发送验证码时使用 邮箱填0
            /// </summary>
            public int AreaCode=0;
        }
        #endregion
 
        #region ForgetPassword 功能描述:根据账号类型发送验证方式(邮箱账号发送邮件,手机账号发送短信验证码)
        [System.Serializable]
        public class ForgetPasswordReqDto
        {
            public ForgetPasswordObj ReqDto;
 
            public ForgetPasswordReqDto()
            {
                this.ReqDto = new ForgetPasswordObj();
            }
        }
        #endregion
 
        #region UpdatePassword 修改密码    功能描述:修改当前账号的密码
        /// <summary>
        /// Need Authorization
        /// </summary>
        [System.Serializable]
        public class UpdatePasswordObj
        {
            public string OldPassword;//
            public string Password;//
        }
        #endregion
 
        #region ResidenceList 获取用户的住宅区域列表    功能描述:获取用户所有住宅区域的列表
        [System.Serializable]
        public class ResidenceListReqDto
        {
            public string RequestVersion;
            public ResidenceListObj ReqDto;
 
            public ResidenceListReqDto()
            {
                this.ReqDto = new ResidenceListObj();
            }
        }
 
        [System.Serializable]
        public class ResidenceListObj
        {
            public string LoginAccessToken;
            public ResidenceListPageSettingObj PageSetting;
            public ResidenceListObj()
            {
                this.PageSetting = new ResidenceListPageSettingObj();
            }
        }
 
        [System.Serializable]
        public class ResidenceListPageSettingObj
        {
            public int PageSize;
        }
 
        #endregion
 
        #region AddResidence  添加住宅    功能描述:添加住宅名称
        /// <summary>
        /// Need Authorzation
        /// </summary>
        [System.Serializable]
        public class AddResidenceObj
        {
            public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion
            public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken
            public string Name;//住宅名称 -->键名 : Name
        }
        #endregion
 
        #region EditResidence  编辑住宅    功能描述:编辑住宅信息
        /// <summary>
        /// Need Authorzation
        /// </summary>
        [System.Serializable]
        public class EditResidenceObj
        {
            public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion
            public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken
            public string HomeId;//住宅主键 -->键名 : Id
            public string Name;//住宅名称 -->键名 : Name
        }
        #endregion
 
        #region DeleteResidence 删除整个住宅区域    功能描述:删除整个住宅区域
        /// <summary>
        /// Need Authorzation
        /// </summary>
        [System.Serializable]
        public class DeleteResidenceObj
        {
            public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion
            public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken
            public string HomeId;//住宅主键 -->键名 : Id
        }
        #endregion
 
        #region DeleteResidence 获取住宅中网关    功能描述:获取某个住宅中的网关
        /// <summary>
        /// Need Authorzation
        /// </summary>
        [System.Serializable]
        public class GetSingleZigbeeResidenceGatewayReqDto
        {
            public string RequestVersion;// 原密码 string 是
 
            public GetSingleZigbeeResidenceGatewayObj ReqDto;
 
            public GetSingleZigbeeResidenceGatewayReqDto()
            {
                this.ReqDto = new GetSingleZigbeeResidenceGatewayObj();
            }
        }
        [System.Serializable]
        public class GetSingleZigbeeResidenceGatewayObj
        {
            public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion
            public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken
            public string HomeId;//住宅主键 -->键名 : Id
        }
        #endregion
 
        #region DeleteResidence 绑定网关到住宅    功能描述:绑定网关到住宅
        /// <summary>
        /// Need Authorzation
        /// </summary>
        [System.Serializable]
        public class BindGatewayToZigbeeHomeObj
        {
            public string RequestVersion;// App 请求版本号 -->键名 : RequestVersion
            public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken
            public string HomeId;//住宅主键 -->键名 : ZigbeeHomeId
 
            public ArrayList BindGateways = new ArrayList();
        }
 
        [System.Serializable]
        public class BindGatewayObj
        {
            public string ZigbeeUniqueId;
        }
        #endregion
 
        #region DeleteResidence 解绑网关    功能描述:解绑住宅中的网关
        /// <summary>
        /// Need Authorzation
        /// </summary>
        [System.Serializable]
        public class ReleaseGatewayToZigbeeHomeObj
        {
            public string RequestVersion;// App 请求版本号 -->键名 : RequestVersion
            public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken
            public string HomeId;//住宅主键 -->键名 : ZigbeeHomeId
            public ArrayList BindGateways = new ArrayList();
        }
        #endregion
 
        #region GatewayByRegionList 读取用户指定区域网关列表    功能描述:读取当前用户指定区域的所有网关
        /// <summary>
        /// Need Authorization
        /// </summary>
        [System.Serializable]
        public class GatewayByRegionListObj
        {
            public int RegionID;// 住宅区域编号  int 是
        }
        #endregion
 
        #region UploadDataBack  数据备份 - App上传和更新某个家数据备份文件
        /// <summary>
        /// Need Authorzation
        /// </summary>
        [System.Serializable]
        public class UploadDataBackObj
        {
            public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion
            public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken
            public string HomeId;//住宅主键(通过[获取住宅分页]接口获取) -->键名 : ZigbeeHomeId
            public string BackupFileName;//备份文件名称(请注意唯一性,相同的文件会更新,不同的文件会添加) -->键名 : BackupFileName
            public byte [] BackupContent;//备份文件内容(请把二进制转成字符串) -->键名 : BackupContent
        }
        #endregion
 
        #region DownloadSingleHomeDataBack  数据备份 - App下载某个住宅下一个或者多个备份文件_列表
        /// <summary>
        /// 获取区域下的备份列表目录
        /// </summary>
        [System.Serializable]
        public class GetReisdenceFolderObj
        {
            public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion
            public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken
            public int Ids;//备份文件唯一Id数组(可下载多个) -->键名 : Ids
          }
        #endregion
 
        #region DelDataBackObj  数据备份 - App删除某个家某个备份数据文件
        /// <summary>
        /// Need Authorzation
        /// </summary>
        [System.Serializable]
        public class DelDataBackObj
        {
            public string RequestVersion;//App 请求版本号 -->键名 : RequestVersion
            public string LoginAccessToken;//ZigbeeApp登录成功后Token,有效期1天 -->键名 : LoginAccessToken
            public string HomeId;//住宅主键(通过[获取住宅分页]接口获取) -->键名 : ZigbeeHomeId
            //有问题:应该删除唯一的文件ID
            public string BackupFileName;//备份文件名称(请注意唯一性,相同的文件会更新,不同的文件会添加) -->键名 : BackupFileName
        }
 
 
        /// <summary>
        /// 备份文件夹里面的文件目录
        /// </summary>
        public class UserBackupListObj
        {
            public int LevelID;
        }
 
        /// <summary>
        /// 获取备份文件数据
        /// return 二进制流数据
        /// </summary>
        public class BackupDetailObj
        {
            public int Id;
        }
        #endregion
 
        #region 获取Android apk
        /// <summary>
        ///  获取Android apk
        /// </summary>
        public class GetAndroidApkInfoOBJ
        {
            public string RequestVersion;
            /// <summary>
            /// Name 搜索固件名称(apk、APP名称)
            /// </summary>
            public string Name;
        }
        #endregion
 
        #region 下载apk
        /// <summary>
        /// 下载安卓apk
        /// </summary>
        public class DownLoadAndroidApk
        {
            public string RequestVersion;
            /// <summary>
            /// 下载固件的唯一标识
            /// </summary>
            public string DistributedMark;
        }
        #endregion
 
        #region  登录时添加设备的RegId
        /// <summary>
        /// 登录时添加设备的RegId
        /// </summary>
        public class SignZigbeeNeedPushRegIDObj
        {
            /// <summary>
            /// 请填入从极光获取的RegId / iOS获取系统的设备id
            /// </summary>
            public string RegID;
            /// <summary>
            /// 请填入获取的设备的别名
            /// </summary>
            public string DeviceAlias;
            /// <summary>
            /// 请填入设备的类型,只能为【iphone】和【android】
            /// </summary>
            public string DeviceType;
        }
        #endregion
 
        #region  定时上传实时GPS信息
        /// <summary>
        /// 定时上传实时GPS信息
        /// </summary>
        public class ReceiveAppLatAndLonObj
        {
            /// <summary>
            /// 经度 
            /// </summary>
            public string Latitude;
            /// <summary>
            /// 纬度 
            /// </summary>
            public string Longitude;
        }
        #endregion
 
    }
}