fix(wxapi): 修复投诉信息回调通知事件模型定义错误

This commit is contained in:
leoskey 2023-03-29 19:09:35 +08:00 committed by GitHub
parent 6e02b04f8d
commit 53628db6d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
/// <para>表示 EVENT.complaint_callback 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/guarantee/complaint.html </para>
/// </summary>
public class ComplaintCallbackEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
public class ComplaintCallbackEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable,
WechatApiEvent.Serialization.IXmlSerializable
{
public static class Types
{
public class EventData
{
public static class Types
{
@ -27,12 +32,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
public string? Content { get; set; }
/// <summary>
/// 获取或设置图片 MediaId 列表字符串(以逗号分隔)
/// 获取或设置图片 MediaId 列表
/// </summary>
[Newtonsoft.Json.JsonProperty("media_id_list")]
[System.Text.Json.Serialization.JsonPropertyName("media_id_list")]
[System.Xml.Serialization.XmlElement("media_id_list", IsNullable = true)]
public string? MediaIdListString { get; set; }
[System.Xml.Serialization.XmlElement("media_id_list", Type = typeof(string), IsNullable = true)]
public string[] MediaIdListString { get; set; }
}
}
@ -57,7 +62,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
/// </summary>
[Newtonsoft.Json.JsonProperty("complaint_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("complaint_order_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling
.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("complaint_order_id")]
public long ComplaintOrderId { get; set; }
@ -90,7 +96,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
/// </summary>
[Newtonsoft.Json.JsonProperty("phone_number")]
[System.Text.Json.Serialization.JsonPropertyName("phone_number")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringConverter))]
[System.Text.Json.Serialization.JsonConverter(
typeof(System.Text.Json.Converters.NumericalStringConverter))]
[System.Xml.Serialization.XmlElement("phone_number")]
public string PhoneNumber { get; set; } = default!;
@ -175,3 +182,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
public Types.ComplaintHistory[] ComplaintHistoryList { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置事件数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("BussiCallBackInfo")]
[System.Text.Json.Serialization.JsonPropertyName("BussiCallBackInfo")]
[System.Xml.Serialization.XmlElement("BussiCallBackInfo")]
public Types.EventData EventData { get; set; } = default!;
}
}