diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs index f0b13ced2..711079643 100644 --- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs +++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchAuditLogManager.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using Volo.Abp.Auditing; using Volo.Abp.DependencyInjection; +using Volo.Abp.Timing; namespace LINGYUN.Abp.AuditLogging.Elasticsearch { @@ -22,16 +23,19 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch private readonly IIndexNameNormalizer _indexNameNormalizer; private readonly IElasticsearchClientFactory _clientFactory; private readonly IAuditLogInfoToAuditLogConverter _converter; + private readonly IClock _clock; public ILogger Logger { protected get; set; } public ElasticsearchAuditLogManager( + IClock clock, IIndexNameNormalizer indexNameNormalizer, IOptions elasticsearchOptions, IElasticsearchClientFactory clientFactory, IOptions auditingOptions, IAuditLogInfoToAuditLogConverter converter) { + _clock = clock; _converter = converter; _clientFactory = clientFactory; _auditingOptions = auditingOptions.Value; @@ -249,11 +253,11 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch if (startTime.HasValue) { - querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(AuditLog.ExecutionTime))).GreaterThanOrEquals(startTime))); + querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(AuditLog.ExecutionTime))).GreaterThanOrEquals(_clock.Normalize(startTime.Value)))); } if (endTime.HasValue) { - querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(AuditLog.ExecutionTime))).LessThanOrEquals(endTime))); + querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(AuditLog.ExecutionTime))).LessThanOrEquals(_clock.Normalize(endTime.Value)))); } if (!httpMethod.IsNullOrWhiteSpace()) { diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchEntityChangeStore.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchEntityChangeStore.cs index cacef2821..78be1b4a6 100644 --- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchEntityChangeStore.cs +++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchEntityChangeStore.cs @@ -10,6 +10,7 @@ using System.Threading; using System.Threading.Tasks; using Volo.Abp.Auditing; using Volo.Abp.DependencyInjection; +using Volo.Abp.Timing; namespace LINGYUN.Abp.AuditLogging.Elasticsearch; @@ -19,14 +20,17 @@ public class ElasticsearchEntityChangeStore : IEntityChangeStore, ITransientDepe private readonly AbpElasticsearchOptions _elasticsearchOptions; private readonly IIndexNameNormalizer _indexNameNormalizer; private readonly IElasticsearchClientFactory _clientFactory; + private readonly IClock _clock; public ILogger Logger { protected get; set; } public ElasticsearchEntityChangeStore( + IClock clock, IIndexNameNormalizer indexNameNormalizer, IElasticsearchClientFactory clientFactory, IOptions elasticsearchOptions) { + _clock = clock; _clientFactory = clientFactory; _indexNameNormalizer = indexNameNormalizer; _elasticsearchOptions = elasticsearchOptions.Value; @@ -323,11 +327,11 @@ public class ElasticsearchEntityChangeStore : IEntityChangeStore, ITransientDepe } if (startTime.HasValue) { - querys.Add(entity => entity.DateRange(q => q.Field(GetField(nameof(EntityChange.ChangeTime))).GreaterThanOrEquals(startTime))); + querys.Add(entity => entity.DateRange(q => q.Field(GetField(nameof(EntityChange.ChangeTime))).GreaterThanOrEquals(_clock.Normalize(startTime.Value)))); } if (endTime.HasValue) { - querys.Add(entity => entity.DateRange(q => q.Field(GetField(nameof(EntityChange.ChangeTime))).LessThanOrEquals(endTime))); + querys.Add(entity => entity.DateRange(q => q.Field(GetField(nameof(EntityChange.ChangeTime))).LessThanOrEquals(_clock.Normalize(endTime.Value)))); } if (changeType.HasValue) { diff --git a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs index 6f1157af9..a6cc31c3d 100644 --- a/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs +++ b/aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.Elasticsearch/LINGYUN/Abp/AuditLogging/Elasticsearch/ElasticsearchSecurityLogManager.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Volo.Abp.DependencyInjection; using Volo.Abp.Guids; using Volo.Abp.SecurityLog; +using Volo.Abp.Timing; namespace LINGYUN.Abp.AuditLogging.Elasticsearch { @@ -22,16 +23,19 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch private readonly IIndexNameNormalizer _indexNameNormalizer; private readonly IGuidGenerator _guidGenerator; private readonly IElasticsearchClientFactory _clientFactory; + private readonly IClock _clock; public ILogger Logger { protected get; set; } public ElasticsearchSecurityLogManager( + IClock clock, IGuidGenerator guidGenerator, IIndexNameNormalizer indexNameNormalizer, IOptions securityLogOptions, IOptions elasticsearchOptions, IElasticsearchClientFactory clientFactory) { + _clock = clock; _guidGenerator = guidGenerator; _clientFactory = clientFactory; _indexNameNormalizer = indexNameNormalizer; @@ -192,11 +196,11 @@ namespace LINGYUN.Abp.AuditLogging.Elasticsearch if (startTime.HasValue) { - querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SecurityLog.CreationTime))).GreaterThanOrEquals(startTime))); + querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SecurityLog.CreationTime))).GreaterThanOrEquals(_clock.Normalize(startTime.Value)))); } if (endTime.HasValue) { - querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SecurityLog.CreationTime))).LessThanOrEquals(endTime))); + querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SecurityLog.CreationTime))).LessThanOrEquals(_clock.Normalize(endTime.Value)))); } if (!applicationName.IsNullOrWhiteSpace()) { diff --git a/aspnet-core/framework/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthOptions.cs b/aspnet-core/framework/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthOptions.cs index 93f7af625..c06f278ba 100644 --- a/aspnet-core/framework/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthOptions.cs +++ b/aspnet-core/framework/authentication/LINGYUN.Abp.Authentication.WeChat/Microsoft/AspNetCore/Authentication/WeChat/Official/WeChatOfficialOAuthOptions.cs @@ -1,5 +1,5 @@ using LINGYUN.Abp.Authentication.WeChat; -using LINGYUN.Abp.WeChat.Security.Claims; +using LINGYUN.Abp.WeChat.Common.Security.Claims; using Microsoft.AspNetCore.Authentication.OAuth; using Microsoft.AspNetCore.Http; using System.Security.Claims; diff --git a/aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs b/aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs index e0647268d..7ae475dc5 100644 --- a/aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs +++ b/aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs @@ -14,14 +14,16 @@ using System.Threading.Tasks; using Volo.Abp.DependencyInjection; using Volo.Abp.MultiTenancy; using Volo.Abp.ObjectMapping; +using Volo.Abp.Timing; namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch { [Dependency(ReplaceServices = true)] public class SerilogElasticsearchLoggingManager : ILoggingManager, ISingletonDependency { - private static readonly Regex IndexFormatRegex = new Regex(@"^(.*)(?:\{0\:.+\})(.*)$"); + private readonly static Regex IndexFormatRegex = new Regex(@"^(.*)(?:\{0\:.+\})(.*)$"); + private readonly IClock _clock; private readonly IObjectMapper _objectMapper; private readonly ICurrentTenant _currentTenant; private readonly AbpLoggingSerilogElasticsearchOptions _options; @@ -30,11 +32,13 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch public ILogger Logger { protected get; set; } public SerilogElasticsearchLoggingManager( + IClock clock, IObjectMapper objectMapper, ICurrentTenant currentTenant, IOptions options, IElasticsearchClientFactory clientFactory) { + _clock = clock; _objectMapper = objectMapper; _currentTenant = currentTenant; _clientFactory = clientFactory; @@ -281,11 +285,11 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch } if (startTime.HasValue) { - querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SerilogInfo.TimeStamp))).GreaterThanOrEquals(startTime))); + querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SerilogInfo.TimeStamp))).GreaterThanOrEquals(_clock.Normalize(startTime.Value)))); } if (endTime.HasValue) { - querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SerilogInfo.TimeStamp))).LessThanOrEquals(endTime))); + querys.Add((log) => log.DateRange((q) => q.Field(GetField(nameof(SerilogInfo.TimeStamp))).LessThanOrEquals(_clock.Normalize(endTime.Value)))); } if (level.HasValue) { diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Common/FodyWeavers.xml b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Common/FodyWeavers.xml index 00e1d9a1c..1715698cc 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Common/FodyWeavers.xml +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Common/FodyWeavers.xml @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/FodyWeavers.xml b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/FodyWeavers.xml new file mode 100644 index 000000000..1715698cc --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/FodyWeavers.xsd b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/FodyWeavers.xsd new file mode 100644 index 000000000..3f3946e28 --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/AbpWeChatWorkCommonModule.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/AbpWeChatWorkCommonModule.cs index e0bea9a15..6e2d64ae6 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/AbpWeChatWorkCommonModule.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/AbpWeChatWorkCommonModule.cs @@ -2,8 +2,7 @@ using LINGYUN.Abp.WeChat.Common.Messages; using LINGYUN.Abp.WeChat.Work.Common.Messages; using LINGYUN.Abp.WeChat.Work.Common.Messages.Models; -using System; -using System.Xml.Serialization; +using System.Collections.Generic; using Volo.Abp.Modularity; namespace LINGYUN.Abp.WeChat.Work.Common; @@ -16,10 +15,10 @@ public class AbpWeChatWorkCommonModule : AbpModule { Configure(options => { - options.MapEvent("click", context => context.GetWeChatMessage()); - options.MapEvent("view", context => context.GetWeChatMessage()); + options.MapEvent("click", context => context.GetWeChatMessage()); + options.MapEvent("view", context => context.GetWeChatMessage()); options.MapEvent("scancode_push", context => context.GetWeChatMessage()); - options.MapEvent("scancode_waitmsg", context => context.GetWeChatMessage()); + options.MapEvent("scancode_waitmsg", context => context.GetWeChatMessage()); options.MapEvent("pic_sysphoto", context => context.GetWeChatMessage()); options.MapEvent("pic_photo_or_album", context => context.GetWeChatMessage()); options.MapEvent("pic_weixin", context => context.GetWeChatMessage()); @@ -27,20 +26,28 @@ public class AbpWeChatWorkCommonModule : AbpModule options.MapEvent("unsubscribe", context => context.GetWeChatMessage()); options.MapEvent("enter_agent", context => context.GetWeChatMessage()); options.MapEvent("LOCATION", context => context.GetWeChatMessage()); + options.MapEvent("location_select", context => context.GetWeChatMessage()); options.MapEvent("batch_job_result", context => context.GetWeChatMessage()); + options.MapEvent("open_approval_change", context => context.GetWeChatMessage()); + options.MapEvent("share_agent_change", context => context.GetWeChatMessage()); + options.MapEvent("share_chain_change", context => context.GetWeChatMessage()); + options.MapEvent("template_card_event", context => context.GetWeChatMessage()); + options.MapEvent("template_card_menu_event", context => context.GetWeChatMessage()); + options.MapEvent("close_inactive_agent", context => context.GetWeChatMessage()); + options.MapEvent("reopen_inactive_agent", context => context.GetWeChatMessage()); options.MapEvent("change_contact", context => { - static UserChangeEvent CreateUserChangeEvent(string originXml) where TEvent : UserChangeEvent - { - var events = new XmlDeserializationEvents(); - return originXml.DeserializeWeChatMessage(events); - } + //static UserChangeEvent CreateUserChangeEvent(string originXml) where TEvent : UserChangeEvent + //{ + // var events = new XmlDeserializationEvents(); + // return originXml.DeserializeWeChatMessage(events); + //} var changeType = context.GetMessageData("ChangeType"); return changeType switch { - "create_user" => CreateUserChangeEvent(context.Origin), - "update_user" => CreateUserChangeEvent(context.Origin), + "create_user" => context.GetWeChatMessage(), + "update_user" => context.GetWeChatMessage(), "delete_user" => context.GetWeChatMessage(), "create_party" => context.GetWeChatMessage(), "update_party" => context.GetWeChatMessage(), @@ -58,5 +65,13 @@ public class AbpWeChatWorkCommonModule : AbpModule options.MapMessage("location", context => context.GetWeChatMessage()); options.MapMessage("link", context => context.GetWeChatMessage()); }); + + Configure(options => + { + // 事件处理器 + options.MessageResolvers.AddIfNotContains(new WeChatWorkEventResolveContributor()); + // 消息处理器 + options.MessageResolvers.AddIfNotContains(new WeChatWorkMessageResolveContributor()); + }); } } diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Handlers/WeChatWorkEventEventHandler.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Handlers/WeChatWorkEventEventHandler.cs new file mode 100644 index 000000000..dc014b30e --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Handlers/WeChatWorkEventEventHandler.cs @@ -0,0 +1,179 @@ +using LINGYUN.Abp.WeChat.Common.Messages.Handlers; +using LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus.Distributed; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Handlers; +public class WeChatWorkEventEventHandler : + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + ITransientDependency +{ + private readonly IMessageHandler _messageHandler; + + public WeChatWorkEventEventHandler(IMessageHandler messageHandler) + { + _messageHandler = messageHandler; + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } + + public async virtual Task HandleEventAsync(WeChatWorkEventMessageEto eventData) + { + await _messageHandler.HandleEventAsync(eventData.Event); + } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Handlers/WeChatWorkMessageEventHandler.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Handlers/WeChatWorkMessageEventHandler.cs new file mode 100644 index 000000000..d754692ee --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Handlers/WeChatWorkMessageEventHandler.cs @@ -0,0 +1,53 @@ +using LINGYUN.Abp.WeChat.Common.Messages.Handlers; +using LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus.Distributed; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Handlers; +public class WeChatWorkMessageEventHandler : + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + IDistributedEventHandler>, + ITransientDependency +{ + private readonly IMessageHandler _messageHandler; + + public WeChatWorkMessageEventHandler(IMessageHandler messageHandler) + { + _messageHandler = messageHandler; + } + + public async virtual Task HandleEventAsync(WeChatWorkGeneralMessageEto eventData) + { + await _messageHandler.HandleMessageAsync(eventData.Message); + } + + public async virtual Task HandleEventAsync(WeChatWorkGeneralMessageEto eventData) + { + await _messageHandler.HandleMessageAsync(eventData.Message); + } + + public async virtual Task HandleEventAsync(WeChatWorkGeneralMessageEto eventData) + { + await _messageHandler.HandleMessageAsync(eventData.Message); + } + + public async virtual Task HandleEventAsync(WeChatWorkGeneralMessageEto eventData) + { + await _messageHandler.HandleMessageAsync(eventData.Message); + } + + public async virtual Task HandleEventAsync(WeChatWorkGeneralMessageEto eventData) + { + await _messageHandler.HandleMessageAsync(eventData.Message); + } + + public async virtual Task HandleEventAsync(WeChatWorkGeneralMessageEto eventData) + { + await _messageHandler.HandleMessageAsync(eventData.Message); + } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ApprovalStatusChangeEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ApprovalStatusChangeEvent.cs new file mode 100644 index 000000000..6998e86f9 --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ApprovalStatusChangeEvent.cs @@ -0,0 +1,195 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using System.Collections.Generic; +using System.Xml.Serialization; +using Volo.Abp.EventBus; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +/// +/// 审批状态通知事件 +/// +[EventName("open_approval_change")] +public class ApprovalStatusChangeEvent : WeChatWorkEventMessage +{ + /// + /// 事件KEY值 + /// + [XmlElement("EventKey")] + public string EventKey { get; set; } + /// + /// 审批信息 + /// + [XmlElement("ApprovalInfo")] + public ApprovalInfo ApprovalInfo { get; set; } + public override WeChatMessageEto ToEto() + { + return new WeChatWorkEventMessageEto(this); + } +} + +public class ApprovalInfo +{ + /// + /// 审批单编号,由开发者在发起申请时自定义 + /// + [XmlElement("ThirdNo")] + public string ThirdNo { get; set; } + /// + /// 审批模板名称 + /// + [XmlElement("OpenSpName")] + public string OpenSpName { get; set; } + /// + /// 审批模板id + /// + [XmlElement("OpenTemplateId")] + public string OpenTemplateId { get; set; } + /// + /// 申请单当前审批状态: + /// 1-审批中; + /// 2-已通过; + /// 3-已驳回; + /// 4-已取消 + /// + [XmlElement("OpenSpStatus")] + public byte OpenSpStatus { get; set; } + /// + /// 提交申请时间 + /// + [XmlElement("ApplyTime")] + public int ApplyTime { get; set; } + /// + /// 提交者姓名 + /// + [XmlElement("ApplyUserName")] + public string ApplyUserName { get; set; } + /// + /// 提交者userid + /// + [XmlElement("ApplyUserId")] + public string ApplyUserId { get; set; } + /// + /// 提交者所在部门 + /// + [XmlElement("ApplyUserParty")] + public string ApplyUserParty { get; set; } + /// + /// 提交者头像 + /// + [XmlElement("ApplyUserImage")] + public string ApplyUserImage { get; set; } + /// + /// 审批流程信息 + /// + [XmlElement("ApprovalNodes")] + public List ApprovalNodes { get; set; } + /// + /// 抄送信息,可能有多个抄送人 + /// + [XmlElement("NotifyNodes")] + public List NotifyNodes { get; set; } + /// + /// 当前审批节点:0-第一个审批节点;1-第二个审批节点…以此类推 + /// + [XmlElement("approverstep")] + public int ApproverStep { get; set; } +} + +/// +/// 审批流程信息,可以有多个审批节点 +/// +[XmlRoot("ApprovalNode")] +public class ApprovalNode +{ + /// + /// 节点审批操作状态: + /// 1-审批中; + /// 2-已同意; + /// 3-已驳回; + /// 4-已转审 + /// + [XmlElement("NodeStatus")] + public byte NodeStatus { get; set; } + /// + /// 审批节点属性: + /// 1-或签; + /// 2-会签 + /// + [XmlElement("NodeAttr")] + public byte NodeAttr { get; set; } + /// + /// 审批节点类型: + /// 1-固定成员; + /// 2-标签; + /// 3-上级 + /// + [XmlElement("NodeType")] + public byte NodeType { get; set; } + /// + /// 审批节点信息,当节点为标签或上级时,一个节点可能有多个分支 + /// + [XmlElement("Items")] + public List Items { get; set; } +} +/// +/// 审批节点分支,当节点为标签或上级时,一个节点可能有多个分支 +/// +[XmlRoot("Item")] +public class ApprovalNodeItem +{ + /// + /// 分支审批人姓名 + /// + [XmlElement("ItemName")] + public string ItemName { get; set; } + /// + /// 分支审批人userid + /// + [XmlElement("ItemUserId")] + public string ItemUserId { get; set; } + /// + /// 分支审批人头像 + /// + [XmlElement("ItemImage")] + public string ItemImage { get; set; } + /// + /// 分支审批审批操作状态: + /// 1-审批中; + /// 2-已同意; + /// 3-已驳回; + /// 4-已转审 + /// + [XmlElement("ItemStatus")] + public byte ItemStatus { get; set; } + /// + /// 分支审批人审批意见 + /// + [XmlElement("ItemSpeech")] + public string ItemSpeech { get; set; } + /// + /// 分支审批人审批意见 + /// + [XmlElement("ItemOpTime")] + public int ItemOpTime { get; set; } +} +/// +/// 抄送人信息 +/// +[XmlRoot("NotifyNode")] +public class NotifyNode +{ + /// + /// 抄送人姓名 + /// + [XmlElement("ItemName")] + public string ItemName { get; set; } + /// + /// 抄送人userid + /// + [XmlElement("ItemUserId")] + public string ItemUserId { get; set; } + /// + /// 抄送人头像 + /// + [XmlElement("ItemImage")] + public string ItemImage { get; set; } +} \ No newline at end of file diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/CloseInActiveAgentEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/CloseInActiveAgentEvent.cs new file mode 100644 index 000000000..0173e32ef --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/CloseInActiveAgentEvent.cs @@ -0,0 +1,15 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using Volo.Abp.EventBus; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +/// +/// 长期未使用应用临时停用事件 +/// +[EventName("close_inactive_agent")] +public class CloseInActiveAgentEvent : WeChatWorkEventMessage +{ + public override WeChatMessageEto ToEto() + { + return new WeChatWorkEventMessageEto(this); + } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/CustomMenuEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/CustomMenuPushEvent.cs similarity index 69% rename from aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/CustomMenuEvent.cs rename to aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/CustomMenuPushEvent.cs index fb9aa9b82..3814bb950 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/CustomMenuEvent.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/CustomMenuPushEvent.cs @@ -4,10 +4,10 @@ using Volo.Abp.EventBus; namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; /// -/// 自定义菜单事件 +/// 点击菜单拉取消息的事件推送 /// [EventName("custom_menu")] -public class CustomMenuEvent : WeChatWorkEventMessage +public class CustomMenuPushEvent : WeChatWorkEventMessage { /// /// 事件KEY值 @@ -17,6 +17,6 @@ public class CustomMenuEvent : WeChatWorkEventMessage public override WeChatMessageEto ToEto() { - return new WeChatWorkEventMessageEto(this); + return new WeChatWorkEventMessageEto(this); } } diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/GeoLocationSelectPushEevent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/GeoLocationSelectPushEevent.cs new file mode 100644 index 000000000..b95345bab --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/GeoLocationSelectPushEevent.cs @@ -0,0 +1,61 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using System.Xml.Serialization; +using Volo.Abp.EventBus; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +/// +/// 弹出地理位置选择器的事件推送 +/// +[EventName("location_select")] +public class GeoLocationSelectPushEevent : WeChatWorkEventMessage +{ + /// + /// 事件KEY值 + /// + [XmlElement("EventKey")] + public string EventKey { get; set; } + /// + /// 发送的位置信息 + /// + [XmlElement("SendLocationInfo")] + public LocationInfo SendLocationInfo { get; set; } + /// + /// app类型,在企业微信固定返回wxwork,在微信不返回该字段 + /// + [XmlElement("AppType")] + public string AppType { get; set; } + + public override WeChatMessageEto ToEto() + { + return new WeChatWorkEventMessageEto(this); + } +} + +public class LocationInfo +{ + /// + /// 地理位置纬度 + /// + [XmlElement("Location_X")] + public double Latitude { get; set; } + /// + /// 地理位置经度 + /// + [XmlElement("Location_Y")] + public double Longitude { get; set; } + /// + /// 地图缩放大小 + /// + [XmlElement("Scale")] + public double Scale { get; set; } + /// + /// 地理位置信息 + /// + [XmlElement("Label")] + public string Label { get; set; } + /// + /// POI的名字,可能为空 + /// + [XmlElement("Poiname")] + public string PoiName { get; set; } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MemberExtendAttribute.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MemberExtendAttribute.cs index 087516069..e2e52d7e3 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MemberExtendAttribute.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MemberExtendAttribute.cs @@ -1,29 +1,47 @@ -using System.Xml.Serialization; +using System.Collections.Generic; +using System.Xml.Serialization; namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; + [XmlRoot("Item")] public class MemberExtendAttribute { /// - /// 扩展属性类型: 0-本文 1-网页 - /// - [XmlElement("Type")] - public byte Type { get; set; } - /// - /// 扩展属性类型: 0-本文 1-网页 + /// 扩展属性 /// - public MemberExtend Extend { get; set; } + [XmlElement("Item")] + public List Items { get;set; } } -public abstract class MemberExtend +public class MemberExtend { + /// + /// 扩展属性类型: 0-文本 1-网页 + /// + [XmlElement("Type")] + public byte Type { get; set; } + /// + /// 扩展属性名称 + /// + [XmlElement("Name")] + public string Name { get; set; } + /// + /// 文本属性内容 + /// + [XmlElement("Text", IsNullable = true)] + public MemberTextExtend Text { get; set; } + /// + /// Web属性内容 + /// + [XmlElement("Web", IsNullable = true)] + public MemberWebExtend Web { get; set; } } /// /// 文本属性类型,扩展属性类型为0时填写 /// [XmlRoot("Text")] -public class MemberTextExtend : MemberExtend +public class MemberTextExtend { /// /// 文本属性内容 @@ -35,7 +53,7 @@ public class MemberTextExtend : MemberExtend /// 网页类型属性,扩展属性类型为1时填写 /// [XmlRoot("Web")] -public class MemberWebExtend : MemberExtend +public class MemberWebExtend { /// /// 网页的展示标题 diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MenuClickJumpLinkEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MenuClickJumpLinkPushEvent.cs similarity index 76% rename from aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MenuClickJumpLinkEvent.cs rename to aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MenuClickJumpLinkPushEvent.cs index 310feb627..66b2b1768 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MenuClickJumpLinkEvent.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/MenuClickJumpLinkPushEvent.cs @@ -7,7 +7,7 @@ namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; /// 点击菜单跳转链接时的事件推送 /// [EventName("menu_click_jump_link")] -public class MenuClickJumpLinkEvent : WeChatWorkEventMessage +public class MenuClickJumpLinkPushEvent : WeChatWorkEventMessage { /// /// 事件KEY值 @@ -16,6 +16,6 @@ public class MenuClickJumpLinkEvent : WeChatWorkEventMessage public string EventKey { get; set; } public override WeChatMessageEto ToEto() { - return new WeChatWorkEventMessageEto(this); + return new WeChatWorkEventMessageEto(this); } } diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ReOpenInActiveAgentEevent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ReOpenInActiveAgentEevent.cs new file mode 100644 index 000000000..361c33707 --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ReOpenInActiveAgentEevent.cs @@ -0,0 +1,15 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using Volo.Abp.EventBus; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +/// +/// 长期未使用应用重新启用事件 +/// +[EventName("reopen_inactive_agent")] +public class ReOpenInActiveAgentEevent : WeChatWorkEventMessage +{ + public override WeChatMessageEto ToEto() + { + return new WeChatWorkEventMessageEto(this); + } +} \ No newline at end of file diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodePushEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodePushEvent.cs index 9f89f0617..74abe2f12 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodePushEvent.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodePushEvent.cs @@ -3,7 +3,7 @@ using Volo.Abp.EventBus; namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; /// -/// 自定义菜单事件 +/// 扫码推事件的事件推送 /// [EventName("scancode_push")] public class ScanCodePushEvent : ScanCodeEvent diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodeWaitMsgEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodeWaitMsgPushEvent.cs similarity index 54% rename from aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodeWaitMsgEvent.cs rename to aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodeWaitMsgPushEvent.cs index e0cf6d723..99ef671f9 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodeWaitMsgEvent.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ScanCodeWaitMsgPushEvent.cs @@ -3,13 +3,13 @@ using Volo.Abp.EventBus; namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; /// -/// 自定义菜单事件 +/// 扫码推事件且弹出“消息接收中”提示框的事件推送 /// [EventName("scancode_waitmsg")] -public class ScanCodeWaitMsgEvent : ScanCodeEvent +public class ScanCodeWaitMsgPushEvent : ScanCodeEvent { public override WeChatMessageEto ToEto() { - return new WeChatWorkEventMessageEto(this); + return new WeChatWorkEventMessageEto(this); } } diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ShareAgentChangeEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ShareAgentChangeEvent.cs new file mode 100644 index 000000000..d976c2610 --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ShareAgentChangeEvent.cs @@ -0,0 +1,20 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using Volo.Abp.EventBus; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +/// +/// 企业互联共享应用事件 +/// +/// +/// 本事件触发时机为: +/// 1. 上级企业把自建应用共享给下级企业使用 +/// 2. 上级企业把下级企业从共享应用中移除 +/// +[EventName("share_agent_change")] +public class ShareAgentChangeEvent : WeChatWorkEventMessage +{ + public override WeChatMessageEto ToEto() + { + return new WeChatWorkEventMessageEto(this); + } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ShareChainChangeEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ShareChainChangeEvent.cs new file mode 100644 index 000000000..489b3afea --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/ShareChainChangeEvent.cs @@ -0,0 +1,20 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using Volo.Abp.EventBus; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +/// +/// 上下游共享应用事件 +/// +/// +/// 本事件触发时机为: +/// 1. 上游企业把自建应用共享给下游企业使用 +/// 2. 上游企业把下游企业从共享应用中移除 +/// +[EventName("share_chain_change")] +public class ShareChainChangeEvent : WeChatWorkEventMessage +{ + public override WeChatMessageEto ToEto() + { + return new WeChatWorkEventMessageEto(this); + } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/TemplateCardMenuPushEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/TemplateCardMenuPushEvent.cs new file mode 100644 index 000000000..8d615e3ab --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/TemplateCardMenuPushEvent.cs @@ -0,0 +1,41 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using System.Xml.Serialization; +using Volo.Abp.EventBus; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +/// +/// 通用模板卡片右上角菜单事件推送 +/// +[EventName("template_card_menu_event")] +public class TemplateCardMenuPushEvent : WeChatWorkEventMessage +{ + /// + /// 与发送模板卡片消息时指定的task_id相同 + /// + [XmlElement("TaskId")] + public string TaskId { get; set; } + /// + /// 通用模板卡片的类型, + /// 类型有 + /// "text_notice", + /// "news_notice", + /// "button_interaction" + /// 三种 + /// + [XmlElement("CardType")] + public string CardType { get; set; } + /// + /// 用于调用更新卡片接口的ResponseCode + /// + [XmlElement("ResponseCode")] + public string ResponseCode { get; set; } + /// + /// 与发送模板卡片右上角菜单的按钮key值相同 + /// + [XmlElement("EventKey")] + public string EventKey { get; set; } + public override WeChatMessageEto ToEto() + { + return new WeChatWorkEventMessageEto(this); + } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/TemplateCardPushEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/TemplateCardPushEvent.cs new file mode 100644 index 000000000..d12a93c1d --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/TemplateCardPushEvent.cs @@ -0,0 +1,80 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using System.Collections.Generic; +using System.Xml.Serialization; +using Volo.Abp.EventBus; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; +/// +/// 模板卡片事件推送 +/// +[EventName("template_card_event")] +public class TemplateCardPushEvent : WeChatWorkEventMessage +{ + /// + /// 与发送模板卡片消息时指定的task_id相同 + /// + [XmlElement("TaskId")] + public string TaskId { get; set; } + /// + /// 通用模板卡片的类型,类型有 + /// "text_notice", + /// "news_notice", + /// "button_interaction", + /// "vote_interaction", + /// "multiple_interaction" + /// 五种 + /// + [XmlElement("CardType")] + public string CardType { get; set; } + /// + /// 用于调用更新卡片接口的ResponseCode,72小时内有效,且只能使用一次 + /// + [XmlElement("ResponseCode")] + public string ResponseCode { get; set; } + /// + /// 与发送模板卡片消息时指定的按钮btn:key值相同 + /// + [XmlElement("EventKey")] + public string EventKey { get; set; } + /// + /// 事件KEY值 + /// + [XmlElement("SelectedItems")] + public TemplateCardQuestionInfo QuestionInfo { get; set; } + public override WeChatMessageEto ToEto() + { + return new WeChatWorkEventMessageEto(this); + } +} + +public class TemplateCardQuestionInfo +{ + /// + /// 事件KEY值 + /// + [XmlElement("SelectedItem")] + public List Items { get; set; } +} + +public class TemplateCardQuestion +{ + /// + /// 问题的key值 + /// + [XmlElement("QuestionKey")] + public string QuestionKey { get; set; } + /// + /// 问题的key值 + /// + [XmlArray("OptionIds")] + public List OptionIds { get; set; } +} + +public class TemplateCardQuestionOption +{ + /// + /// 问题的key值 + /// + [XmlElement("OpitonId")] + public List Items { get; set; } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/UserChangeEvent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/UserChangeEvent.cs index 48c2d95be..a3135f7a1 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/UserChangeEvent.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/Models/UserChangeEvent.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System.Xml.Serialization; +using System.Xml.Serialization; namespace LINGYUN.Abp.WeChat.Work.Common.Messages.Models; /// @@ -144,5 +143,5 @@ public abstract class UserChangeEvent : WeChatWorkEventMessage /// 上游共享的应用不返回该字段 /// [XmlArray("ExtAttr")] - public List Extend { get; set; } + public MemberExtendAttribute ExtendAttribute { get; set; } } diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkEventMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkEventMessage.cs index 8760cc30e..d1904b73e 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkEventMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkEventMessage.cs @@ -5,13 +5,8 @@ namespace LINGYUN.Abp.WeChat.Work.Common.Messages; /// /// 企业微信事件消息 /// -public abstract class WeChatWorkEventMessage : WeChatMessage +public abstract class WeChatWorkEventMessage : WeChatEventMessage { - /// - /// 事件类型 - /// - [XmlElement("Event")] - public string Event { get; set; } /// /// 企业应用的id,整型。可在应用的设置页面查看 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkEventResolveContributor.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkEventResolveContributor.cs new file mode 100644 index 000000000..b2974c092 --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkEventResolveContributor.cs @@ -0,0 +1,29 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using System; +using System.Threading.Tasks; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages; +/// +/// 微信公众号事件处理器 +/// +public class WeChatWorkEventResolveContributor : WeChatWorkMessageResolveContributorBase +{ + public override string Name => "WeChat.Work.Event"; + + protected override Task ResolveWeComMessageAsync(IMessageResolveContext context) + { + var options = context.ServiceProvider.GetRequiredService>().Value; + var messageType = context.GetMessageData("MsgType"); + var eventName = context.GetMessageData("Event"); + if ("event".Equals(messageType, StringComparison.InvariantCultureIgnoreCase) && + !eventName.IsNullOrWhiteSpace() && + options.EventMaps.TryGetValue(eventName, out var eventFactory)) + { + context.Message = eventFactory(context); + context.Handled = true; + } + return Task.CompletedTask; + } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkMessageResolveContributor.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkMessageResolveContributor.cs new file mode 100644 index 000000000..acf5ec6df --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkMessageResolveContributor.cs @@ -0,0 +1,25 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using System.Threading.Tasks; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages; +/// +/// 微信公众号消息处理器 +/// +public class WeChatWorkMessageResolveContributor : WeChatWorkMessageResolveContributorBase +{ + public override string Name => "WeChat.Work.Message"; + + protected override Task ResolveWeComMessageAsync(IMessageResolveContext context) + { + var options = context.ServiceProvider.GetRequiredService>().Value; + var messageType = context.GetMessageData("MsgType"); + if (options.MessageMaps.TryGetValue(messageType, out var messageFactory)) + { + context.Message = messageFactory(context); + context.Handled = true; + } + return Task.CompletedTask; + } +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkMessageResolveContributorBase.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkMessageResolveContributorBase.cs new file mode 100644 index 000000000..7d503ba01 --- /dev/null +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work.Common/LINGYUN/Abp/WeChat/Work/Common/Messages/WeChatWorkMessageResolveContributorBase.cs @@ -0,0 +1,19 @@ +using LINGYUN.Abp.WeChat.Common.Messages; +using System.Threading.Tasks; + +namespace LINGYUN.Abp.WeChat.Work.Common.Messages; +public abstract class WeChatWorkMessageResolveContributorBase : MessageResolveContributorBase +{ + public override Task ResolveAsync(IMessageResolveContext context) + { + // 企业微信消息需要企业标识字段 + if (context.HasMessageKey("AgentID")) + { + return ResolveWeComMessageAsync(context); + } + + return Task.CompletedTask; + } + + protected abstract Task ResolveWeComMessageAsync(IMessageResolveContext context); +} diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN.Abp.WeChat.Work.csproj b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN.Abp.WeChat.Work.csproj index f1a173153..cfceb8660 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN.Abp.WeChat.Work.csproj +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN.Abp.WeChat.Work.csproj @@ -23,7 +23,7 @@ - + diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/AbpWeChatWorkModule.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/AbpWeChatWorkModule.cs index 2ba94b9ee..bdf880dc1 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/AbpWeChatWorkModule.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/AbpWeChatWorkModule.cs @@ -1,6 +1,6 @@ using LINGYUN.Abp.Features.LimitValidation; -using LINGYUN.Abp.WeChat.Common; using LINGYUN.Abp.WeChat.Common.Localization; +using LINGYUN.Abp.WeChat.Work.Common; using LINGYUN.Abp.WeChat.Work.Localization; using Microsoft.Extensions.DependencyInjection; using System; @@ -19,7 +19,7 @@ namespace LINGYUN.Abp.WeChat.Work; typeof(AbpExceptionHandlingModule), typeof(AbpFeaturesLimitValidationModule), typeof(AbpSettingsModule), - typeof(AbpWeChatCommonModule))] + typeof(AbpWeChatWorkCommonModule))] public class AbpWeChatWorkModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/IWeChatWorkMessageSender.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/IWeChatWorkMessageSender.cs index db393d368..174de9d63 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/IWeChatWorkMessageSender.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/IWeChatWorkMessageSender.cs @@ -1,4 +1,4 @@ -using LINGYUN.Abp.WeChat.Work.Message.Response; +using LINGYUN.Abp.WeChat.Work.Messages.Response; using System.Threading; using System.Threading.Tasks; diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MarkdownMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MarkdownMessage.cs index 8bca936fa..29b8cab77 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MarkdownMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MarkdownMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// markdown消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MediaMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MediaMessage.cs index 21356887b..97e6254c1 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MediaMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MediaMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 媒体文件消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MiniProgramMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MiniProgramMessage.cs index be27bb7be..d2c5622f5 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MiniProgramMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MiniProgramMessage.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; using System.Collections.Generic; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 小程序通知消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MpNewMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MpNewMessage.cs index ac619a940..165f1e7d4 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MpNewMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/MpNewMessage.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; using System.Collections.Generic; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 图文消息(mp)载体 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/NewMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/NewMessage.cs index 8c6d5f451..43a528ecc 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/NewMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/NewMessage.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; using System.Collections.Generic; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 图文消息载体 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/TextCardMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/TextCardMessage.cs index 5f7dc231c..28e22e09b 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/TextCardMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/TextCardMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 文本卡片消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/TextMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/TextMessage.cs index 12b22bfae..fb308af8a 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/TextMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/TextMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 文本消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/VideoMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/VideoMessage.cs index 7e2ff5902..1150e052d 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/VideoMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/VideoMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 视频消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatFileMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatFileMessage.cs index 6dc29c8de..b521fa1ff 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatFileMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatFileMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信群聊文件消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatImageMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatImageMessage.cs index 11f309264..750b1d1ae 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatImageMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatImageMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信群聊图片消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatMarkdownMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatMarkdownMessage.cs index 9a39078e3..3c1e5b535 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatMarkdownMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatMarkdownMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信群聊markdown消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatMpNewMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatMpNewMessage.cs index 0e2a9e327..0339e688b 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatMpNewMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatMpNewMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信群聊文本图文消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatNewMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatNewMessage.cs index bf5747873..21cc90a33 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatNewMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatNewMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信群聊文本图文消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatTextCardMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatTextCardMessage.cs index 9197b28a7..0b1d942ed 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatTextCardMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatTextCardMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信群聊文本卡片消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatTextMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatTextMessage.cs index 45eb5c6f0..b09dddb0e 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatTextMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatTextMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信群聊文本消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatVideoMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatVideoMessage.cs index 3fba14562..f87b80c0f 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatVideoMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatVideoMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信群聊语言消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatVoiceMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatVoiceMessage.cs index 5e2059208..828c3203d 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatVoiceMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkAppChatVoiceMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信群聊语言消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkFileMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkFileMessage.cs index 230748901..53604fee0 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkFileMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkFileMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信文件消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkImageMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkImageMessage.cs index 7eab72fc2..39d5ddbd0 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkImageMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkImageMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信图片消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMarkdownMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMarkdownMessage.cs index 07911823a..9c3ad29ad 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMarkdownMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMarkdownMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信markdown消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMiniProgramMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMiniProgramMessage.cs index 63609c3ae..7994e897b 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMiniProgramMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMiniProgramMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信小程序通知消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMpNewMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMpNewMessage.cs index 425d5a6de..9779eed51 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMpNewMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkMpNewMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信文本图文消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkNewMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkNewMessage.cs index 4f96331cd..d51e78ded 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkNewMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkNewMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信文本图文消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkTextCardMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkTextCardMessage.cs index c2ff27c72..ba0bb4bdf 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkTextCardMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkTextCardMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信文本卡片消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkTextMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkTextMessage.cs index fb7e4418d..845480397 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkTextMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkTextMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信文本消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkVideoMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkVideoMessage.cs index 435dc6939..81f274d90 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkVideoMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkVideoMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信语言消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkVoiceMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkVoiceMessage.cs index b512f3a32..3bb80fc3a 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkVoiceMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Models/WeChatWorkVoiceMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Models; +namespace LINGYUN.Abp.WeChat.Work.Messages.Models; /// /// 企业微信语言消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Request/WeChatWorkMessageReCallRequest.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Request/WeChatWorkMessageReCallRequest.cs index 100e12e49..949f4ae74 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Request/WeChatWorkMessageReCallRequest.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Request/WeChatWorkMessageReCallRequest.cs @@ -1,7 +1,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Request; +namespace LINGYUN.Abp.WeChat.Work.Messages.Request; /// /// 撤回消息请求载体 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Request/WeChatWorkMessageRequest.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Request/WeChatWorkMessageRequest.cs index 869c2b47b..db14d6cfd 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Request/WeChatWorkMessageRequest.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Request/WeChatWorkMessageRequest.cs @@ -1,4 +1,4 @@ -namespace LINGYUN.Abp.WeChat.Work.Message.Request; +namespace LINGYUN.Abp.WeChat.Work.Messages.Request; public class WeChatWorkMessageRequest { public string AccessToken { get; set; } diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Response/WeChatWorkMessageResponse.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Response/WeChatWorkMessageResponse.cs index 9a921a97b..999bf311e 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Response/WeChatWorkMessageResponse.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Response/WeChatWorkMessageResponse.cs @@ -1,7 +1,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Response; +namespace LINGYUN.Abp.WeChat.Work.Messages.Response; /// /// 企业微信发送消息响应 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCard.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCard.cs index 69f972e46..2434e5989 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCard.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCard.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; public abstract class TemplateCard { diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardAction.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardAction.cs index 6709f13df..fd40a9fd4 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardAction.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardAction.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 卡片操作按钮 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardActionMenu.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardActionMenu.cs index ef6e575c3..155b62601 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardActionMenu.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardActionMenu.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; using System.Collections.Generic; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 卡片右上角更多操作按钮 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardCardAction.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardCardAction.cs index c4b7bf711..205b9b87d 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardCardAction.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardCardAction.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 整体卡片的点击跳转事件 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardEmphasisContent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardEmphasisContent.cs index d6ce684fc..d0b5dea7d 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardEmphasisContent.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardEmphasisContent.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 关键数据样式 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardHorizontalContent.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardHorizontalContent.cs index 02e304cb6..8b2e68687 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardHorizontalContent.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardHorizontalContent.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 二级标题+文本 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardJump.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardJump.cs index 2305973ed..94b04d81c 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardJump.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardJump.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 跳转指引样式 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardMainTitle.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardMainTitle.cs index 202f1a398..0bf2b873c 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardMainTitle.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardMainTitle.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 卡票标题 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardQuoteArea.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardQuoteArea.cs index af6c7c370..1549ceabb 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardQuoteArea.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardQuoteArea.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 引用文献样式 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardSource.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardSource.cs index 999045cb1..0eee1cb87 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardSource.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TemplateCardSource.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 来源文字颜色 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TextTemplateCard.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TextTemplateCard.cs index f6d6de9f9..7f4ea3f64 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TextTemplateCard.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/TextTemplateCard.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; using System.Collections.Generic; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 文本模板卡片消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/WeChatWorkTemplateCardMessage.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/WeChatWorkTemplateCardMessage.cs index 96f4dd334..5eca3e4fd 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/WeChatWorkTemplateCardMessage.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/Templates/WeChatWorkTemplateCardMessage.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using System.Text.Json.Serialization; -namespace LINGYUN.Abp.WeChat.Work.Message.Templates; +namespace LINGYUN.Abp.WeChat.Work.Messages.Templates; /// /// 企业微信模板卡片消息 /// diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/WeChatWorkMessageManager.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/WeChatWorkMessageManager.cs index e7d46b47e..69ccb34da 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/WeChatWorkMessageManager.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/WeChatWorkMessageManager.cs @@ -1,4 +1,4 @@ -using LINGYUN.Abp.WeChat.Work.Message.Request; +using LINGYUN.Abp.WeChat.Work.Messages.Request; using LINGYUN.Abp.WeChat.Work.Token; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/WeChatWorkMessageSender.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/WeChatWorkMessageSender.cs index 8867d9744..b9f80ba9c 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/WeChatWorkMessageSender.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Messages/WeChatWorkMessageSender.cs @@ -1,7 +1,7 @@ using LINGYUN.Abp.Features.LimitValidation; using LINGYUN.Abp.WeChat.Work.Features; -using LINGYUN.Abp.WeChat.Work.Message.Request; -using LINGYUN.Abp.WeChat.Work.Message.Response; +using LINGYUN.Abp.WeChat.Work.Messages.Request; +using LINGYUN.Abp.WeChat.Work.Messages.Response; using LINGYUN.Abp.WeChat.Work.Token; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; diff --git a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/System/Net/Http/HttpClientWeChatWorkRequestExtensions.Message.cs b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/System/Net/Http/HttpClientWeChatWorkRequestExtensions.Message.cs index 56a30109b..790794bfc 100644 --- a/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/System/Net/Http/HttpClientWeChatWorkRequestExtensions.Message.cs +++ b/aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/System/Net/Http/HttpClientWeChatWorkRequestExtensions.Message.cs @@ -1,5 +1,5 @@ using LINGYUN.Abp.WeChat.Work.Messages; -using LINGYUN.Abp.WeChat.Work.Message.Request; +using LINGYUN.Abp.WeChat.Work.Messages.Request; using System.Text; using System.Threading; using System.Threading.Tasks; diff --git a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/LINGYUN/Abp/OpenIddict/WeChat/WeChatTokenExtensionGrant.cs b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/LINGYUN/Abp/OpenIddict/WeChat/WeChatTokenExtensionGrant.cs index d419676aa..7bfcb5797 100644 --- a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/LINGYUN/Abp/OpenIddict/WeChat/WeChatTokenExtensionGrant.cs +++ b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/LINGYUN/Abp/OpenIddict/WeChat/WeChatTokenExtensionGrant.cs @@ -1,6 +1,7 @@ using LINGYUN.Abp.WeChat; +using LINGYUN.Abp.WeChat.Common; +using LINGYUN.Abp.WeChat.Common.Security.Claims; using LINGYUN.Abp.WeChat.OpenId; -using LINGYUN.Abp.WeChat.Security.Claims; using LINGYUN.Abp.WeChat.Settings; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Identity; diff --git a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/Microsoft/Extensions/DependencyInjection/WeChatOpenIddictServerBuilderExtensions.cs b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/Microsoft/Extensions/DependencyInjection/WeChatOpenIddictServerBuilderExtensions.cs index 544ca3443..178ece287 100644 --- a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/Microsoft/Extensions/DependencyInjection/WeChatOpenIddictServerBuilderExtensions.cs +++ b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/Microsoft/Extensions/DependencyInjection/WeChatOpenIddictServerBuilderExtensions.cs @@ -1,5 +1,5 @@ using LINGYUN.Abp.OpenIddict.WeChat; -using LINGYUN.Abp.WeChat.Security.Claims; +using LINGYUN.Abp.WeChat.Common.Security.Claims; namespace Microsoft.Extensions.DependencyInjection; diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/WeChatMiniProgramNotificationPublishProvider.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/WeChatMiniProgramNotificationPublishProvider.cs index f6e6af491..83462c897 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/WeChatMiniProgramNotificationPublishProvider.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.WeChat.MiniProgram/LINGYUN/Abp/Notifications/WeChat/MiniProgram/WeChatMiniProgramNotificationPublishProvider.cs @@ -1,6 +1,6 @@ -using LINGYUN.Abp.WeChat.MiniProgram.Features; +using LINGYUN.Abp.WeChat.Common.Security.Claims; +using LINGYUN.Abp.WeChat.MiniProgram.Features; using LINGYUN.Abp.WeChat.MiniProgram.Messages; -using LINGYUN.Abp.WeChat.Security.Claims; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using System; @@ -44,7 +44,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram return true; } - protected override async Task PublishAsync(NotificationInfo notification, IEnumerable identifiers, CancellationToken cancellationToken = default) + protected async override Task PublishAsync(NotificationInfo notification, IEnumerable identifiers, CancellationToken cancellationToken = default) { // step1 默认微信openid绑定的就是username, // 如果不是,需要自行处理openid获取逻辑 @@ -80,7 +80,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram Logger.LogDebug($"Get wechat weapp language: {weAppLang ?? null}"); // TODO: 如果微信端发布通知,请组装好 openid 字段在通知数据内容里面 - string openId = GetOrDefault(notification.Data, AbpWeChatClaimTypes.OpenId, ""); + var openId = GetOrDefault(notification.Data, AbpWeChatClaimTypes.OpenId, ""); if (openId.IsNullOrWhiteSpace()) { @@ -110,7 +110,7 @@ namespace LINGYUN.Abp.Notifications.WeChat.MiniProgram protected string GetOrDefault(NotificationData data, string key, string defaultValue) { - if (data.ExtraProperties.TryGetValue(key, out object value)) + if (data.ExtraProperties.TryGetValue(key, out var value)) { // 取得了数据就删除对应键值 // data.Properties.Remove(key); diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.WeChat.Work/LINGYUN/Abp/Notifications/WeChat/Work/WeChatWorkNotificationPublishProvider.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.WeChat.Work/LINGYUN/Abp/Notifications/WeChat/Work/WeChatWorkNotificationPublishProvider.cs index a323ab2e4..cecef9a07 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.WeChat.Work/LINGYUN/Abp/Notifications/WeChat/Work/WeChatWorkNotificationPublishProvider.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.WeChat.Work/LINGYUN/Abp/Notifications/WeChat/Work/WeChatWorkNotificationPublishProvider.cs @@ -1,8 +1,8 @@ using LINGYUN.Abp.RealTime.Localization; using LINGYUN.Abp.WeChat.Work; using LINGYUN.Abp.WeChat.Work.Authorize; -using LINGYUN.Abp.WeChat.Work.Message; -using LINGYUN.Abp.WeChat.Work.Message.Models; +using LINGYUN.Abp.WeChat.Work.Messages; +using LINGYUN.Abp.WeChat.Work.Messages.Models; using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; using System;