/// <summary> /// 根据条件获取各平台用户对应关系 /// </summary> /// <param name="systemCompanyId">系统公司编号</param> /// <param name="systemType">系统类型</param> /// <param name="platformCompanyId">平台公司编号</param> /// <param name="systemCompanyType">系统公司类型</param> /// <returns></returns> public IList <Model.OpenStructure.MCompanyInfo> GetCompanyList(int systemCompanyId, int systemType, string platformCompanyId, int systemCompanyType) { if (systemType < 1) { return(null); } EyouSoft.OpenRelation.Model.SystemType sysType = (EyouSoft.OpenRelation.Model.SystemType)systemType; if (sysType == EyouSoft.OpenRelation.Model.SystemType.Platform && string.IsNullOrEmpty(platformCompanyId)) { return(null); } if (sysType == EyouSoft.OpenRelation.Model.SystemType.TYT && systemCompanyId < 1) { return(null); } if (sysType == EyouSoft.OpenRelation.Model.SystemType.YYT && systemCompanyId < 1) { return(null); } //根据大平台来查询关系时系统类型将不做为查询条件 if (sysType == EyouSoft.OpenRelation.Model.SystemType.Platform) { systemType = 0; } return(dal.GetCompanyList(systemCompanyId, systemType, platformCompanyId, systemCompanyType)); }
/// <summary> /// 根据条件获取各平台用户对应关系 /// </summary> /// <param name="SystemUserId">系统用户编号,其它系统(非114平台)时赋值</param> /// <param name="SystemType">系统类型</param> /// <param name="PlatformUserId">平台用户编号,大平台(114平台)时赋值</param> /// <returns></returns> public IList <EyouSoft.Model.OpenStructure.MUserInfo> GetMUserList(int SystemUserId, int SystemType, string PlatformUserId) { if (SystemType <= 0) { return(null); } EyouSoft.OpenRelation.Model.SystemType sysType = (EyouSoft.OpenRelation.Model.SystemType)SystemType; if (sysType == EyouSoft.OpenRelation.Model.SystemType.Platform && string.IsNullOrEmpty(PlatformUserId)) { return(null); } if (sysType == EyouSoft.OpenRelation.Model.SystemType.TYT && SystemUserId < 1) { return(null); } if (sysType == EyouSoft.OpenRelation.Model.SystemType.YYT && SystemUserId < 1) { return(null); } //根据大平台来查询关系时系统类型将不做为查询条件 if (sysType == EyouSoft.OpenRelation.Model.SystemType.Platform) { SystemType = 0; } return(dal.GetMUserList(SystemUserId, SystemType, PlatformUserId)); }
/// <summary> /// 获取用户权限所属系统权限 /// </summary> /// <param name="SystemType">所属系统类型</param> /// <param name="SystemUserId">系统用户编号</param> /// <returns></returns> public static string SyncGetUserPermission(EyouSoft.OpenRelation.Model.SystemType SystemType, int SystemUserId) { if (SystemUserId < 1) { return(string.Empty); } EyouSoft.OpenRelation.Model.MResponseInfo response = EyouSoft.OpenRelation.Utils.CreateRequest( new EyouSoft.OpenRelation.Model.MRequestInfo() { AppKey = EyouSoft.OpenRelation.Utils.GetAppKey(), RequestUriString = EyouSoft.OpenRelation.Utils.GetMiddlewareURI(), RequestSystemType = EyouSoft.OpenRelation.Model.SystemType.Platform, InstructionType = EyouSoft.OpenRelation.Model.InstructionType.UserPermission, InstructionCode = EyouSoft.OpenRelation.Utils.ConvertJSON <EyouSoft.OpenRelation.Model.MUserBaseInfo>(new EyouSoft.OpenRelation.Model.MUserBaseInfo() { SystemUserId = SystemUserId, SystemType = SystemType }) }); return(response.InstructionCode); }