From 950cb062d6f8405708020cedf35b0444a79968ea Mon Sep 17 00:00:00 2001 From: fudiwei Date: Thu, 12 Jan 2023 10:16:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(work):=20=E9=9A=8F=E5=AE=98=E6=96=B9?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BE=AE=E4=BF=A1=E5=AE=A2=E6=9C=8D=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CgibinKf/CgibinKfGetCorpStatisticResponse.cs | 9 ++++++++- .../CgibinKf/CgibinKfGetServicerStatisticResponse.cs | 9 ++++++++- .../Models/CgibinKf/CgibinKfSendMessageRequest.cs | 11 ++++++++++- .../CgibinKf/CgibinKfGetCorpStatisticResponse.json | 8 +++++--- .../CgibinKfGetServicerStatisticResponse.json | 5 +++-- .../CgibinKf/CgibinKfSendMessageOnEventRequest.json | 9 ++++++++- .../CgibinKf/CgibinKfSendMessageRequest.json | 5 +++-- 7 files changed, 45 insertions(+), 11 deletions(-) diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfGetCorpStatisticResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfGetCorpStatisticResponse.cs index d6ec10cf..2c2861da 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfGetCorpStatisticResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfGetCorpStatisticResponse.cs @@ -1,4 +1,4 @@ -namespace SKIT.FlurlHttpClient.Wechat.Work.Models +namespace SKIT.FlurlHttpClient.Wechat.Work.Models { /// /// 表示 [POST] /cgi-bin/kf/get_corp_statistic 接口的响应。 @@ -41,6 +41,13 @@ [System.Text.Json.Serialization.JsonPropertyName("upgrade_service_customer_cnt")] public int UpgradeServiceCustomerCount { get; set; } + /// + /// 获取或设置被拒收消息的客户数。 + /// + [Newtonsoft.Json.JsonProperty("msg_rejected_customer_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("msg_rejected_customer_cnt")] + public int MessageRejectedCustomerCount { get; set; } + /// /// 获取或设置智能回复会话数。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfGetServicerStatisticResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfGetServicerStatisticResponse.cs index 49798a13..d12bf686 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfGetServicerStatisticResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfGetServicerStatisticResponse.cs @@ -1,4 +1,4 @@ -namespace SKIT.FlurlHttpClient.Wechat.Work.Models +namespace SKIT.FlurlHttpClient.Wechat.Work.Models { /// /// 表示 [POST] /cgi-bin/kf/get_servicer_statistic 接口的响应。 @@ -117,6 +117,13 @@ [Newtonsoft.Json.JsonProperty("upgrade_service_groupchat_customer_cnt")] [System.Text.Json.Serialization.JsonPropertyName("upgrade_service_groupchat_customer_cnt")] public int UpgradeServiceGroupChatCustomerCount { get; set; } + + /// + /// 获取或设置被拒收消息的客户数。 + /// + [Newtonsoft.Json.JsonProperty("msg_rejected_customer_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("msg_rejected_customer_cnt")] + public int MessageRejectedCustomerCount { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfSendMessageRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfSendMessageRequest.cs index 93f75a6d..e55dd8bc 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfSendMessageRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinKf/CgibinKfSendMessageRequest.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace SKIT.FlurlHttpClient.Wechat.Work.Models { @@ -107,6 +107,15 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models [Newtonsoft.Json.JsonProperty("content")] [System.Text.Json.Serialization.JsonPropertyName("content")] public string Content { get; set; } = string.Empty; + + /// + /// 获取或设置内容后面是否不换行。 + /// + [Newtonsoft.Json.JsonProperty("no_newline")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("no_newline")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsNoNewline { get; set; } } public class Click diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfGetCorpStatisticResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfGetCorpStatisticResponse.json index d84de0d8..951ff130 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfGetCorpStatisticResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfGetCorpStatisticResponse.json @@ -1,4 +1,4 @@ -{ +{ "errcode": 0, "errmsg": "ok", "statistic_list": [ @@ -11,7 +11,8 @@ "upgrade_service_customer_cnt": 0, "ai_session_reply_cnt": 1, "ai_transfer_rate": 1, - "ai_knowledge_hit_rate": 0 + "ai_knowledge_hit_rate": 0, + "msg_rejected_customer_cnt": 1 } }, { @@ -23,7 +24,8 @@ "upgrade_service_customer_cnt": 0, "ai_session_reply_cnt": 1, "ai_transfer_rate": 1, - "ai_knowledge_hit_rate": 0 + "ai_knowledge_hit_rate": 0, + "msg_rejected_customer_cnt": 1 } } ] diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfGetServicerStatisticResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfGetServicerStatisticResponse.json index a00cd45b..92df9995 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfGetServicerStatisticResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfGetServicerStatisticResponse.json @@ -1,4 +1,4 @@ -{ +{ "errcode": 0, "errmsg": "ok", "statistic_list": [ @@ -19,7 +19,8 @@ "upgrade_service_member_invite_cnt": 0, "upgrade_service_member_customer_cnt": 0, "upgrade_service_groupchat_invite_cnt": 0, - "upgrade_service_groupchat_customer_cnt": 0 + "upgrade_service_groupchat_customer_cnt": 0, + "msg_rejected_customer_cnt": 1 } } ] diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfSendMessageOnEventRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfSendMessageOnEventRequest.json index 8675e260..6bd3129d 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfSendMessageOnEventRequest.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfSendMessageOnEventRequest.json @@ -1,4 +1,4 @@ -{ +{ "code": "CODE", "msgid": "MSG_ID", "msgtype": "MSG_TYPE", @@ -36,6 +36,13 @@ "pagepath": "pages/index?userid=zhangsan&orderid=123123123", "content": "点击打开小程序查询更多" } + }, + { + "type": "text", + "text": { + "content": "纯文本,支持\n换行", + "no_newline": 0 + } } ], "tail_content": "如有问题,随时转人工服务" diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfSendMessageRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfSendMessageRequest.json index fbc74873..3ff20449 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfSendMessageRequest.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinKf/CgibinKfSendMessageRequest.json @@ -1,4 +1,4 @@ -{ +{ "touser": "EXTERNAL_USERID", "open_kfid": "OPEN_KFID", "msgid": "MSGID", @@ -65,7 +65,8 @@ { "type": "text", "text": { - "content": "纯文本,支持\n换行" + "content": "纯文本,支持\n换行", + "no_newline": 0 } } ],