/// <summary> /// 生成AppId信息 /// </summary> /// <param name="type">应用类型</param> /// <param name="tenantId"></param> /// <param name="client"></param> /// <returns></returns> public static string GenerateAppId(string tenantId, AppType type, AppClientType client) { var appId = new StringBuilder("app_"); var timespan = NumHelper.TimeMilSecsNum(); if (type == AppType.Proxy) { tenantId = string.Empty; } appId.Append(((long)type).ToCode(_arrCodeStr)).Append("0"); appId.Append(tenantId.ToInt64().ToCode(_arrCodeStr)).Append("0"); appId.Append(((long)client).ToCode(_arrCodeStr)).Append("0"); appId.Append(timespan.ToCode(_arrCodeStr)); return(appId.ToString()); }