mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 01:44:42 +08:00
refactor(wxapi)
This commit is contained in:
@@ -5,7 +5,7 @@ using Newtonsoft.Json.Converters;
|
|||||||
|
|
||||||
namespace Newtonsoft.Json.Converters
|
namespace Newtonsoft.Json.Converters
|
||||||
{
|
{
|
||||||
internal class StringTypedInt32IListConverter : JsonConverter<IList<int>?>
|
internal class TextualInt32IListConverter : JsonConverter<IList<int>?>
|
||||||
{
|
{
|
||||||
private readonly JsonConverter<List<int>?> _converter = new StringTypedInt32ListConverter();
|
private readonly JsonConverter<List<int>?> _converter = new StringTypedInt32ListConverter();
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ using Newtonsoft.Json.Converters;
|
|||||||
|
|
||||||
namespace Newtonsoft.Json.Converters
|
namespace Newtonsoft.Json.Converters
|
||||||
{
|
{
|
||||||
internal class StringTypedInt32ListConverter : JsonConverter<List<int>?>
|
internal class TextualInt32ListConverter : JsonConverter<List<int>?>
|
||||||
{
|
{
|
||||||
public override bool CanRead
|
public override bool CanRead
|
||||||
{
|
{
|
||||||
@@ -5,9 +5,9 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace System.Text.Json.Converters
|
namespace System.Text.Json.Converters
|
||||||
{
|
{
|
||||||
internal class StringTypedBooleanConverter : JsonConverter<bool>
|
internal class TextualBooleanConverter : JsonConverter<bool>
|
||||||
{
|
{
|
||||||
private readonly JsonConverter<bool?> _converter = new StringTypedNullableBooleanConverter();
|
private readonly JsonConverter<bool?> _converter = new TextualNullableBooleanConverter();
|
||||||
|
|
||||||
public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace System.Text.Json.Converters
|
namespace System.Text.Json.Converters
|
||||||
{
|
{
|
||||||
internal class StringTypedNullableBooleanConverter : JsonConverter<bool?>
|
internal class TextualNullableBooleanConverter : JsonConverter<bool?>
|
||||||
{
|
{
|
||||||
public override bool? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
public override bool? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
{
|
{
|
||||||
@@ -5,9 +5,9 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace System.Text.Json.Converters
|
namespace System.Text.Json.Converters
|
||||||
{
|
{
|
||||||
internal class StringTypedInt32IListConverter : JsonConverter<IList<int>?>
|
internal class TextualInt32IListConverter : JsonConverter<IList<int>?>
|
||||||
{
|
{
|
||||||
private readonly JsonConverter<List<int>?> _converter = new StringTypedInt32ListConverter();
|
private readonly JsonConverter<List<int>?> _converter = new TextualInt32ListConverter();
|
||||||
|
|
||||||
public override IList<int>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
public override IList<int>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
{
|
{
|
||||||
@@ -6,7 +6,7 @@ using System.Text.Json.Serialization;
|
|||||||
|
|
||||||
namespace System.Text.Json.Converters
|
namespace System.Text.Json.Converters
|
||||||
{
|
{
|
||||||
internal class StringTypedInt32ListConverter : JsonConverter<List<int>?>
|
internal class TextualInt32ListConverter : JsonConverter<List<int>?>
|
||||||
{
|
{
|
||||||
public override List<int>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
public override List<int>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
{
|
{
|
||||||
@@ -27,7 +27,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("is_wx_verify_succ")]
|
[Newtonsoft.Json.JsonProperty("is_wx_verify_succ")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("is_wx_verify_succ")]
|
[System.Text.Json.Serialization.JsonPropertyName("is_wx_verify_succ")]
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.StringTypedBooleanConverter))]
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualBooleanConverter))]
|
||||||
public bool IsVerifySuccessful { get; set; }
|
public bool IsVerifySuccessful { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -35,7 +35,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("is_link_succ")]
|
[Newtonsoft.Json.JsonProperty("is_link_succ")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("is_link_succ")]
|
[System.Text.Json.Serialization.JsonPropertyName("is_link_succ")]
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.StringTypedBooleanConverter))]
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualBooleanConverter))]
|
||||||
public bool IsLinkSuccessful { get; set; }
|
public bool IsLinkSuccessful { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
/// 获取或设置打印员面单打印权限列表。
|
/// 获取或设置打印员面单打印权限列表。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("tagid_list")]
|
[Newtonsoft.Json.JsonProperty("tagid_list")]
|
||||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringTypedInt32IListConverter))]
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualInt32IListConverter))]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("tagid_list")]
|
[System.Text.Json.Serialization.JsonPropertyName("tagid_list")]
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.StringTypedInt32IListConverter))]
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualInt32IListConverter))]
|
||||||
public IList<int>? TagIdList { get; set; }
|
public IList<int>? TagIdList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user