From 4c9f605049e12265dd607093d6623ee6e0aa156b Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sat, 1 Feb 2025 00:03:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(wxapi):=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=B0=8F=E5=BA=97=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E3=80=81=E5=95=86=E5=93=81=E3=80=81=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E3=80=81=E5=94=AE=E5=90=8E=E5=8D=95=E7=AD=89=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=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 --- ...elsECAftersaleGetAftersaleOrderResponse.cs | 41 +++++ .../ChannelsECCategoryAllResponse.cs | 7 + .../ChannelsECCategoryDetailResponse.cs | 21 +++ ...nnelsECLogisticsEWaybillPrintGetRequest.cs | 7 + .../ECOrder/ChannelsECOrderGetResponse.cs | 151 ++++++++++++++++++ .../ECProduct/ChannelsECProductAddRequest.cs | 9 +- .../ChannelsECProductUpdateRequest.cs | 9 +- ...sECAftersaleGetAftersaleOrderResponse.json | 8 + 8 files changed, 251 insertions(+), 2 deletions(-) diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.cs index bd3f480c..2c029d3b 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.cs @@ -24,6 +24,40 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("vourcher_code")] public string VoucherCode { get; set; } = default!; } + + public class GiftProduct + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long SKUId { get; set; } + + /// + /// 获取或设置商品数量。 + /// + [Newtonsoft.Json.JsonProperty("count")] + [System.Text.Json.Serialization.JsonPropertyName("count")] + public int Count { get; set; } + + /// + /// 获取或设置活动 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long TaskId { get; set; } + } } /// @@ -55,6 +89,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("voucher_list")] [System.Text.Json.Serialization.JsonPropertyName("voucher_list")] public Types.Voucher[]? VoucherList { get; set; } + + /// + /// 获取或设置赠品列表。 + /// + [Newtonsoft.Json.JsonProperty("gift_product_list")] + [System.Text.Json.Serialization.JsonPropertyName("gift_product_list")] + public Types.GiftProduct[]? GiftProductList { get; set; } } public class AftersaleDetail diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAllResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAllResponse.cs index d67926a7..518dcd92 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAllResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryAllResponse.cs @@ -133,6 +133,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("brand_qua")] [System.Text.Json.Serialization.JsonPropertyName("brand_qua")] public Types.Qualification? BrandQualification { get; set; } + + /// + /// 获取或设置是否放心买必须打开坏损包赔。 + /// + [Newtonsoft.Json.JsonProperty("is_confidence_require_bad_must_pay")] + [System.Text.Json.Serialization.JsonPropertyName("is_confidence_require_bad_must_pay")] + public bool? IsConfidenceRequireBadMustPay { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailResponse.cs index ac1b0b97..d67411e0 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECCategory/ChannelsECCategoryDetailResponse.cs @@ -319,12 +319,33 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] public int? FloorPrice { get; set; } + /// + /// 获取或设置收货时间选项。 + /// + [Newtonsoft.Json.JsonProperty("confirm_receipt_days")] + [System.Text.Json.Serialization.JsonPropertyName("confirm_receipt_days")] + public string[]? ConfirmReceiptDays { get; set; } + /// /// 获取或设置商品编辑要求信息。 /// [Newtonsoft.Json.JsonProperty("product_requirement")] [System.Text.Json.Serialization.JsonPropertyName("product_requirement")] public Types.ProductRequirement? ProductRequirement { get; set; } + + /// + /// 获取或设置尺码表列表。 + /// + [Newtonsoft.Json.JsonProperty("size_chart")] + [System.Text.Json.Serialization.JsonPropertyName("size_chart")] + public Types.SizeChart[]? SizeChartList { get; set; } + + /// + /// 获取或设置是否放心买必须打开坏损包赔。 + /// + [Newtonsoft.Json.JsonProperty("is_confidence_require_bad_must_pay")] + [System.Text.Json.Serialization.JsonPropertyName("is_confidence_require_bad_must_pay")] + public bool? IsConfidenceRequireBadMustPay { get; set; } } public class Qualification : ChannelsECCategoryAllResponse.Types.Category.Types.CategoryAndQualification.Types.Qualification diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECLogistics/EWaybill/Print/ChannelsECLogisticsEWaybillPrintGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECLogistics/EWaybill/Print/ChannelsECLogisticsEWaybillPrintGetRequest.cs index a9a8d4bb..2e413db5 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECLogistics/EWaybill/Print/ChannelsECLogisticsEWaybillPrintGetRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECLogistics/EWaybill/Print/ChannelsECLogisticsEWaybillPrintGetRequest.cs @@ -18,5 +18,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("template_id")] [System.Text.Json.Serialization.JsonPropertyName("template_id")] public string TemplateId { get; set; } = string.Empty; + + /// + /// 获取或设置子单的物流单号。 + /// + [Newtonsoft.Json.JsonProperty("sub_waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("sub_waybill_id")] + public string? SubWaybillId { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs index 703e6537..7f1b0304 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs @@ -61,12 +61,33 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models public class OrderProductCoupon { + /// + /// 获取或设置优惠券类型。 + /// + [Newtonsoft.Json.JsonProperty("coupon_type")] + [System.Text.Json.Serialization.JsonPropertyName("coupon_type")] + public int CouponType { get; set; } + /// /// 获取或设置用户优惠券 ID。 /// [Newtonsoft.Json.JsonProperty("user_coupon_id")] [System.Text.Json.Serialization.JsonPropertyName("user_coupon_id")] public string? UserCouponId { get; set; } + + /// + /// 获取或设置优惠券 ID。 + /// + [Newtonsoft.Json.JsonProperty("coupon_id")] + [System.Text.Json.Serialization.JsonPropertyName("coupon_id")] + public string? CouponId { get; set; } + + /// + /// 获取或设置优惠金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("discounted_price")] + [System.Text.Json.Serialization.JsonPropertyName("discounted_price")] + public int? DiscountedPrice { get; set; } } public class Voucher @@ -595,6 +616,30 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("inspect_status")] public int InspectStatus { get; set; } } + + public class Recharge + { + /// + /// 获取或设置账号充值类型。 + /// + [Newtonsoft.Json.JsonProperty("account_type")] + [System.Text.Json.Serialization.JsonPropertyName("account_type")] + public string? AccountType { get; set; } + + /// + /// 获取或设置虚拟商品充值账号。 + /// + [Newtonsoft.Json.JsonProperty("account_no")] + [System.Text.Json.Serialization.JsonPropertyName("account_no")] + public string? AccountNumber { get; set; } + + /// + /// 获取或设置用户的微信 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("wx_openid")] + [System.Text.Json.Serialization.JsonPropertyName("wx_openid")] + public string? WxOpenId { get; set; } + } } /// @@ -661,6 +706,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("quality_inspect_info")] [System.Text.Json.Serialization.JsonPropertyName("quality_inspect_info")] public Types.QualityInspection? QualityInspection { get; set; } + + /// + /// 获取或设置虚拟商品充值账户信息。 + /// + [Newtonsoft.Json.JsonProperty("recharge_info")] + [System.Text.Json.Serialization.JsonPropertyName("recharge_info")] + public Types.Recharge? Recharge { get; set; } } public class Coupon @@ -828,6 +880,69 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("agent_finder_nickname")] public string AgentFinderNickname { get; set; } = default!; } + + public class Source + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long SKUId { get; set; } + + /// + /// 获取或设置账号关联类型。 + /// + [Newtonsoft.Json.JsonProperty("sale_channel")] + [System.Text.Json.Serialization.JsonPropertyName("sale_channel")] + public int SaleChannel { get; set; } + + /// + /// 获取或设置带货账号类型。 + /// + [Newtonsoft.Json.JsonProperty("account_type")] + [System.Text.Json.Serialization.JsonPropertyName("account_type")] + public int AccountType { get; set; } + + /// + /// 获取或设置带货账号 ID。 + /// + [Newtonsoft.Json.JsonProperty("account_id")] + [System.Text.Json.Serialization.JsonPropertyName("account_id")] + public string? AccountId { get; set; } + + /// + /// 获取或设置带货账号昵称。 + /// + [Newtonsoft.Json.JsonProperty("account_nickname")] + [System.Text.Json.Serialization.JsonPropertyName("account_nickname")] + public string? AccountNickname { get; set; } + + /// + /// 获取或设置带货内容类型。 + /// + [Newtonsoft.Json.JsonProperty("content_type")] + [System.Text.Json.Serialization.JsonPropertyName("content_type")] + public int ContentType { get; set; } + + /// + /// 获取或设置带货内容 ID。 + /// + [Newtonsoft.Json.JsonProperty("content_id")] + [System.Text.Json.Serialization.JsonPropertyName("content_id")] + public string? ContentId { get; set; } + } + + public class Refund + { + /// + /// 获取或设置退还运费金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("refund_freight")] + [System.Text.Json.Serialization.JsonPropertyName("refund_freight")] + public int? RefundFreight { get; set; } + } } /// @@ -899,6 +1014,20 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("agent_info")] [System.Text.Json.Serialization.JsonPropertyName("agent_info")] public Types.AgentFinder? AgentFinder { get; set; } + + /// + /// 获取或设置订单来源列表。 + /// + [Newtonsoft.Json.JsonProperty("source_infos")] + [System.Text.Json.Serialization.JsonPropertyName("source_infos")] + public Types.Source[]? SourceList { get; set; } + + /// + /// 获取或设置退款信息。 + /// + [Newtonsoft.Json.JsonProperty("refund_info")] + [System.Text.Json.Serialization.JsonPropertyName("refund_info")] + public Types.Refund? Refund { get; set; } } public class AftersaleDetail @@ -996,6 +1125,28 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("create_time")] [System.Text.Json.Serialization.JsonPropertyName("create_time")] public long CreateTimestamp { get; set; } + + /// + /// 获取或设置是否礼物订单。 + /// + [Newtonsoft.Json.JsonProperty("is_present")] + [System.Text.Json.Serialization.JsonPropertyName("is_present")] + public bool IsPresent { get; set; } + + /// + /// 获取或设置礼物订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("present_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("present_order_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string? PresentOrderId { get; set; } + + /// + /// 获取或设置礼物订单留言。 + /// + [Newtonsoft.Json.JsonProperty("present_note")] + [System.Text.Json.Serialization.JsonPropertyName("present_note")] + public string? PresentNote { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs index c4a06f23..05c575c7 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs @@ -106,7 +106,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("stock_num")] [System.Text.Json.Serialization.JsonPropertyName("stock_num")] - public int Stock { get; set; } + public int? Stock { get; set; } /// /// 获取或设置商品编码。 @@ -439,6 +439,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("deliver_method")] public int? DeliverMethod { get; set; } + /// + /// 获取或设置发货账号类型列表。 + /// + [Newtonsoft.Json.JsonProperty("deliver_acct_type")] + [System.Text.Json.Serialization.JsonPropertyName("deliver_acct_type")] + public IList? DeliverAccountTypeList { get; set; } + /// /// 获取或设置运费信息。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs index 829cc1ef..86004385 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs @@ -68,7 +68,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("stock_num")] [System.Text.Json.Serialization.JsonPropertyName("stock_num")] - public int Stock { get; set; } + public int? Stock { get; set; } /// /// 获取或设置商品编码。 @@ -223,6 +223,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("deliver_method")] public int? DeliverMethod { get; set; } + /// + /// 获取或设置发货账号类型列表。 + /// + [Newtonsoft.Json.JsonProperty("deliver_acct_type")] + [System.Text.Json.Serialization.JsonPropertyName("deliver_acct_type")] + public IList? DeliverAccountTypeList { get; set; } + /// /// 获取或设置运费信息。 /// diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.json index 0c86298e..6c31ba6e 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECAftersale/ChannelsECAftersaleGetAftersaleOrderResponse.json @@ -16,6 +16,14 @@ { "vourcher_code": "232324" } + ], + "gift_product_list": [ + { + "product_id": "123", + "sku_id": "456", + "count": 1, + "task_id": 234 + } ] }, "details": {