From c5742c34616ecb5c72635bf7ef5886ca8d733a0a Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 5 Feb 2026 17:53:57 +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=95=86?= =?UTF-8?q?=E5=93=81=E7=9B=B8=E5=85=B3=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 --- .../ECProduct/ChannelsECProductAddRequest.cs | 59 +++++-- .../ChannelsECProductAuditFreeRequest.cs | 78 +++++---- .../ECProduct/ChannelsECProductGetResponse.cs | 149 +++++++++++++++++- .../ChannelsECProductUpdateRequest.cs | 15 +- 4 files changed, 249 insertions(+), 52 deletions(-) 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 0cbef263..7e154cbe 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAddRequest.cs @@ -134,45 +134,54 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("sku_deliver_info")] [System.Text.Json.Serialization.JsonPropertyName("sku_deliver_info")] - public SKUDeliver? SKUDeliver { get; set; } + public SKUDeliverInfo? SKUDeliverInfo { get; set; } } - public class SKUDeliver + public class SKUDeliverInfo { /// /// 获取或设置 SKU 库存情况。 /// [Newtonsoft.Json.JsonProperty("stock_type")] [System.Text.Json.Serialization.JsonPropertyName("stock_type")] - public int StockType { get; set; } - - /// - /// 获取或设置 SKU 发货节点。 - /// - [Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_type")] - [System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_type")] - public int FullPaymentPresaleDeliveryType { get; set; } + public int? StockType { get; set; } /// /// 获取或设置 SKU 预售周期开始时间戳。 /// [Newtonsoft.Json.JsonProperty("presale_begin_time")] [System.Text.Json.Serialization.JsonPropertyName("presale_begin_time")] - public long PresaleBeginTimestamp { get; set; } + public long? PresaleBeginTimestamp { get; set; } /// /// 获取或设置 SKU 预售周期结束时间戳。 /// [Newtonsoft.Json.JsonProperty("presale_end_time")] [System.Text.Json.Serialization.JsonPropertyName("presale_end_time")] - public long PresaleEndTimestamp { get; set; } + public long? PresaleEndTimestamp { get; set; } + + /// + /// 获取或设置 SKU 发货节点。 + /// + [Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_type")] + [System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_type")] + public int? FullPaymentPresaleDeliveryType { get; set; } /// /// 获取或设置 SKU 发货时效。 /// [Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_time")] [System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_time")] - public int FullPaymentPresaleDeliveryTime { get; set; } + public int? FullPaymentPresaleDeliveryTime { get; set; } + + /// + /// 获取或设置是否在预售结束后自动转为现货。 + /// + [Newtonsoft.Json.JsonProperty("spot_after_presale_end")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("spot_after_presale_end")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool? IsSpotAfterPresaleEnd { get; set; } } public class Limitation @@ -375,6 +384,23 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool? IsHidePrice { get; set; } } + + public class SPUDeliverInfo + { + /// + /// 获取或设置是否生效。 + /// + [Newtonsoft.Json.JsonProperty("is_spu_range")] + [System.Text.Json.Serialization.JsonPropertyName("is_spu_range")] + public bool IsSPURange { get; set; } + + /// + /// 获取或设置商品预售信息。 + /// + [Newtonsoft.Json.JsonProperty("sku_deliver_info")] + [System.Text.Json.Serialization.JsonPropertyName("sku_deliver_info")] + public SKUDeliverInfo? SKUDeliverInfo { get; set; } + } } /// @@ -543,6 +569,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("timing_onsale_info")] public Types.TimingOnSale? TimingOnSale { get; set; } + /// + /// 获取或设置商品预售信息。 + /// + [Newtonsoft.Json.JsonProperty("spu_deliver_info")] + [System.Text.Json.Serialization.JsonPropertyName("spu_deliver_info")] + public Types.SPUDeliverInfo? SPUDeliverInfo { get; set; } + /// /// 获取或设置发布模式。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAuditFreeRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAuditFreeRequest.cs index d9888336..f1d398ce 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAuditFreeRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductAuditFreeRequest.cs @@ -30,42 +30,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models public int DiffCount { get; set; } } - public class SKUDeliverInfo + public class SKUDeliverInfo : ChannelsECProductAddRequest.Types.SKUDeliverInfo { - /// - /// 获取或设置 SKU 库存情况。 - /// - [Newtonsoft.Json.JsonProperty("stock_type")] - [System.Text.Json.Serialization.JsonPropertyName("stock_type")] - public int StockType { get; set; } - - /// - /// 获取或设置 SKU 发货节点。 - /// - [Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_type")] - [System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_type")] - public int? FullPaymentPresaleDeliveryType { get; set; } - - /// - /// 获取或设置 SKU 预售周期开始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("presale_begin_time")] - [System.Text.Json.Serialization.JsonPropertyName("presale_begin_time")] - public long? PresaleBeginTimestamp { get; set; } - - /// - /// 获取或设置 SKU 预售周期结束时间戳。 - /// - [Newtonsoft.Json.JsonProperty("presale_end_time")] - [System.Text.Json.Serialization.JsonPropertyName("presale_end_time")] - public long? PresaleEndTimestamp { get; set; } - - /// - /// 获取或设置 SKU 发货时效。 - /// - [Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_time")] - [System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_time")] - public int FullPaymentPresaleDeliveryTime { get; set; } } } @@ -185,6 +151,34 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("exchange_support")] public int? ExchangeSupport { get; set; } } + + public class TimingOnSale : ChannelsECProductUpdateRequest.Types.TimingOnSale + { + } + + public class SPUDeliverInfo + { + public static class Types + { + public class SKUDeliverInfo : ChannelsECProductUpdateRequest.Types.SKUDeliverInfo + { + } + } + + /// + /// 获取或设置是否生效。 + /// + [Newtonsoft.Json.JsonProperty("is_spu_range")] + [System.Text.Json.Serialization.JsonPropertyName("is_spu_range")] + public bool? IsSPURange { get; set; } + + /// + /// 获取或设置商品预售信息。 + /// + [Newtonsoft.Json.JsonProperty("sku_deliver_info")] + [System.Text.Json.Serialization.JsonPropertyName("sku_deliver_info")] + public Types.SKUDeliverInfo? SKUDeliverInfo { get; set; } + } } /// @@ -235,5 +229,19 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("extra_service")] [System.Text.Json.Serialization.JsonPropertyName("extra_service")] public Types.ExtraService? ExtraService { get; set; } + + /// + /// 获取或设置待开售信息。 + /// + [Newtonsoft.Json.JsonProperty("timing_onsale_info")] + [System.Text.Json.Serialization.JsonPropertyName("timing_onsale_info")] + public Types.TimingOnSale? TimingOnSale { get; set; } + + /// + /// 获取或设置商品预售信息。 + /// + [Newtonsoft.Json.JsonProperty("spu_deliver_info")] + [System.Text.Json.Serialization.JsonPropertyName("spu_deliver_info")] + public Types.SPUDeliverInfo? SPUDeliverInfo { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs index 9c11cb72..8feefaaa 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs @@ -154,10 +154,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("sku_deliver_info")] [System.Text.Json.Serialization.JsonPropertyName("sku_deliver_info")] - public SKUDeliver? SKUDeliver { get; set; } + public SKUDeliverInfo? SKUDeliverInfo { get; set; } } - public class SKUDeliver + public class SKUDeliverInfo { /// /// 获取或设置 SKU 库存情况。 @@ -193,6 +193,15 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_time")] [System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_time")] public int FullPaymentPresaleDeliveryTime { get; set; } + + /// + /// 获取或设置是否在预售结束后自动转为现货。 + /// + [Newtonsoft.Json.JsonProperty("spot_after_presale_end")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanReadOnlyConverter))] + [System.Text.Json.Serialization.JsonPropertyName("spot_after_presale_end")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanReadOnlyConverter))] + public bool IsSpotAfterPresaleEnd { get; set; } } public class Limitation @@ -404,6 +413,23 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("task_id")] public long? TaskId { get; set; } } + + public class SPUDeliverInfo + { + /// + /// 获取或设置是否生效。 + /// + [Newtonsoft.Json.JsonProperty("is_spu_range")] + [System.Text.Json.Serialization.JsonPropertyName("is_spu_range")] + public bool IsSPURange { get; set; } + + /// + /// 获取或设置商品预售信息。 + /// + [Newtonsoft.Json.JsonProperty("sku_deliver_info")] + [System.Text.Json.Serialization.JsonPropertyName("sku_deliver_info")] + public SKUDeliverInfo? SKUDeliverInfo { get; set; } + } } /// @@ -606,6 +632,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("timing_onsale_info")] public Types.TimingOnSale? TimingOnSale { get; set; } + /// + /// 获取或设置商品预售信息。 + /// + [Newtonsoft.Json.JsonProperty("spu_deliver_info")] + [System.Text.Json.Serialization.JsonPropertyName("spu_deliver_info")] + public Types.SPUDeliverInfo? SPUDeliverInfo { get; set; } + /// /// 获取或设置发布模式。 /// @@ -639,6 +672,97 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("sub_title")] public string? SubTitle { get; set; } } + + public class InfoScoreInfo + { + public static class Types + { + public class SubScore + { + /// + /// 获取或设置字段名。 + /// + [Newtonsoft.Json.JsonProperty("busi_data_field_api")] + [System.Text.Json.Serialization.JsonPropertyName("busi_data_field_api")] + public string Field { get; set; } = default!; + + /// + /// 获取或设置字段描述。 + /// + [Newtonsoft.Json.JsonProperty("field_name")] + [System.Text.Json.Serialization.JsonPropertyName("field_name")] + public string FieldName { get; set; } = default!; + + /// + /// 获取或设置审核备注。 + /// + [Newtonsoft.Json.JsonProperty("audit_remark")] + [System.Text.Json.Serialization.JsonPropertyName("audit_remark")] + public string? AuditRemark { get; set; } + } + } + + /// + /// 获取或设置商品信息质量总分等级。 + /// + [Newtonsoft.Json.JsonProperty("release_mode")] + [System.Text.Json.Serialization.JsonPropertyName("release_mode")] + public int ScoreLevel { get; set; } + + /// + /// 获取或设置商品信息质量子项列表。 + /// + [Newtonsoft.Json.JsonProperty("sub_score_list")] + [System.Text.Json.Serialization.JsonPropertyName("sub_score_list")] + public Types.SubScore[] SubScoreList { get; set; } = default!; + } + + public class CMPPriceInfo + { + public static class Types + { + public class SKUResult + { + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public long SKUId { get; set; } + + /// + /// 获取或设置是否被检测为高价。 + /// + [Newtonsoft.Json.JsonProperty("is_expensive_warning")] + [System.Text.Json.Serialization.JsonPropertyName("is_expensive_warning")] + public bool IsExpensiveWarning { get; set; } + } + } + + /// + /// 获取或设置检测状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置 SKU 高价预警检测结果。 + /// + [Newtonsoft.Json.JsonProperty("sku_result_list")] + [System.Text.Json.Serialization.JsonPropertyName("sku_result_list")] + public Types.SKUResult[] SKUResultList { get; set; } = default!; + } + + public class AuditInfo + { + /// + /// 获取或设置提审的商品上架策略开关列表。 + /// + [Newtonsoft.Json.JsonProperty("user_strategy_flag_list")] + [System.Text.Json.Serialization.JsonPropertyName("user_strategy_flag_list")] + public int[]? UserStrategyFlagList { get; set; } + } } /// @@ -661,5 +785,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [Newtonsoft.Json.JsonProperty("sale_limit_info")] [System.Text.Json.Serialization.JsonPropertyName("sale_limit_info")] public Types.SaleLimitInfo? SaleLimitInfo { get; set; } + + /// + /// 获取或设置信息质量信息。 + /// + [Newtonsoft.Json.JsonProperty("info_score")] + [System.Text.Json.Serialization.JsonPropertyName("info_score")] + public Types.InfoScoreInfo? InfoScoreInfo { get; set; } + + /// + /// 获取或设置商品高价预警信息。 + /// + [Newtonsoft.Json.JsonProperty("cmp_price_info")] + [System.Text.Json.Serialization.JsonPropertyName("cmp_price_info")] + public Types.CMPPriceInfo? CMPPriceInfo { get; set; } + + /// + /// 获取或设置审核信息。 + /// + [Newtonsoft.Json.JsonProperty("audit_info")] + [System.Text.Json.Serialization.JsonPropertyName("audit_info")] + public Types.AuditInfo? AuditInfo { 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 c43255cb..28b6e5cd 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductUpdateRequest.cs @@ -96,10 +96,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("sku_deliver_info")] [System.Text.Json.Serialization.JsonPropertyName("sku_deliver_info")] - public SKUDeliver? SKUDeliver { get; set; } + public SKUDeliverInfo? SKUDeliverInfo { get; set; } } - public class SKUDeliver : ChannelsECProductAddRequest.Types.SKUDeliver + public class SKUDeliverInfo : ChannelsECProductAddRequest.Types.SKUDeliverInfo { } @@ -138,6 +138,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models public class TimingOnSale : ChannelsECProductAddRequest.Types.TimingOnSale { } + + public class SPUDeliverInfo : ChannelsECProductAddRequest.Types.SPUDeliverInfo + { + } } /// @@ -306,6 +310,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models [System.Text.Json.Serialization.JsonPropertyName("timing_onsale_info")] public Types.TimingOnSale? TimingOnSale { get; set; } + /// + /// 获取或设置商品预售信息。 + /// + [Newtonsoft.Json.JsonProperty("spu_deliver_info")] + [System.Text.Json.Serialization.JsonPropertyName("spu_deliver_info")] + public Types.SPUDeliverInfo? SPUDeliverInfo { get; set; } + /// /// 获取或设置发布模式。 ///