From 944b87b6bcccb095cd73f13f4410fb20faf48f74 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期三, 25 十二月 2019 11:21:06 +0800 Subject: [PATCH] 2019.12.25 --- ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 41 +++++++++++++++++++++++++++++++---------- 1 files changed, 31 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs index baa7047..15ca0f0 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs @@ -467,6 +467,7 @@ { ["Type"] = int.Parse(dictionary["Type"]), ["Account"] = dictionary["Account"], + ["UserId"] = dictionary["UserId"], }; accounts.Add(accounts1); @@ -730,6 +731,7 @@ currUserIfon.CloudAccountId = Config.Instance.Guid; if (string.IsNullOrEmpty(UserCenter.UserCenterResourse.UserInfo.UserName)) { + ///濡傛灉鏄电О涓虹┖锛屾鏃讹紝鐧婚檰璐﹀彿涓洪粯璁ゆ樀绉帮紱 currUserIfon.UserName = UserCenter.UserCenterResourse.UserInfo.Account; } else @@ -738,12 +740,18 @@ } foreach (var o in AllUserIfon) { + if (o.IsFreezeUser || string.IsNullOrEmpty(o.UserId)) + { + ///杩囨护鎺夊喕缁撶殑鎴愬憳鍜孶serId涓虹┖鐨勬暟鎹紱 + continue; + } if (string.IsNullOrEmpty(currUserIfon.DoorLockMacPort)) { currUserIfon.DoorLockMacPort = o.DoorLockMacPort; } if (o.CloudAccountId == Config.Instance.Guid) { + UnlockingMode unlockingMode = new UnlockingMode(); unlockingMode.OpenMode = o.OpenMode; unlockingMode.UserId = o.UserId; @@ -769,6 +777,7 @@ userIfon.CloudAccountId = user.SubAccountDistributedMark; if (string.IsNullOrEmpty(user.UserName)) { + ///濡傛灉鏄电О涓虹┖锛屾鏃讹紝鐧婚檰璐﹀彿涓洪粯璁ゆ樀绉帮紱 userIfon.UserName = user.Account; } @@ -779,6 +788,11 @@ } for (int j = 0; j < AllUserIfon.Count; j++) { + if (AllUserIfon[j].IsFreezeUser || string.IsNullOrEmpty(AllUserIfon[j].UserId)) + { + ///杩囨护鎺夊喕缁撶殑鎴愬憳鍜孶serId涓虹┖鐨勬暟鎹紱 + continue; + } if (string.IsNullOrEmpty(userIfon.DoorLockMacPort)) { userIfon.DoorLockMacPort = AllUserIfon[j].DoorLockMacPort; @@ -834,6 +848,7 @@ user.CloudAccountId = data["CloudAccountId"].ToString(); user.DoorLockMacPort = data["DoorLockId"].ToString(); user.ModeName = data["UserIdRemarks"].ToString(); + user.IsFreezeUser = Convert.ToBoolean(data["IsFreezeUser"].ToString()); list.Add(user); } return list; @@ -841,9 +856,9 @@ public static async System.Threading.Tasks.Task<string> ReadUserList(string doorlockMac) { - string s = null; - var str = await WebClientAsync(0, CommonPage.RequestHttpsHost+"/App/GetHomePager");//涓嶅悓鍖哄煙鍩熷悕鍓嶇紑涓嶄竴鏍� - // var str = await WebClientAsync(0, "https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetHomePager"); + string s = null; + var str = await WebClientAsync(0, CommonPage.RequestHttpsHost + "/App/GetHomePager");//涓嶅悓鍖哄煙鍩熷悕鍓嶇紑涓嶄竴鏍� + // var str = await WebClientAsync(0, "https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetHomePager"); var jObject = JObject.Parse(str); if (jObject == null || jObject["StateCode"].ToString() != "Success") { @@ -886,7 +901,7 @@ } return s; } - + public static async System.Threading.Tasks.Task<string> ReadUserDoorLock(Residential residential) { @@ -922,7 +937,7 @@ if (value == 0) { postValues.Add("RequestVersion", CommonPage.RequestVersion); - postValues.Add("ReqDto.LoginAccessToken", Config.Instance.Token); + postValues.Add("ReqDto.LoginAccessToken", Config.Instance.Token); postValues.Add("ReqDto.PageSetting.PageSize", Int32.MaxValue.ToString());// } @@ -939,7 +954,7 @@ postValues.Add("LoginAccessToken", residential.Token); postValues.Add("HomeId", residential.Id); postValues.Add("DoorLockId", residential.doorlockmac);//闂ㄩ攣Mac - postValues.Add("IsOtherAccountCtrl", residential.IsOtherAccountCtrl.ToString()); + postValues.Add("IsOtherAccountCtrl", residential.IsOtherAccountCtrl.ToString()); postValues.Add("PageSetting.PageSize", Int32.MaxValue.ToString()); } System.Net.WebClient webClient = new System.Net.WebClient(); @@ -972,7 +987,7 @@ public string doorlockmac; } - public class MembershipIfon + public class MembershipIfon { /// <summary> /// 璇嗗埆鐢ㄦ埛韬唤 @@ -990,7 +1005,10 @@ /// 鐢ㄦ埛鏄电О /// </summary> public string UserName = string.Empty; - + /// <summary> + /// 鏄惁鍐荤粨璇ユ垚鍛橈紙true宸插喕缁擄級 + /// </summary> + public bool IsFreezeUser; } @@ -1033,15 +1051,17 @@ /// 闂ㄩ攣Mac+Port,璇嗗埆闂ㄩ攣锛� /// </summary> public string DoorLockMacPort = string.Empty; + /// <summary> + /// 鏄惁鍐荤粨璇ユ垚鍛橈紙true宸插喕缁擄級 + /// </summary> + public bool IsFreezeUser; } - /// <summary> /// 闂ㄩ攣鍒楄〃 /// </summary> public static List<MembershipIfon> LockList = new List<MembershipIfon>(); - /// <summary> /// 褰撳墠闂ㄩ攣 /// </summary> @@ -1051,5 +1071,6 @@ /// </summary> public static UserCenter.MemberInfoRes UserMemberInfoRes = null; #endregion + } } -- Gitblit v1.8.0