From 48e4dfd39907a0bf9f37db681a49555e6dd511a6 Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Wed, 15 Nov 2023 15:40:47 +0800 Subject: [PATCH 01/11] =?UTF-8?q?Sample=20v6.8.0=20=E6=9B=B4=E6=96=B0=20.N?= =?UTF-8?q?ET=208.0=20=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Senparc.Weixin.Sample.net8.csproj | 2 +- .../net8-mvc/Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml | 2 +- .../Senparc.Weixin.Sample.Net8/Views/Shared/_Layout.cshtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Senparc.Weixin.Sample.net8.csproj b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Senparc.Weixin.Sample.net8.csproj index bdfd124675..d7dad620cb 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Senparc.Weixin.Sample.net8.csproj +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Senparc.Weixin.Sample.net8.csproj @@ -2,7 +2,7 @@ net8.0 - 6.7.2 + 6.8.0 35e58786-0820-4cde-b1ff-f4c6198d00f7 false diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml index 8d8fdc8c6d..d00e9f521b 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml @@ -45,7 +45,7 @@ 版本:v@(TempData["SampleVersion"]) (@TempData["BuildTime"])

 

-

支持 .NET Framework 4.6+ / .NET Core 2.x / .NET Core 3.x / .NET 5 / .NET 6 / .NET 7

+

支持 .NET Framework 4.6+ / .NET Core 2.x / .NET Core 3.x / .NET 5 - .NET 8

 

 

diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Shared/_Layout.cshtml b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Shared/_Layout.cshtml index 8d4869ef4c..3054d52d57 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Shared/_Layout.cshtml +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Shared/_Layout.cshtml @@ -110,7 +110,7 @@ @*2017年6月16日已发布新版本,改进诸多功能,并发布企业微信(Senparc.Weixin.Work)测试版,支持 .net core / .net 4.5。点击这里查看*@ @*Senparc 官方微信开发教程《微信开发深度解析:公众号、小程序高效开发秘籍》已经出版,点击这里购买正版*@ - Senparc.Weixin SDK 已发布 .NET 7 版本,全面支持 .NET 7(向下兼容)!
+ Senparc.Weixin SDK 已发布 .NET 8 版本,全面支持 .NET 8(向下兼容)!
Senparc 官方微信开发视频教程《微信公众号+小程序快速开发(一)》已全部上线,【点击这开始学习】
Senparc 官方微信开发教程《微信开发深度解析:公众号、小程序高效开发秘籍》已经出版(已第 9 次印刷),【点击这里购买正版】
@* Sample 项目自动生成工具 v1.6 正式版已发布。【点击这里查看】
*@ From 26805084fc00f21b6ee1182a108c34de66c2b2ba Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Wed, 15 Nov 2023 16:03:46 +0800 Subject: [PATCH 02/11] =?UTF-8?q?Sample=20v6.8.0=20=E6=9B=B4=E6=96=B0=20.N?= =?UTF-8?q?ET=208.0=20=E5=86=85=E5=AE=B9=EF=BC=8C=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=AF=B9=20.NET=20Core=203.1=20=E7=9A=84=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=EF=BC=88=E5=AE=98=E6=96=B9=E5=B7=B2=E7=BB=8F=E5=81=9C=E6=AD=A2?= =?UTF-8?q?=E6=94=AF=E6=8C=81=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml index d00e9f521b..72e64a2dbd 100644 --- a/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml +++ b/Samples/All/net8-mvc/Senparc.Weixin.Sample.Net8/Views/Home/Index.cshtml @@ -113,8 +113,8 @@ 当前站点运行版本 .NET 4.6.2 @*.NET Standard
2.0 / 2.1*@ - .NET Core
2.x / 3.x - .NET
6.0 / 7.0 + @* .NET Core
2.x / 3.x *@ + .NET 8.0(向下兼容) @@ -148,7 +148,7 @@ .NET 4.6.2 @*.NET Standard 2.0 / 2.1*@ - .NET Core 2.x / 3.x + @* .NET Core 2.x / 3.x *@ .NET 6.0 / 8.0 } From 0ace8294a5c490c9278142d44f01a70a32e1a5c7 Mon Sep 17 00:00:00 2001 From: zoulu <545926080@qq.com> Date: Sun, 19 Nov 2023 14:57:46 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E6=96=B0=E5=8A=A0=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E4=BC=81=E4=B8=9A=E5=AE=A2=E6=88=B7=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E5=9B=9E=E8=B0=83=E4=BA=8B=E4=BB=B6=20https://develop?= =?UTF-8?q?er.work.weixin.qq.com/document/path/92130#%E4%BC%81%E4%B8%9A%E5?= =?UTF-8?q?%AE%A2%E6%88%B7%E6%A0%87%E7%AD%BE%E5%88%9B%E5%BB%BA%E4%BA%8B%E4?= =?UTF-8?q?%BB%B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Event/RequestMessageEvent_External_Tag.cs | 131 ++++++++++++++++++ .../Senparc.Weixin.Work/Enums.cs | 7 + .../DefaultWorkMessageContext.cs | 23 +++ .../Async/WorkMessageHandler.Async.cs | 77 ++++++++++ .../MessageHandlers/WorkMessageHandler.cs | 50 +++++++ 5 files changed, 288 insertions(+) create mode 100644 src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs new file mode 100644 index 0000000000..f12c357a9f --- /dev/null +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs @@ -0,0 +1,131 @@ +/*---------------------------------------------------------------- + Copyright (C) 2023 XiaoPoTian + + 文件名:RequestMessageEvent_Change_External_Tag_Base.cs + 文件功能描述:企业客户标签或标签组事件 + + + 创建标识:XiaoPoTian - 20231119 + +----------------------------------------------------------------*/ + +using System; + +namespace Senparc.Weixin.Work.Entities +{ + /// + /// 企业客户标签或标签组事件 + /// + public class RequestMessageEvent_Change_External_Tag_Base : RequestMessageEventBase, IRequestMessageEventBase + { + public override Event Event + { + get { return Event.CHANGE_EXTERNAL_TAG; } + } + + /// + /// 标签或标签组ID + /// + public string Id { get; set; } + + /// + /// 标签或标签组所属的规则组id,只回调给“客户联系”应用 + /// + public string StrategyId { get; set; } + + public virtual ExternalTagChangeType ChangeType { get { return ExternalTagChangeType.create; } } + } + + /// + /// 企业客户标签创建 + /// + public class RequestMessageEvent_Change_External_Tag_Create : RequestMessageEvent_Change_External_Tag_Base + { + /// + /// 变更类型 + /// + public ExternalTagChangeTagType TagType { get; set; } + public RequestMessageEvent_Change_External_Tag_Create(string TagTypeStr) + { + TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), TagTypeStr, true); + } + } + + /// + /// 企业客户标签变更 + /// + public class RequestMessageEvent_Change_External_Tag_Update : RequestMessageEvent_Change_External_Tag_Base + { + /// + /// 变更类型 + /// + public ExternalTagChangeTagType TagType { get; set; } + public RequestMessageEvent_Change_External_Tag_Update(string TagTypeStr) + { + TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), TagTypeStr, true); + } + public override ExternalTagChangeType ChangeType => ExternalTagChangeType.update; + + } + + /// + /// 企业客户标签删除 + /// + public class RequestMessageEvent_Change_External_Tag_Delete : RequestMessageEvent_Change_External_Tag_Base + { + /// + /// 变更类型 + /// + public ExternalTagChangeTagType TagType { get; set; } + public RequestMessageEvent_Change_External_Tag_Delete(string TagTypeStr) + { + TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), TagTypeStr, true); + } + public override ExternalTagChangeType ChangeType => ExternalTagChangeType.delete; + } + + /// + /// 企业客户标签重排 + /// + public class RequestMessageEvent_Change_External_Tag_Shuffle : RequestMessageEvent_Change_External_Tag_Base + { + public override ExternalTagChangeType ChangeType => ExternalTagChangeType.shuffle; + } + + + + public enum ExternalTagChangeType + { + /// + /// 创建 + /// + create, + /// + /// 更新 + /// + update, + /// + /// 删除 + /// + delete, + /// + /// 重新排序 + /// + shuffle, + } + + /// + /// 变更类型 + /// + public enum ExternalTagChangeTagType + { + /// + /// 变更标签 + /// + tag, + /// + /// 变更标签组 + /// + tag_group, + } +} diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Enums.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Enums.cs index 38223d822d..e70290cf33 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Enums.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Enums.cs @@ -52,6 +52,9 @@ GroupTaskSentStatus 枚举 修改标识:Senparc - 20230914 修改描述:v3.16.4 企业微信三方代开发处理事件: 修复 Async 方法循环调用的 Bug,添加 ThirdPartyInfo 枚举值 + 修改标识:XiaoPoTian - 20231119 + 修改描述:v3.18.1 添加枚举“企业客户标签变更事件”(CHANGE_EXTERNAL_Tag) + ----------------------------------------------------------------*/ using static System.Net.WebRequestMethods; @@ -180,6 +183,10 @@ public enum Event /// CHANGE_EXTERNAL_CHAT, /// + /// 企业客户标签变更事件 + /// + CHANGE_EXTERNAL_TAG, + /// /// 直播回调事件 /// LIVING_STATUS_CHANGE, diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs index 837b2376ef..2ee2a4ab75 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs @@ -21,6 +21,9 @@ 修改标识:Senparc - 20210324 修改描述:v3.14.6 添加:审批申请状态变化回调通知: "SYS_APPROVAL_CHANGE" + + 修改标识:XiaoPoTian - 20231119 + 修改描述:v3.18.1 添加“企业客户标签变更事件回调通知”(CHANGE_EXTERNAL_Tag) ----------------------------------------------------------------*/ using Senparc.NeuChar; @@ -192,6 +195,26 @@ public override IWorkRequestMessageBase GetRequestEntityMappingResult(RequestMsg break; } break; + case "CHANGE_EXTERNAL_TAG"://企业客户标签变更事件推送 + switch (doc.Root.Element("ChangeType").Value.ToUpper()) + { + case "CREATE": + requestMessage = new RequestMessageEvent_Change_External_Tag_Create(doc.Root.Element("TagType").Value); + break; + case "UPDATE": + requestMessage = new RequestMessageEvent_Change_External_Tag_Update(doc.Root.Element("TagType").Value); + break; + case "DELETE": + requestMessage = new RequestMessageEvent_Change_External_Tag_Delete(doc.Root.Element("TagType").Value); + break; + case "SHUFFLE": + requestMessage = new RequestMessageEvent_Change_External_Tag_Shuffle(); + break; + default://其他意外类型(也可以选择抛出异常) + requestMessage = new RequestMessageEventBase(); + break; + } + break; case "LIVING_STATUS_CHANGE"://直播回调事件(living_status_change) requestMessage = new RequestMessageEvent_Living_Status_Change_Base(); break; diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs index 244d6bb7d2..2cebfc0618 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/Async/WorkMessageHandler.Async.cs @@ -331,6 +331,36 @@ public virtual async Task OnEventRequestAsync(IRequest OnEvent_ChangeExternalChatDismissRequestAsync( RequestMessage as RequestMessageEvent_Change_External_Chat_Dismiss); break; + default: + throw new UnknownRequestMsgTypeException("未知的企业客户标签变更事件Event.CHANGE_EXTERNAL_Tag下属请求信息", + null); + } + + break; + case Event.CHANGE_EXTERNAL_TAG: //企业客户标签变更事件 + var tag = RequestMessage as RequestMessageEvent_Change_External_Tag_Base; + switch (tag.ChangeType) + { + case ExternalTagChangeType.create: + responseMessage = await + OnEvent_ChangeExternalTagCreateRequestAsync( + RequestMessage as RequestMessageEvent_Change_External_Tag_Create); + break; + case ExternalTagChangeType.update: + responseMessage = await + OnEvent_ChangeExternalTagUpdateRequestAsync( + RequestMessage as RequestMessageEvent_Change_External_Tag_Update); + break; + case ExternalTagChangeType.delete: + responseMessage = await + OnEvent_ChangeExternalTagDeleteRequestAsync( + RequestMessage as RequestMessageEvent_Change_External_Tag_Delete); + break; + case ExternalTagChangeType.shuffle: + responseMessage = await + OnEvent_ChangeExternalTagShuffleRequestAsync( + RequestMessage as RequestMessageEvent_Change_External_Tag_Shuffle); + break; default: throw new UnknownRequestMsgTypeException("未知的客户群变更事件Event.CHANGE_EXTERNAL_CHAT下属请求信息", null); @@ -671,6 +701,53 @@ public virtual async Task OnEvent_ChangeExternalChatDi return await Task.Run(() => OnEvent_ChangeExternalChatDismissRequest(requestMessage)).ConfigureAwait(false); } + #region 企业客户标签事件 + /// + /// 企业客户标签-创建 + /// + /// + /// + public virtual async Task OnEvent_ChangeExternalTagCreateRequestAsync( + RequestMessageEvent_Change_External_Tag_Create requestMessage) + { + return await Task.Run(() => OnEvent_ChangeExternalTagCreateRequest(requestMessage)).ConfigureAwait(false); + } + + + /// + /// 企业客户标签-变更 + /// + /// + /// + public virtual async Task OnEvent_ChangeExternalTagUpdateRequestAsync( + RequestMessageEvent_Change_External_Tag_Update requestMessage) + { + return await Task.Run(() => OnEvent_ChangeExternalTagUpdateRequest(requestMessage)).ConfigureAwait(false); + } + + /// + /// 企业客户标签-删除 + /// + /// + /// + public virtual async Task OnEvent_ChangeExternalTagDeleteRequestAsync( + RequestMessageEvent_Change_External_Tag_Delete requestMessage) + { + return await Task.Run(() => OnEvent_ChangeExternalTagDeleteRequest(requestMessage)).ConfigureAwait(false); + } + + /// + /// 企业客户标签-重排 + /// + /// + /// + public virtual async Task OnEvent_ChangeExternalTagShuffleRequestAsync( + RequestMessageEvent_Change_External_Tag_Shuffle requestMessage) + { + return await Task.Run(() => OnEvent_ChangeExternalTagShuffleRequest(requestMessage)).ConfigureAwait(false); + } + #endregion + public virtual async Task OnEvent_Living_Status_ChangeRequestAsync( RequestMessageEvent_Living_Status_Change_Base requestMessage) { diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs index 8e7b9c8377..93a0e7113f 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs @@ -65,6 +65,9 @@ OnThirdPartyEvent_Contact_Sync 改名为 OnThirdPartyEvent_Change_Contact() 修改标识:Senparc - 20230914 修改描述:v3.16.4 企业微信三方代开发处理事件: 修复 Async 方法循环调用的 Bug + + 修改标识:XiaoPoTian - 20231119 + 修改描述:3.18.1 添加 RequestMessageEvent_Change_External_Tag_Base 事件中 ChangeType 的判断 ----------------------------------------------------------------*/ using System; @@ -796,6 +799,53 @@ public virtual IWorkResponseMessageBase OnEvent_ChangeExternalChatDismissRequest return DefaultResponseMessage(requestMessage); } + #region 企业客户标签事件 + /// + /// 企业客户标签事件-创建 + /// + /// + /// + public virtual IWorkResponseMessageBase OnEvent_ChangeExternalTagCreateRequest( + RequestMessageEvent_Change_External_Tag_Create requestMessage) + { + return DefaultResponseMessage(requestMessage); + } + + + /// + /// 企业客户标签事件-变更 + /// + /// + /// + public virtual IWorkResponseMessageBase OnEvent_ChangeExternalTagUpdateRequest( + RequestMessageEvent_Change_External_Tag_Update requestMessage) + { + return DefaultResponseMessage(requestMessage); + } + + /// + /// 企业客户标签事件-删除 + /// + /// + /// + public virtual IWorkResponseMessageBase OnEvent_ChangeExternalTagDeleteRequest( + RequestMessageEvent_Change_External_Tag_Delete requestMessage) + { + return DefaultResponseMessage(requestMessage); + } + + /// + /// 企业客户标签事件-重排 + /// + /// + /// + public virtual IWorkResponseMessageBase OnEvent_ChangeExternalTagShuffleRequest( + RequestMessageEvent_Change_External_Tag_Shuffle requestMessage) + { + return DefaultResponseMessage(requestMessage); + } + #endregion + public virtual IWorkResponseMessageBase OnEvent_Living_Status_ChangeRequest( RequestMessageEvent_Living_Status_Change_Base requestMessage) { From 60a6bce041e1dc37f28a0c69587ac26a982fd9d8 Mon Sep 17 00:00:00 2001 From: zoulu <545926080@qq.com> Date: Sun, 19 Nov 2023 15:12:28 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E8=A1=A5=E5=85=85=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Event/RequestMessageEvent_External_Tag.cs | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs index f12c357a9f..3bc000ff46 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs @@ -32,7 +32,9 @@ public override Event Event /// 标签或标签组所属的规则组id,只回调给“客户联系”应用 /// public string StrategyId { get; set; } - + /// + /// 具体事件类型 + /// public virtual ExternalTagChangeType ChangeType { get { return ExternalTagChangeType.create; } } } @@ -45,6 +47,10 @@ public class RequestMessageEvent_Change_External_Tag_Create : RequestMessageEven /// 变更类型 /// public ExternalTagChangeTagType TagType { get; set; } + /// + /// TagType类型初始化 + /// + /// public RequestMessageEvent_Change_External_Tag_Create(string TagTypeStr) { TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), TagTypeStr, true); @@ -60,10 +66,17 @@ public class RequestMessageEvent_Change_External_Tag_Update : RequestMessageEven /// 变更类型 /// public ExternalTagChangeTagType TagType { get; set; } + // + /// TagType类型初始化 + /// + /// public RequestMessageEvent_Change_External_Tag_Update(string TagTypeStr) { TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), TagTypeStr, true); } + /// + /// 重写具体事件类型 + /// public override ExternalTagChangeType ChangeType => ExternalTagChangeType.update; } @@ -77,10 +90,17 @@ public class RequestMessageEvent_Change_External_Tag_Delete : RequestMessageEven /// 变更类型 /// public ExternalTagChangeTagType TagType { get; set; } + // + /// TagType类型初始化 + /// + /// public RequestMessageEvent_Change_External_Tag_Delete(string TagTypeStr) { TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), TagTypeStr, true); } + /// + /// 重写具体事件类型 + /// public override ExternalTagChangeType ChangeType => ExternalTagChangeType.delete; } @@ -89,11 +109,16 @@ public RequestMessageEvent_Change_External_Tag_Delete(string TagTypeStr) /// public class RequestMessageEvent_Change_External_Tag_Shuffle : RequestMessageEvent_Change_External_Tag_Base { + /// + /// 重写具体事件类型 + /// public override ExternalTagChangeType ChangeType => ExternalTagChangeType.shuffle; } - + /// + /// 具体的事件类型 + /// public enum ExternalTagChangeType { /// From 6f6bca23e0c50c5725f8b9f9a1a87564a799223c Mon Sep 17 00:00:00 2001 From: zoulu <545926080@qq.com> Date: Wed, 22 Nov 2023 13:42:49 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=BE=A4=E6=96=B0?= =?UTF-8?q?=E5=8A=A0=E7=89=88=E6=9C=AC=E5=8F=B7=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=AE=A2=E6=88=B7=E4=BA=8B=E4=BB=B6=E6=96=B0?= =?UTF-8?q?=E5=8A=A0=E5=88=A0=E9=99=A4=E5=AE=A2=E6=88=B7=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=9D=A5=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AdvancedAPIs/External/GroupChatGetResult.cs | 8 ++++++++ .../Request/Event/RequestMessageEvent_ExternalContact.cs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/GroupChatGetResult.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/GroupChatGetResult.cs index 6932119545..b216a65c5b 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/GroupChatGetResult.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/External/GroupChatGetResult.cs @@ -29,6 +29,9 @@ and limitations under the License. 创建标识:lishewen - 20200318 + 修改标识:XiaoPoTian - 20231122 + 修改描述:v3.18.1 添加“当前群成员版本号。可以配合客户群变更事件减少主动调用本接口的次数”(member_version) + ----------------------------------------------------------------*/ @@ -78,6 +81,11 @@ public class Group_Chat /// public string notice { get; set; } + /// + /// 当前群成员版本号。可以配合客户群变更事件减少主动调用本接口的次数 + /// + public string member_version { get; set; } + /// /// 群成员列表 /// diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_ExternalContact.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_ExternalContact.cs index fc2515b4a9..c355e0d24c 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_ExternalContact.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_ExternalContact.cs @@ -19,6 +19,9 @@ 修改标识:Senparc - 20231026 修改描述:v3.17.0 成员对外联系 > 客户消息通知处理 + 修改标识:XiaopPoTian - 20231121 + 修改描述:v3.18.1 删除企业客户事件 > 新加Source,删除客户的操作来源 + ----------------------------------------------------------------*/ namespace Senparc.Weixin.Work.Entities.Request.Event @@ -117,6 +120,11 @@ public class RequestMessageEvent_Change_ExternalContact_Del : RequestMessageEven /// 外部联系人的userid /// public string ExternalUserID { get; set; } + /// + /// 删除客户的操作来源,DELETE_BY_TRANSFER表示此客户是因在职继承自动被转接成员删除 + /// + /// + public string Source { get; set; } } /// From f8b6a6946e39ad3860b9123c2cf87be305f229e4 Mon Sep 17 00:00:00 2001 From: zoulu <545926080@qq.com> Date: Wed, 22 Nov 2023 21:20:20 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E6=96=B0=E5=8A=A0=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=BE=A4=E5=8F=98=E6=9B=B4=E4=BA=8B=E4=BB=B6MemChangeList=20La?= =?UTF-8?q?stMemVer=20CurMemVer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkMessageHandlerTest.Change_Contact.cs | 45 +++++++++++++++++++ .../RequestMessageEvent_External_Chat.cs | 32 +++++++++++-- .../DefaultWorkMessageContext.cs | 8 ++-- 3 files changed, 77 insertions(+), 8 deletions(-) diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/MessageHandlers/WorkMessageHandlerTest.Change_Contact.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/MessageHandlers/WorkMessageHandlerTest.Change_Contact.cs index a344aa19aa..a6298daa02 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/MessageHandlers/WorkMessageHandlerTest.Change_Contact.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/MessageHandlers/WorkMessageHandlerTest.Change_Contact.cs @@ -132,5 +132,50 @@ public void RequestMessageEvent_Change_Contact_User_Create() } + + /// + /// 创建成员 + /// + [TestMethod] + public async Task RequestMessageEvent_Change_External_Chat_Update() + { + //官方提供 + var xml = @" + + +1700642907 + + + + + +0 +2 + + +"; + + var postModel = new PostModel() + { + Msg_Signature = "22cb38c34ae9ba4bdec938405b931ad3ece7e19e", + Timestamp = "1644320363", + Nonce = "1645172247", + + Token = "", + EncodingAESKey = "", + CorpId = "" + }; + + var messageHandler = new CustomMessageHandlers(XDocument.Parse(xml), postModel, 10); + await messageHandler.ExecuteAsync(new System.Threading.CancellationToken()); + var responseMessage = messageHandler.ResponseDocument; + + Assert.IsNotNull(messageHandler.RequestMessage); + Assert.AreEqual(RequestMsgType.Event, messageHandler.RequestMessage.MsgType); + Assert.IsInstanceOfType(messageHandler.RequestMessage, typeof(RequestMessageEvent_Change_External_Chat_Update)); + + var requestMessage = messageHandler.RequestMessage as RequestMessageEvent_Change_External_Chat_Update; + Console.WriteLine(requestMessage.MemberChangeList.ToJson(true)); + } } } diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Chat.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Chat.cs index 445f1a607d..c62f88e381 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Chat.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Chat.cs @@ -13,9 +13,16 @@ 修改标识:WangDrama - 20210630 修改描述:v3.9.600 添加群直播回调事件 + 修改标识:XiaoPoTian - 20231122 + 修改描述:v3.18.1 添加客户群变更事件(MemChangeList,LastMemVer,CurMemVer) + ----------------------------------------------------------------*/ +using Senparc.CO2NET.Extensions; using System; +using System.Collections.Generic; +using System.Linq; +using System.Xml.Linq; namespace Senparc.Weixin.Work.Entities { @@ -32,21 +39,24 @@ public override Event Event /// /// 群ID /// - public string ChatId { get; set; } + public string ChatId { get; set; } public virtual ExternalChatChangeType ChangeType { get { return ExternalChatChangeType.create; } } } - public class RequestMessageEvent_Change_External_Chat_Create: RequestMessageEvent_Change_External_Chat_Base + public class RequestMessageEvent_Change_External_Chat_Create : RequestMessageEvent_Change_External_Chat_Base { } public class RequestMessageEvent_Change_External_Chat_Update : RequestMessageEvent_Change_External_Chat_Base { - public RequestMessageEvent_Change_External_Chat_Update(string UpdateDetailStr) + public RequestMessageEvent_Change_External_Chat_Update(XElement memChangeListElement) { - UpdateDetail = (ExternalChatUpdateDetailType)Enum.Parse(typeof(ExternalChatUpdateDetailType), UpdateDetailStr, true); + if(memChangeListElement != null) + { + MemberChangeList = memChangeListElement.Elements().Select(u => u.Value).ToArray(); + } } public override ExternalChatChangeType ChangeType => ExternalChatChangeType.update; /// @@ -67,12 +77,25 @@ public RequestMessageEvent_Change_External_Chat_Update(string UpdateDetailStr) /// 当是成员入群或退群时有值。表示成员变更数量 /// public int MemChangeCnt { get; set; } + /// + /// 当是成员入群或退群时有值。变更的成员列表 + /// + public string[] MemberChangeList { get; set; } + /// + /// 当是成员入群或退群时有值。 变更前的群成员版本号 + /// + public string LastMemVer { get; set; } + /// + /// 当是成员入群或退群时有值。变更后的群成员版本号 + /// + public string CurMemVer { get; set; } } public class RequestMessageEvent_Change_External_Chat_Dismiss : RequestMessageEvent_Change_External_Chat_Base { public override ExternalChatChangeType ChangeType => ExternalChatChangeType.dismiss; } + public enum ExternalChatChangeType { create, @@ -80,6 +103,7 @@ public enum ExternalChatChangeType dismiss } + public enum ExternalChatUpdateDetailType { /// diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs index 2ee2a4ab75..f72359d1b7 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs @@ -185,7 +185,7 @@ public override IWorkRequestMessageBase GetRequestEntityMappingResult(RequestMsg requestMessage = new RequestMessageEvent_Change_External_Chat_Create(); break; case "UPDATE": - requestMessage = new RequestMessageEvent_Change_External_Chat_Update(doc.Root.Element("UpdateDetail").Value); + requestMessage = new RequestMessageEvent_Change_External_Chat_Update(doc.Root.Element("MemChangeList")); break; case "DISMISS": requestMessage = new RequestMessageEvent_Change_External_Chat_Dismiss(); @@ -199,13 +199,13 @@ public override IWorkRequestMessageBase GetRequestEntityMappingResult(RequestMsg switch (doc.Root.Element("ChangeType").Value.ToUpper()) { case "CREATE": - requestMessage = new RequestMessageEvent_Change_External_Tag_Create(doc.Root.Element("TagType").Value); + requestMessage = new RequestMessageEvent_Change_External_Tag_Create(); break; case "UPDATE": - requestMessage = new RequestMessageEvent_Change_External_Tag_Update(doc.Root.Element("TagType").Value); + requestMessage = new RequestMessageEvent_Change_External_Tag_Update(); break; case "DELETE": - requestMessage = new RequestMessageEvent_Change_External_Tag_Delete(doc.Root.Element("TagType").Value); + requestMessage = new RequestMessageEvent_Change_External_Tag_Delete(); break; case "SHUFFLE": requestMessage = new RequestMessageEvent_Change_External_Tag_Shuffle(); From 7acf8ec867fbd9e71ac5ee013d943b443512fa97 Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Tue, 28 Nov 2023 18:56:06 +0800 Subject: [PATCH 07/11] modify --- .../Controllers/TenPayApiV3Controller.cs | 25 ++++++------------- .../AdvancedAPIs/Template/TemplateTest.cs | 4 +-- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs index aad56766e4..62f713e1a4 100644 --- a/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs +++ b/Samples/TenPayV3/Senparc.Weixin.Sample.TenPayV3/Controllers/TenPayApiV3Controller.cs @@ -15,36 +15,25 @@ /* 注意:TenpayApiV3Controller 为真正微信支付 API V3 的示例 */ //DPBMARK_FILE TenPay -using Microsoft.AspNetCore.Http; +using System.Collections.Concurrent; +using System.Text; using Microsoft.AspNetCore.Mvc; using Senparc.CO2NET.Extensions; +using Senparc.CO2NET.HttpUtility; using Senparc.CO2NET.Utilities; -using Senparc.Weixin.Entities; using Senparc.Weixin.Exceptions; using Senparc.Weixin.Helpers; -using Senparc.Weixin.Sample.TenPayV3.Controllers; +using Senparc.Weixin.MP.AdvancedAPIs; +//DPBMARK MP +using Senparc.Weixin.Sample.TenPayV3.Filters; using Senparc.Weixin.Sample.TenPayV3.Models; -using Senparc.Weixin.TenPayV3; +using Senparc.Weixin.Sample.TenPayV3.Utilities; using Senparc.Weixin.TenPayV3.Apis; using Senparc.Weixin.TenPayV3.Apis.BasePay; using Senparc.Weixin.TenPayV3.Apis.BasePay.Entities; using Senparc.Weixin.TenPayV3.Apis.Entities; using Senparc.Weixin.TenPayV3.Entities; using Senparc.Weixin.TenPayV3.Helpers; -using System; -using System.Collections.Concurrent; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -//DPBMARK MP -using Senparc.Weixin.MP; -using Senparc.Weixin.Sample.TenPayV3.Filters; -using Senparc.Weixin.MP.AdvancedAPIs; -using Senparc.CO2NET.HttpUtility; -using Senparc.Weixin.Sample.TenPayV3.Utilities; -using ZXing; //DPBMARK_END namespace Senparc.Weixin.Sample.TenPayV3.Controllers diff --git a/src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/Template/TemplateTest.cs b/src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/Template/TemplateTest.cs index b3d93fa2fb..f04d5b2e24 100644 --- a/src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/Template/TemplateTest.cs +++ b/src/Senparc.Weixin.MP/Senparc.Weixin.MP.Test/AdvancedAPIs/Template/TemplateTest.cs @@ -224,7 +224,7 @@ public void GetIndustryTest() public void AddtemplateTest() { var accessToken = AccessTokenContainer.GetAccessToken(_appId); - var result = TemplateApi.Addtemplate(accessToken, "OPENTM207498902"); + var result = TemplateApi.AddTemplate(accessToken, "OPENTM207498902", null); Assert.AreEqual(ReturnCode.请求成功, result.errcode); Assert.IsNotNull(result.template_id); Console.WriteLine(result.template_id); @@ -246,7 +246,7 @@ public void DelPrivateTemplateTest() //var accessToken = AccessTokenContainer.GetAccessToken(_appId); //添加模板 - var addResult = TemplateApi.Addtemplate(_appId, "OPENTM206164559"); + var addResult = TemplateApi.AddTemplate(_appId, "OPENTM206164559", null); var templateId = addResult.template_id; Assert.IsNotNull(templateId); From 4fe93f222db02d9ccb8c2d4e16c727242a73e1ac Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Tue, 28 Nov 2023 18:59:11 +0800 Subject: [PATCH 08/11] =?UTF-8?q?Work=20v3.18.1=20=E6=96=B0=E5=8A=A0?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1=E4=BC=81=E4=B8=9A=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=A0=87=E7=AD=BE=E5=9B=9E=E8=B0=83=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=20#2948=20=E6=84=9F=E8=B0=A2=20@xiaopotian1990?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkMessageHandlerTest.Change_Contact.cs | 3 +++ .../Event/RequestMessageEvent_External_Tag.cs | 16 ++++++++-------- .../MessageContext/DefaultWorkMessageContext.cs | 9 ++++++--- .../MessageHandlers/WorkMessageHandler.cs | 2 +- .../Senparc.Weixin.Work.net8.csproj | 2 +- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/MessageHandlers/WorkMessageHandlerTest.Change_Contact.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/MessageHandlers/WorkMessageHandlerTest.Change_Contact.cs index a6298daa02..a5a1ba76a8 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/MessageHandlers/WorkMessageHandlerTest.Change_Contact.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work.Test/MessageHandlers/WorkMessageHandlerTest.Change_Contact.cs @@ -167,6 +167,9 @@ public async Task RequestMessageEvent_Change_External_Chat_Update() }; var messageHandler = new CustomMessageHandlers(XDocument.Parse(xml), postModel, 10); + + await Console.Out.WriteLineAsync(messageHandler.RequestMessage.ToJson(true)); + await messageHandler.ExecuteAsync(new System.Threading.CancellationToken()); var responseMessage = messageHandler.ResponseDocument; diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs index 3bc000ff46..24494a9699 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Entities/Request/Event/RequestMessageEvent_External_Tag.cs @@ -1,5 +1,5 @@ /*---------------------------------------------------------------- - Copyright (C) 2023 XiaoPoTian + Copyright (C) 2023 Senparc 文件名:RequestMessageEvent_Change_External_Tag_Base.cs 文件功能描述:企业客户标签或标签组事件 @@ -50,10 +50,10 @@ public class RequestMessageEvent_Change_External_Tag_Create : RequestMessageEven /// /// TagType类型初始化 /// - /// - public RequestMessageEvent_Change_External_Tag_Create(string TagTypeStr) + /// + public RequestMessageEvent_Change_External_Tag_Create(string tagTypeStr) { - TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), TagTypeStr, true); + TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), tagTypeStr, true); } } @@ -70,9 +70,9 @@ public class RequestMessageEvent_Change_External_Tag_Update : RequestMessageEven /// TagType类型初始化 /// /// - public RequestMessageEvent_Change_External_Tag_Update(string TagTypeStr) + public RequestMessageEvent_Change_External_Tag_Update(string tagTypeStr) { - TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), TagTypeStr, true); + TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), tagTypeStr, true); } /// /// 重写具体事件类型 @@ -94,9 +94,9 @@ public class RequestMessageEvent_Change_External_Tag_Delete : RequestMessageEven /// TagType类型初始化 /// /// - public RequestMessageEvent_Change_External_Tag_Delete(string TagTypeStr) + public RequestMessageEvent_Change_External_Tag_Delete(string tagTypeStr) { - TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), TagTypeStr, true); + TagType = (ExternalTagChangeTagType)Enum.Parse(typeof(ExternalTagChangeTagType), tagTypeStr, true); } /// /// 重写具体事件类型 diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs index f72359d1b7..4d042bab8b 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageContext/DefaultWorkMessageContext.cs @@ -196,16 +196,19 @@ public override IWorkRequestMessageBase GetRequestEntityMappingResult(RequestMsg } break; case "CHANGE_EXTERNAL_TAG"://企业客户标签变更事件推送 + //创建标签时,此项为tag,创建标签组时,此项为tag_group + //文档:https://developer.work.weixin.qq.com/document/path/92130#%E4%BC%81%E4%B8%9A%E5%AE%A2%E6%88%B7%E6%A0%87%E7%AD%BE%E5%88%9B%E5%BB%BA%E4%BA%8B%E4%BB%B6 + var tagType = doc.Root.Element("TagType").Value; switch (doc.Root.Element("ChangeType").Value.ToUpper()) { case "CREATE": - requestMessage = new RequestMessageEvent_Change_External_Tag_Create(); + requestMessage = new RequestMessageEvent_Change_External_Tag_Create(tagType); break; case "UPDATE": - requestMessage = new RequestMessageEvent_Change_External_Tag_Update(); + requestMessage = new RequestMessageEvent_Change_External_Tag_Update(tagType); break; case "DELETE": - requestMessage = new RequestMessageEvent_Change_External_Tag_Delete(); + requestMessage = new RequestMessageEvent_Change_External_Tag_Delete(tagType); break; case "SHUFFLE": requestMessage = new RequestMessageEvent_Change_External_Tag_Shuffle(); diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs index 93a0e7113f..3725095e9b 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/MessageHandlers/WorkMessageHandler.cs @@ -67,7 +67,7 @@ OnThirdPartyEvent_Contact_Sync 改名为 OnThirdPartyEvent_Change_Contact() 修改描述:v3.16.4 企业微信三方代开发处理事件: 修复 Async 方法循环调用的 Bug 修改标识:XiaoPoTian - 20231119 - 修改描述:3.18.1 添加 RequestMessageEvent_Change_External_Tag_Base 事件中 ChangeType 的判断 + 修改描述:v3.18.1 添加 RequestMessageEvent_Change_External_Tag_Base 事件中 ChangeType 的判断 ----------------------------------------------------------------*/ using System; diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj index afb22ca330..71db762360 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj @@ -1,7 +1,7 @@ net462;netstandard2.0;netstandard2.1 - 3.18.0 + 3.18.1 10.0 Senparc.Weixin.Work Senparc.Weixin.Work From aebc3a9f06583a2a168fc1baffefbeffc506ce08 Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Tue, 28 Nov 2023 19:17:03 +0800 Subject: [PATCH 09/11] =?UTF-8?q?Work=20v3.18.1=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=EF=BC=9Atemplate=5Fnames=20=E5=91=BD=E5=90=8D=E6=9B=B4?= =?UTF-8?q?=E6=AD=A3=E4=B8=BA=EF=BC=9Atemplate=5Fname=20#2949=20=E6=84=9F?= =?UTF-8?q?=E8=B0=A2=20@programmer-zheng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OAJson/ApprovalCreateTemplateRequest.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/OA/OAJson/ApprovalCreateTemplateRequest.cs b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/OA/OAJson/ApprovalCreateTemplateRequest.cs index e5fb196fbf..5227c18f9c 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/OA/OAJson/ApprovalCreateTemplateRequest.cs +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/AdvancedAPIs/OA/OAJson/ApprovalCreateTemplateRequest.cs @@ -1,16 +1,29 @@ -using System.Collections.Generic; +/*---------------------------------------------------------------- + Copyright (C) 2023 Senparc + + 文件名:ApprovalCreateTemplateRequest.cs + 文件功能描述:创建审批模板 请求 + + + 创建标识:Senparc - 20230224 + + 修改标识:Senparc - 20231128 + 修改描述:修复:template_names 命名更正为:template_name + +----------------------------------------------------------------*/ +using System.Collections.Generic; namespace Senparc.Weixin.Work.AdvancedAPIs.OA.OAJson { /// - /// + /// 创建审批模板 请求 /// public class ApprovalCreateTemplateRequest { /// /// /// - public List template_names { get; set; } + public List template_name { get; set; } /// /// From 21caa70f73f5d9975e80f1fca392a9c92315c8bd Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Tue, 28 Nov 2023 19:20:43 +0800 Subject: [PATCH 10/11] =?UTF-8?q?Work=20=20=20v3.18.1=20=20=201=E3=80=81Wo?= =?UTF-8?q?rk=20v3.18.1=20=E6=96=B0=E5=8A=A0=E4=BC=81=E4=B8=9A=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E4=BC=81=E4=B8=9A=E5=AE=A2=E6=88=B7=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E4=BA=8B=E4=BB=B6=20=20=202=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9AApprovalCreateTemplateRequest.templa?= =?UTF-8?q?te=5Fnames=20=E5=91=BD=E5=90=8D=E6=9B=B4=E6=AD=A3=E4=B8=BA?= =?UTF-8?q?=EF=BC=9Atemplate=5Fname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj index 71db762360..25b95d3530 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj @@ -205,7 +205,10 @@ v3.16.0 MessageHandler 和客服接口支持长文本自动切割后连续发送 v3.16.4 企业微信三方代开发处理事件: 修复 Async 方法循环调用的 Bug v3.17.0 成员对外联系 > 客户消息通知处理 - + v3.18.1 + 1、Work v3.18.1 新加企业微信企业客户标签回调事件 + 2、修复:ApprovalCreateTemplateRequest.template_names 命名更正为:template_name + https://github.com/JeffreySu/WeiXinMPSDK False From 094a482050877f1b51c1abfed1e43150b4449ce7 Mon Sep 17 00:00:00 2001 From: JeffreySu Date: Tue, 28 Nov 2023 19:33:12 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=20Work=20v3.18.1=20=20=201=E3=80=81Work?= =?UTF-8?q?=20v3.18.1=20=E6=96=B0=E5=8A=A0=E4=BC=81=E4=B8=9A=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E4=BC=81=E4=B8=9A=E5=AE=A2=E6=88=B7=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E4=BA=8B=E4=BB=B6=EF=BC=88PR=20#2948?= =?UTF-8?q?=EF=BC=89=20=20=202=E3=80=81=E4=BF=AE=E5=A4=8D=EF=BC=9AApproval?= =?UTF-8?q?CreateTemplateRequest.template=5Fnames=20=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E4=B8=BA=EF=BC=9Atemplate=5Fname=EF=BC=88Iss?= =?UTF-8?q?ue=20#2949=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 感谢 @programmer-zheng @xiaopotian1990 --- .../Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj index 25b95d3530..f9a423aa77 100644 --- a/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj +++ b/src/Senparc.Weixin.Work/Senparc.Weixin.Work/Senparc.Weixin.Work.net8.csproj @@ -206,8 +206,8 @@ v3.16.4 企业微信三方代开发处理事件: 修复 Async 方法循环调用的 Bug v3.17.0 成员对外联系 > 客户消息通知处理 v3.18.1 - 1、Work v3.18.1 新加企业微信企业客户标签回调事件 - 2、修复:ApprovalCreateTemplateRequest.template_names 命名更正为:template_name + 1、Work v3.18.1 新加企业微信企业客户标签回调事件(PR #2948) + 2、修复:ApprovalCreateTemplateRequest.template_names 命名更正为:template_name(Issue #2949) https://github.com/JeffreySu/WeiXinMPSDK False