mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-03-10 00:13:36 +08:00
feat(tenpayv3): 随官方更新消费者投诉单相关接口模型
This commit is contained in:
+40
@@ -74,6 +74,38 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("state")]
|
[System.Text.Json.Serialization.JsonPropertyName("state")]
|
||||||
public string? State { get; set; }
|
public string? State { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class AdditionalInfo
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class SharePowerInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置归还时间。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("return_time")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("return_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||||
|
public DateTimeOffset? ReturnTime { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置补充信息类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||||
|
public string Type { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置共享充电宝投诉相关信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("share_power_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("share_power_info")]
|
||||||
|
public Types.SharePowerInfo? SharePowerInfo { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -111,6 +143,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("complainted_mchid")]
|
[Newtonsoft.Json.JsonProperty("complainted_mchid")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("complainted_mchid")]
|
[System.Text.Json.Serialization.JsonPropertyName("complainted_mchid")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))]
|
||||||
public string? ComplaintedMerchantId { get; set; }
|
public string? ComplaintedMerchantId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -198,5 +231,12 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("service_order_info")]
|
[Newtonsoft.Json.JsonProperty("service_order_info")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("service_order_info")]
|
[System.Text.Json.Serialization.JsonPropertyName("service_order_info")]
|
||||||
public Types.ServiceOrder[]? ServiceOrderList { get; set; }
|
public Types.ServiceOrder[]? ServiceOrderList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置补充信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("additional_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("additional_info")]
|
||||||
|
public Types.AdditionalInfo? AdditionalInfo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+92
-1
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Flurl.Http.Configuration;
|
||||||
|
|
||||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
{
|
{
|
||||||
@@ -66,11 +67,101 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// 获取或设置投诉资料列表。
|
/// 获取或设置投诉资料列表。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("complaint_media_list")]
|
[Newtonsoft.Json.JsonProperty("complaint_media_list")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Converters.ResponsePropertyNegotiationHistoryItemComplaintMediaListNewtonsoftJsonConverter))]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("complaint_media_list")]
|
[System.Text.Json.Serialization.JsonPropertyName("complaint_media_list")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.ResponsePropertyNegotiationHistoryItemComplaintMediaListSystemTextJsonConverter))]
|
||||||
public Types.ComplaintMedia[]? ComplaintMediaList { get; set; }
|
public Types.ComplaintMedia[]? ComplaintMediaList { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static class Converters
|
||||||
|
{
|
||||||
|
internal class ResponsePropertyNegotiationHistoryItemComplaintMediaListNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter<Types.NegotiationHistory.Types.ComplaintMedia[]?>
|
||||||
|
{
|
||||||
|
public override bool CanWrite
|
||||||
|
{
|
||||||
|
get { return false; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Types.NegotiationHistory.Types.ComplaintMedia[]? ReadJson(Newtonsoft.Json.JsonReader reader, Type objectType, Types.NegotiationHistory.Types.ComplaintMedia[]? existingValue, bool hasExistingValue, Newtonsoft.Json.JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* NOTICE:
|
||||||
|
* 2023-03-07 微信支付调整了返回结果的数据结构。
|
||||||
|
* 原 "complaint_media_list" 字段是数组形式,现改为对象形式。
|
||||||
|
* 此转换器为了适配并同时兼容新旧两种数据结构。
|
||||||
|
*/
|
||||||
|
|
||||||
|
switch (reader.TokenType)
|
||||||
|
{
|
||||||
|
case Newtonsoft.Json.JsonToken.Null:
|
||||||
|
{
|
||||||
|
return existingValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
case Newtonsoft.Json.JsonToken.StartArray:
|
||||||
|
{
|
||||||
|
return serializer.Deserialize<Types.NegotiationHistory.Types.ComplaintMedia[]>(reader);
|
||||||
|
}
|
||||||
|
|
||||||
|
case Newtonsoft.Json.JsonToken.StartObject:
|
||||||
|
{
|
||||||
|
Types.NegotiationHistory.Types.ComplaintMedia[] array = new Types.NegotiationHistory.Types.ComplaintMedia[1];
|
||||||
|
array[0] = serializer.Deserialize<Types.NegotiationHistory.Types.ComplaintMedia>(reader)!;
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Newtonsoft.Json.JsonException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WriteJson(Newtonsoft.Json.JsonWriter writer, Types.NegotiationHistory.Types.ComplaintMedia[]? value, Newtonsoft.Json.JsonSerializer serializer)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class ResponsePropertyNegotiationHistoryItemComplaintMediaListSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter<Types.NegotiationHistory.Types.ComplaintMedia[]?>
|
||||||
|
{
|
||||||
|
public override Types.NegotiationHistory.Types.ComplaintMedia[]? Read(ref System.Text.Json.Utf8JsonReader reader, Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* NOTICE:
|
||||||
|
* 2023-03-07 微信支付调整了返回结果的数据结构。
|
||||||
|
* 原 "complaint_media_list" 字段是数组形式,现改为对象形式。
|
||||||
|
* 此转换器为了适配并同时兼容新旧两种数据结构。
|
||||||
|
*/
|
||||||
|
|
||||||
|
switch (reader.TokenType)
|
||||||
|
{
|
||||||
|
case System.Text.Json.JsonTokenType.Null:
|
||||||
|
{
|
||||||
|
return default;
|
||||||
|
}
|
||||||
|
|
||||||
|
case System.Text.Json.JsonTokenType.StartArray:
|
||||||
|
{
|
||||||
|
return System.Text.Json.JsonSerializer.Deserialize<Types.NegotiationHistory.Types.ComplaintMedia[]>(ref reader, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
case System.Text.Json.JsonTokenType.StartObject:
|
||||||
|
{
|
||||||
|
Types.NegotiationHistory.Types.ComplaintMedia[] array = new Types.NegotiationHistory.Types.ComplaintMedia[1];
|
||||||
|
array[0] = System.Text.Json.JsonSerializer.Deserialize<Types.NegotiationHistory.Types.ComplaintMedia>(ref reader, options)!;
|
||||||
|
return array;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new System.Text.Json.JsonException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Write(System.Text.Json.Utf8JsonWriter writer, Types.NegotiationHistory.Types.ComplaintMedia[]? value, System.Text.Json.JsonSerializerOptions options)
|
||||||
|
{
|
||||||
|
writer.WriteRawValue(System.Text.Json.JsonSerializer.Serialize(value, typeof(Types.NegotiationHistory.Types.ComplaintMedia[]), options));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置投诉协商历史列表。
|
/// 获取或设置投诉协商历史列表。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
+22
-10
@@ -21,6 +21,14 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
public class ComplaintMedia : GetMerchantServiceComplaintByComplaintIdResponse.Types.ComplaintMedia
|
public class ComplaintMedia : GetMerchantServiceComplaintByComplaintIdResponse.Types.ComplaintMedia
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ServiceOrder : GetMerchantServiceComplaintByComplaintIdResponse.Types.ServiceOrder
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AdditionalInfo : GetMerchantServiceComplaintByComplaintIdResponse.Types.AdditionalInfo
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -58,6 +66,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("complainted_mchid")]
|
[Newtonsoft.Json.JsonProperty("complainted_mchid")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("complainted_mchid")]
|
[System.Text.Json.Serialization.JsonPropertyName("complainted_mchid")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))]
|
||||||
public string? ComplaintedMerchantId { get; set; }
|
public string? ComplaintedMerchantId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -138,10 +147,20 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("user_tag_list")]
|
[Newtonsoft.Json.JsonProperty("user_tag_list")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("user_tag_list")]
|
[System.Text.Json.Serialization.JsonPropertyName("user_tag_list")]
|
||||||
public string[]? UserTagList { get; set; }
|
public string[]? UserTagList { get; set; }
|
||||||
}
|
|
||||||
|
|
||||||
public class ServiceOrder : GetMerchantServiceComplaintByComplaintIdResponse.Types.ServiceOrder
|
/// <summary>
|
||||||
{
|
/// 获取或设置关联服务单列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("service_order_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("service_order_info")]
|
||||||
|
public Types.ServiceOrder[]? ServiceOrderList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置补充信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("additional_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("additional_info")]
|
||||||
|
public Types.AdditionalInfo? AdditionalInfo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,13 +171,6 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
|||||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
public Types.Complaint[] ComplaintList { get; set; } = default!;
|
public Types.Complaint[] ComplaintList { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取或设置关联服务单列表。
|
|
||||||
/// </summary>
|
|
||||||
[Newtonsoft.Json.JsonProperty("service_order_info")]
|
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("service_order_info")]
|
|
||||||
public Types.ServiceOrder[]? ServiceOrderList { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置分页大小。
|
/// 获取或设置分页大小。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
+14
-8
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"complaint_id": "200201820200101080076610000",
|
"complaint_id": "200201820200101080076610000",
|
||||||
"complaint_time": "2015-05-20T13:29:35.120+08:00",
|
"complaint_time": "2015-05-20T13:29:35.120+08:00",
|
||||||
"complaint_detail": "反馈一个重复扣费的问题",
|
"complaint_detail": "反馈一个重复扣费的问题",
|
||||||
"complaint_state": "PENDING",
|
|
||||||
"complainted_mchid": "1900012181",
|
"complainted_mchid": "1900012181",
|
||||||
|
"complaint_state": "PENDING",
|
||||||
"payer_phone": "sGdNeTHMQGlxCWiUyHu6XNO9GCYln2Luv4HhwJzZBfcL12sB",
|
"payer_phone": "sGdNeTHMQGlxCWiUyHu6XNO9GCYln2Luv4HhwJzZBfcL12sB",
|
||||||
"payer_openid": "oUpF8uMuAJO_M2pxb1Q9zNjWeS6o",
|
"payer_openid": "oUpF8uMuAJO_M2pxb1Q9zNjWeS6o",
|
||||||
"complaint_media_list": [
|
"complaint_media_list": [
|
||||||
@@ -21,15 +21,21 @@
|
|||||||
"amount": 3
|
"amount": 3
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"complaint_full_refunded": true,
|
|
||||||
"incoming_user_response": true,
|
|
||||||
"problem_description": "不满意商家服务",
|
|
||||||
"user_complaint_times": 1,
|
|
||||||
"service_order_info": [
|
"service_order_info": [
|
||||||
{
|
{
|
||||||
"order_id": "15646546545165651651",
|
"order_id": "15646546545165651651",
|
||||||
"out_order_no": "1234323JKHDFE1243252",
|
"out_order_no": "1234323JKHDFE1243252",
|
||||||
"state": "CREATED"
|
"state": "DOING"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"complaint_full_refunded": true,
|
||||||
|
"incoming_user_response": true,
|
||||||
|
"problem_description": "不满意商家服务",
|
||||||
|
"user_complaint_times": 1,
|
||||||
|
"additional_info": {
|
||||||
|
"share_power_info": {
|
||||||
|
"return_time": "2023-02-10T14:44:00+08:00"
|
||||||
|
},
|
||||||
|
"type": "SHARE_POWER_TYPE"
|
||||||
}
|
}
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
"data": [
|
"data": [
|
||||||
{
|
{
|
||||||
"complaint_media_list": [
|
"complaint_media_list": {
|
||||||
{
|
|
||||||
"media_type": "USER_COMPLAINT_IMAGE",
|
"media_type": "USER_COMPLAINT_IMAGE",
|
||||||
"media_url": [
|
"media_url": [
|
||||||
"https://api.mch.weixin.qq.com/v3/merchant-service/images/xxxxx"
|
"https://api.mch.weixin.qq.com/v3/merchant-service/images/xxxxx"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
],
|
|
||||||
"log_id": "300285320210322170000071077",
|
"log_id": "300285320210322170000071077",
|
||||||
"operator": "投诉人",
|
"operator": "投诉人",
|
||||||
"operate_time": "2015-05-20T13:29:35.120+08:00",
|
"operate_time": "2015-05-20T13:29:35.120+08:00",
|
||||||
"operate_type": "USER_CREATE_COMPLAINT",
|
"operate_type": "USER_CREATE_COMPLAINT",
|
||||||
"operate_details": "已与用户电话沟通解决",
|
"operate_details": "已与用户电话沟通解决",
|
||||||
"image_list": ["https://qpic.cn/xxx"]
|
"image_list": [
|
||||||
|
"https://qpic.cn/xxx"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"limit": 10,
|
"limit": 50,
|
||||||
"offset": 50,
|
"offset": 50,
|
||||||
"total_count": 1000
|
"total_count": 1000
|
||||||
}
|
}
|
||||||
|
|||||||
+26
-26
@@ -1,12 +1,34 @@
|
|||||||
{
|
{
|
||||||
"data": [
|
"data": [
|
||||||
{
|
{
|
||||||
|
"additional_info": {
|
||||||
|
"share_power_info": {
|
||||||
|
"return_time": "2023-02-10T14:44:00+08:00"
|
||||||
|
},
|
||||||
|
"type": "SHARE_POWER_TYPE"
|
||||||
|
},
|
||||||
"complaint_id": "200201820200101080076610000",
|
"complaint_id": "200201820200101080076610000",
|
||||||
"complaint_time": "2015-05-20T13:29:35.120+08:00",
|
"complaint_time": "2015-05-20T13:29:35.120+08:00",
|
||||||
"complaint_detail": "反馈一个重复扣费的问题",
|
"complaint_detail": "反馈一个重复扣费的问题",
|
||||||
"complaint_state": "PENDING",
|
"complaint_state": "PENDING",
|
||||||
"complainted_mchid": "1900012181",
|
|
||||||
"payer_phone": "Qe41VhP/sGdNeTHMQGlxCWiUyHu6XNO9GCYln2Luv4HhwJzZBfcL12sB+PgZcS5NhePBog30NgJ1xRaK+gbGDKwpg==",
|
"payer_phone": "Qe41VhP/sGdNeTHMQGlxCWiUyHu6XNO9GCYln2Luv4HhwJzZBfcL12sB+PgZcS5NhePBog30NgJ1xRaK+gbGDKwpg==",
|
||||||
|
"complaint_order_info": [
|
||||||
|
{
|
||||||
|
"transaction_id": "4200000404201909069117582536",
|
||||||
|
"out_trade_no": "20190906154617947762231",
|
||||||
|
"amount": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"service_order_info": [
|
||||||
|
{
|
||||||
|
"order_id": "15646546545165651651",
|
||||||
|
"out_order_no": "1234323JKHDFE1243252",
|
||||||
|
"state": "DOING"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"complaint_full_refunded": true,
|
||||||
|
"incoming_user_response": true,
|
||||||
|
"user_complaint_times": 1,
|
||||||
"complaint_media_list": [
|
"complaint_media_list": [
|
||||||
{
|
{
|
||||||
"media_type": "USER_COMPLAINT_IMAGE",
|
"media_type": "USER_COMPLAINT_IMAGE",
|
||||||
@@ -15,32 +37,10 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"complaint_order_info": [
|
"problem_description": "不满意商家服务"
|
||||||
{
|
|
||||||
"transaction_id": "4200000404201909069117582536",
|
|
||||||
"out_trade_no": "20190906154617947762231",
|
|
||||||
"amount": 3
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"transaction_id": "4200000404201909069117582836",
|
|
||||||
"out_trade_no": "20190906154617947762291",
|
|
||||||
"amount": 4
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"complaint_full_refunded": true,
|
|
||||||
"incoming_user_response": true,
|
|
||||||
"problem_description": "不满意商家服务",
|
|
||||||
"user_complaint_times": 1
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"limit": 5,
|
"limit": 5,
|
||||||
"offset": 10,
|
"offset": 10,
|
||||||
"total_count": 1000,
|
"total_count": 1000
|
||||||
"service_order_info": [
|
|
||||||
{
|
|
||||||
"order_id": "15646546545165651651",
|
|
||||||
"out_order_no": "1234323JKHDFE1243252",
|
|
||||||
"state": "CREATED"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user