From 5aa589d6b42d7a07fe19d432589b14bf7bd13bb2 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sat, 31 Jul 2021 18:48:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(wxapi):=20=E4=BF=AE=E5=A4=8D=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=BA=A4=E6=98=93=E7=BB=84=E4=BB=B6=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=BF=AB=E9=80=92=E5=85=AC=E5=8F=B8=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=A8=A1=E5=9E=8B=E7=9A=84=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShopDeliveryGetCompanyListResponse.cs | 18 +++-------- .../ShopDeliveryGetCompanyListResponse.json | 30 +++++++++---------- 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Delivery/ShopDeliveryGetCompanyListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Delivery/ShopDeliveryGetCompanyListResponse.cs index aa637815..85a0c8d0 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Delivery/ShopDeliveryGetCompanyListResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Shop/Delivery/ShopDeliveryGetCompanyListResponse.cs @@ -10,17 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models { public static class Types { - public class DeliveryCompanyList - { - /// - /// 获取或设置快递公司列表。 - /// - [Newtonsoft.Json.JsonProperty("company_list")] - [System.Text.Json.Serialization.JsonPropertyName("company_list")] - public DeliveryCompanyItem[] Items { get; set; } = default!; - } - - public class DeliveryCompanyItem + public class DeliveryCompany { /// /// 获取或设置快递公司 ID。 @@ -41,8 +31,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// /// 获取或设置快递公司列表。 /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.DeliveryCompanyList DeliveryCompanyList { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("company_list")] + [System.Text.Json.Serialization.JsonPropertyName("company_list")] + public Types.DeliveryCompany[] DeliveryCompanyList { get; set; } = default!; } } diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Shop/Delivery/ShopDeliveryGetCompanyListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Shop/Delivery/ShopDeliveryGetCompanyListResponse.json index 0f65583e..b54ee663 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Shop/Delivery/ShopDeliveryGetCompanyListResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Shop/Delivery/ShopDeliveryGetCompanyListResponse.json @@ -1,20 +1,18 @@ { "errcode": 0, "errmsg": "ok", - "data": { - "company_list": [ - { - "delivery_id": "SF", - "delivery_name": "顺丰速运" - }, - { - "delivery_id": "YTO", - "delivery_name": "圆通快速" - }, - { - "delivery_id": "ZTO", - "delivery_name": "中通快速" - } - ] - } + "company_list": [ + { + "delivery_id": "SF", + "delivery_name": "顺丰速运" + }, + { + "delivery_id": "YTO", + "delivery_name": "圆通快速" + }, + { + "delivery_id": "ZTO", + "delivery_name": "中通快速" + } + ] } \ No newline at end of file