using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Crm.Core.External.Domain.Config { public class SystemConfig { public SystemConfig() { } public List Apps { get; set; } public string SsoUrl { get; set; } public string SsoOrganizationUrl { get; set; } public string SsoTokenUrl { get; set; } public string ZxdUrl { get; set; } public string LiveUrl { get; set; } public string LiveRealtimeUrl { get; set; } public string LiveSummaryUrl { get; set; } public string LiveWeworkUsersUrl { get; set; } public string LiveUserStatUrl { get; set; } public string LiveWeworkStatUrl { get; set; } public string LiveCourseSummaryUrl { get; set; } public string WeworkSendUrl { get; set; } public string SalesLeadUrl { get; set; } public string CmsUrl { get; set; } public string CourseUrl { get; set; } public string DeptMentUrl { get; set; } public string BusinessLineUrl { get; set; } public string CustomerProtectionsUrl { get; set; } public string CRMClientKey { get; set; } public string DataSyncApiUrl { get; set; } public string ZxdCrmUrl { get; set; } /// /// 客户端密钥 /// public List? ClientKey { get; set; } public string GetAccessKey(string id) { return ClientKey?.First(x => x.Id == id).AccessKey ?? ""; } public string GetSsoOrganizationUrl() { return $"{SsoUrl}{SsoOrganizationUrl}"; } public string GetSsoTokenUrl() { return $"{SsoUrl}{SsoTokenUrl}"; } public string GetCourseUrl() { return $"{CmsUrl}{CourseUrl}"; } public string GetDeptMentUrl() { return $"{CmsUrl}{DeptMentUrl}"; } public string GetBusinessLineUrl() { return $"{CmsUrl}{BusinessLineUrl}"; } public string GetLiveRealtimeUrl() { return $"{LiveUrl}{LiveRealtimeUrl}"; } public string GetLiveSummaryUrl() { return $"{LiveUrl}{LiveSummaryUrl}"; } public string GetLiveWeworkUsersUrl() { return $"{LiveUrl}{LiveWeworkUsersUrl}"; } public string GetLiveUserStatUrl() { return $"{LiveUrl}{LiveUserStatUrl}"; } public string GetLiveWeworkStatUrl() { return $"{LiveUrl}{LiveWeworkStatUrl}"; } public string GetLiveCourseSummaryUrl() { return $"{LiveUrl}{LiveCourseSummaryUrl}"; } public string GetCustomerProtectionsUrl() { return $"{LiveUrl}{CustomerProtectionsUrl}"; } } public class ClientKey { public string Id { get; set; } public string Name { get; set; } public string AccessKey { get; set; } } public class App { public List? Deptids { get; set; } public string? AppName { get; set; } public string? Appid { get; set; } public string? AppSecret { get; set; } } }