| | |
| | | { |
| | | ["Type"] = int.Parse(dictionary["Type"]), |
| | | ["Account"] = dictionary["Account"], |
| | | ["UserId"] = dictionary["UserId"], |
| | | |
| | | }; |
| | | accounts.Add(accounts1); |
| | |
| | | currUserIfon.CloudAccountId = Config.Instance.Guid; |
| | | if (string.IsNullOrEmpty(UserCenter.UserCenterResourse.UserInfo.UserName)) |
| | | { |
| | | ///如果昵称为空,此时,登陆账号为默认昵称; |
| | | currUserIfon.UserName = UserCenter.UserCenterResourse.UserInfo.Account; |
| | | } |
| | | else |
| | |
| | | } |
| | | foreach (var o in AllUserIfon) |
| | | { |
| | | if (o.IsFreezeUser || string.IsNullOrEmpty(o.UserId)) |
| | | { |
| | | ///过滤掉冻结的成员和UserId为空的数据; |
| | | 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; |
| | |
| | | userIfon.CloudAccountId = user.SubAccountDistributedMark; |
| | | if (string.IsNullOrEmpty(user.UserName)) |
| | | { |
| | | ///如果昵称为空,此时,登陆账号为默认昵称; |
| | | userIfon.UserName = user.Account; |
| | | |
| | | } |
| | |
| | | } |
| | | for (int j = 0; j < AllUserIfon.Count; j++) |
| | | { |
| | | if (AllUserIfon[j].IsFreezeUser || string.IsNullOrEmpty(AllUserIfon[j].UserId)) |
| | | { |
| | | ///过滤掉冻结的成员和UserId为空的数据; |
| | | continue; |
| | | } |
| | | if (string.IsNullOrEmpty(userIfon.DoorLockMacPort)) |
| | | { |
| | | userIfon.DoorLockMacPort = AllUserIfon[j].DoorLockMacPort; |
| | |
| | | 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; |
| | |
| | | /// 用户昵称 |
| | | /// </summary> |
| | | public string UserName = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 是否冻结该成员(true已冻结) |
| | | /// </summary> |
| | | public bool IsFreezeUser; |
| | | |
| | | } |
| | | |
| | |
| | | /// 门锁Mac+Port,识别门锁; |
| | | /// </summary> |
| | | public string DoorLockMacPort = string.Empty; |
| | | /// <summary> |
| | | /// 是否冻结该成员(true已冻结) |
| | | /// </summary> |
| | | public bool IsFreezeUser; |
| | | |
| | | } |
| | | |