/// <summary> /// 获取平台的所有区信息 /// </summary> /// <param name="platfrom"></param> /// <returns></returns> public GetAllZoneListResponse GetAllZoneInfo(string platfrom) { GetAllZoneListResponse response = new GetAllZoneListResponse(); response.Data = new GetAllZoneList(); try { var list = CacheFactory.ZoneCache.GetZoneListByPlatForm(platfrom); List <GetAllZone> resultList = new List <GetAllZone>(); foreach (var item in list) { GetAllZone entity = new GetAllZone(); entity.PlatForm = platfrom; entity.ZoneId = item.PlatformZoneName; entity.ZoneName = item.Name; resultList.Add(entity); } // response.Data.ZoneList = resultList; } catch (Exception ex) { SystemlogMgr.Error("获取所有区", ex); response.Code = (int)MessageCode.NbParameterError; } return(response); }
/// <summary> /// 获取用户登录信息 /// </summary> /// <param name="account"></param> /// <param name="platform"></param> /// <returns></returns> public GetUserLoginRecordResponse GetUserLoginRecord(string account, string platform, string longType = "") { GetUserLoginRecordResponse response = new GetUserLoginRecordResponse(); response.Data = new Entity.Response.GetUserLoginRecord(); try { var userRecord = UserloginZoneMgr.GetByAccountPlatform(account, platform); if (userRecord != null) { response.Data.LoginRecord = userRecord.LoginSties; } List <AllZoneinfoEntity> zonelist = null; if (ShareUtil.IsTx) { zonelist = CacheFactory.ZoneCache.GetWanBaZone(longType); } else if (_aloneZoneList.Contains(platform)) { zonelist = CacheFactory.ZoneCache.GetAllAloneZone(); } else if (_qunheiAnd9G.Contains(platform)) { zonelist = CacheFactory.ZoneCache.GetQunheiAnd9GZone(); } else if (_H5_Egret.Contains(platform)) { zonelist = CacheFactory.ZoneCache.GetEgterZone(); } else if (_h5_Bear.Contains(platform)) { zonelist = CacheFactory.ZoneCache.GetBearZone(); } else { zonelist = CacheFactory.ZoneCache.GetAllMixtureZone(); } if (ShareUtil.IsQunHei) { zonelist = CacheFactory.ZoneCache.GetQunHeiZone(); } List <GetAllZone> resultList = new List <GetAllZone>(); foreach (var item in zonelist) { if (item.States == 5) { if (!_H5_A8Debug.Contains(account)) { continue; } } if (_aloneZoneList.Contains(platform)) //暂时这样处理。后续去掉这限制 { if (item.PlatformZoneName == "1" || item.PlatformZoneName == "2") { if (platform != "h5_1758") { continue; } } } GetAllZone entity = new GetAllZone(); entity.PlatForm = platform; entity.ZoneId = item.PlatformZoneName; entity.ZoneName = item.Name; entity.Maintain = item.Maintain; entity.Host = item.ApiUrl; entity.ZoneStates = item.States; resultList.Add(entity); } response.Data.ZoneList = resultList; } catch (Exception ex) { SystemlogMgr.Error("获取用户登录记录", ex); response.Code = (int)MessageCode.NbParameterError; } return(response); }