feat(wxapi): 随官方更新微信小店订单相关接口模型

This commit is contained in:
Fu Diwei 2025-04-07 11:26:04 +08:00
parent 3e3bc62c56
commit 1dd9ebccef
5 changed files with 202 additions and 62 deletions

View File

@ -1,3 +1,5 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
@ -36,10 +38,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// 获取或设置是否支持运费险。
/// </summary>
[Newtonsoft.Json.JsonProperty("freight_insurance")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("freight_insurance")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsFreightInsuranceSupported { get; set; }
public int FreightInsurance { get; set; }
}
public class SKUDeliver
@ -57,6 +57,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("predict_delivery_time")]
[System.Text.Json.Serialization.JsonPropertyName("predict_delivery_time")]
public long? PredictDeliveryTimestamp { get; set; }
/// <summary>
/// 获取或设置预售类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_type")]
[System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_type")]
public int? FullPaymentPresaleDeliveryType { get; set; }
}
public class OrderProductCoupon
@ -120,6 +127,16 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("time_index")]
public int? TimeIndex { get; set; }
}
public class ChangeSKUInfo
{
/// <summary>
/// 获取或设置发货前更换 SKU 是否成功。
/// </summary>
[Newtonsoft.Json.JsonProperty("preshipment_change_sku_success")]
[System.Text.Json.Serialization.JsonPropertyName("preshipment_change_sku_success")]
public bool IsPreshipmentChangeSKUSuccessful { get; set; }
}
}
/// <summary>
@ -180,6 +197,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("thumb_img")]
public string ThumbnailImageUrl { get; set; } = default!;
/// <summary>
/// 获取或设置商品常量编号。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_unique_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_unique_id")]
public string? ProductUniqueId { get; set; }
/// <summary>
/// 获取或设置商品原价(单位:分)。
/// </summary>
@ -321,6 +345,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("is_free_gift")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsFreeGift { get; set; }
/// <summary>
/// 获取或设置额外的服务信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("change_sku_info")]
[System.Text.Json.Serialization.JsonPropertyName("change_sku_info")]
public Types.ChangeSKUInfo? ChangeSKUInfo { get; set; }
}
public class Payment
@ -518,6 +549,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = default!;
/// <summary>
/// 获取或设置快递公司名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_name")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_name")]
public string DeliveryName { get; set; } = default!;
/// <summary>
/// 获取或设置快递单号。
/// </summary>
@ -538,6 +576,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("product_infos")]
[System.Text.Json.Serialization.JsonPropertyName("product_infos")]
public Types.Product[] ProductList { get; set; } = default!;
/// <summary>
/// 获取或设置发货地址信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_address")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_address")]
public Address? DeliveryAddress { get; set; }
}
public class Address : ChannelsECMerchantAddressGetResponse.Types.AddressDetail.Types.Address
@ -770,6 +815,66 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public int? OrderScene { get; set; }
}
public class Commission
{
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[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; }
/// <summary>
/// 获取或设置分账方昵称。
/// </summary>
[Newtonsoft.Json.JsonProperty("nickname")]
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
public string Nickname { get; set; } = default!;
/// <summary>
/// 获取或设置分账方类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
public int Type { get; set; }
/// <summary>
/// 获取或设置分账状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
/// <summary>
/// 获取或设置分账金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("amount")]
[System.Text.Json.Serialization.JsonPropertyName("amount")]
public int Amount { get; set; }
/// <summary>
/// 获取或设置达人视频号 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("finder_id")]
[System.Text.Json.Serialization.JsonPropertyName("finder_id")]
public string? FinderId { get; set; }
/// <summary>
/// 获取或设置达人 OpenFinderId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openfinderid")]
[System.Text.Json.Serialization.JsonPropertyName("openfinderid")]
public string? OpenFinderId { get; set; }
/// <summary>
/// 获取或设置新带货平台 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("talent_id")]
[System.Text.Json.Serialization.JsonPropertyName("talent_id")]
public string? TalentId { get; set; }
}
public class Settlement
{
/// <summary>
@ -943,6 +1048,30 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("refund_freight")]
public int? RefundFreight { get; set; }
}
public class GreetingCard
{
/// <summary>
/// 获取或设置贺卡落款。
/// </summary>
[Newtonsoft.Json.JsonProperty("giver_name")]
[System.Text.Json.Serialization.JsonPropertyName("giver_name")]
public string? GiverName { get; set; }
/// <summary>
/// 获取或设置贺卡称谓。
/// </summary>
[Newtonsoft.Json.JsonProperty("receiver_name")]
[System.Text.Json.Serialization.JsonPropertyName("receiver_name")]
public string? ReceiverName { get; set; }
/// <summary>
/// 获取或设置贺卡内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("greeting_message")]
[System.Text.Json.Serialization.JsonPropertyName("greeting_message")]
public string? GreetingMessage { get; set; }
}
}
/// <summary>
@ -987,6 +1116,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("ext_info")]
public Types.Extra? Extra { get; set; }
/// <summary>
/// 获取或设置分佣信息列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("commission_infos")]
[System.Text.Json.Serialization.JsonPropertyName("commission_infos")]
public Types.Commission[]? CommissionList { get; set; }
/// <summary>
/// 获取或设置结算信息。
/// </summary>
@ -1028,6 +1164,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("refund_info")]
[System.Text.Json.Serialization.JsonPropertyName("refund_info")]
public Types.Refund? Refund { get; set; }
/// <summary>
/// 获取或设置需代写的商品贺卡信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("greeting_card_info")]
[System.Text.Json.Serialization.JsonPropertyName("greeting_card_info")]
public Types.GreetingCard? GreetingCard { get; set; }
}
public class AftersaleDetail
@ -1047,6 +1190,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary>
/// 获取或设置售后单状态。
/// </summary>
[Obsolete("相关接口或字段于 2025-02-07 下线。")]
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
@ -1147,6 +1291,20 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("present_note")]
[System.Text.Json.Serialization.JsonPropertyName("present_note")]
public string? PresentNote { get; set; }
/// <summary>
/// 获取或设置礼物订单赠送者 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("present_giver_openid")]
[System.Text.Json.Serialization.JsonPropertyName("present_giver_openid")]
public string? PresentGiverOpenId { get; set; }
/// <summary>
/// 获取或设置礼物订单赠送者 UnionId。
/// </summary>
[Newtonsoft.Json.JsonProperty("present_giver_unionid")]
[System.Text.Json.Serialization.JsonPropertyName("present_giver_unionid")]
public string? PresentGiverUnionId { get; set; }
}
}

View File

@ -199,37 +199,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Obsolete("相关接口或字段于 2024-08-05 下线。")]
[Newtonsoft.Json.JsonProperty("pay_after_use")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("pay_after_use")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsPayAfterUseSupported { get; set; }
public int PayAfterUse { get; set; }
/// <summary>
/// 获取或设置是否支持运费险。
/// </summary>
[Newtonsoft.Json.JsonProperty("freight_insurance")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("freight_insurance")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsFreightInsuranceSupported { get; set; }
public int FreightInsurance { get; set; }
/// <summary>
/// 获取或设置是否支持假一赔三。
/// </summary>
[Newtonsoft.Json.JsonProperty("fake_one_pay_three")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("fake_one_pay_three")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsFakeOnePayThreeSupported { get; set; }
public int? FakeOnePayThree { get; set; }
/// <summary>
/// 获取或设置是否支持坏损包退。
/// </summary>
[Newtonsoft.Json.JsonProperty("damage_guarantee")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("damage_guarantee")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsDamageGuaranteeSupported { get; set; }
public int? DamageGuarantee { get; set; }
}
public class Aftersale

View File

@ -161,28 +161,22 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// 获取或设置是否支持运费险。
/// </summary>
[Newtonsoft.Json.JsonProperty("freight_insurance")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("freight_insurance")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsFreightInsuranceSupported { get; set; }
public int? FreightInsurance { get; set; }
/// <summary>
/// 获取或设置是否支持假一赔三。
/// </summary>
[Newtonsoft.Json.JsonProperty("fake_one_pay_three")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("fake_one_pay_three")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsFakeOnePayThreeSupported { get; set; }
public int? FakeOnePayThree { get; set; }
/// <summary>
/// 获取或设置是否支持坏损包退。
/// </summary>
[Newtonsoft.Json.JsonProperty("damage_guarantee")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("damage_guarantee")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsDamageGuaranteeSupported { get; set; }
public int? DamageGuarantee { get; set; }
}
}

View File

@ -219,37 +219,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Obsolete("相关接口或字段于 2024-08-05 下线。")]
[Newtonsoft.Json.JsonProperty("pay_after_use")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("pay_after_use")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsPayAfterUseSupported { get; set; }
public int PayAfterUse { get; set; }
/// <summary>
/// 获取或设置是否支持运费险。
/// </summary>
[Newtonsoft.Json.JsonProperty("freight_insurance")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("freight_insurance")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsFreightInsuranceSupported { get; set; }
public int FreightInsurance { get; set; }
/// <summary>
/// 获取或设置是否支持假一赔三。
/// </summary>
[Newtonsoft.Json.JsonProperty("fake_one_pay_three")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("fake_one_pay_three")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsFakeOnePayThreeSupported { get; set; }
public int? FakeOnePayThree { get; set; }
/// <summary>
/// 获取或设置是否支持坏损包退。
/// </summary>
[Newtonsoft.Json.JsonProperty("damage_guarantee")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("damage_guarantee")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool? IsDamageGuaranteeSupported { get; set; }
public int? DamageGuarantee { get; set; }
}
public class Aftersale

View File

@ -9,8 +9,8 @@
"order_detail": {
"product_infos": [
{
"product_id": 234245,
"sku_id": 23424,
"product_id": "234245",
"sku_id": "23424",
"sku_cnt": 10,
"on_aftersale_sku_cnt": 10,
"finish_aftersale_sku_cnt": 0,
@ -18,29 +18,34 @@
"thumb_img": "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ",
"sale_price": 2000,
"market_price": 2000,
"sku_code": "18236414",
"sku_attrs": [
{
"attr_key": "个数",
"attr_value": "一套"
}
],
"real_price": 1900,
"out_product_id": "88",
"out_sku_id": "248",
"out_warehouse_id": "",
"sku_deliver_info": {
"stock_type": 0
"attr_key": "产地",
"attr_value": "四川成都"
},
"extra_service": {
"seven_day_return": 1,
"freight_insurance": 0
},
"voucher_list": [
{
"voucher_code": "12345",
"voucher_type": 1,
"voucher_buy_amount": 10000
"attr_key": "材质",
"attr_value": "玻璃"
},
{
"attr_key": "适用人群",
"attr_value": "青年;中年"
},
{
"attr_key": "数量",
"attr_value": "33"
},
{
"attr_key": "精度",
"attr_value": "3.001"
},
{
"attr_key": "重量",
"attr_value": "38 mg"
},
{
"attr_key": "毛重",
"attr_value": "380 kg"
}
]
}
@ -85,8 +90,7 @@
}
],
"ship_done_time": 1620738080,
"deliver_method": 0,
"ewaybill_order_code": "ofskfRaaNSxitNLtwCqOfLMIO4r5ZEOXXVTGjf_g_4LuMzRPsZn2CnTn97xWg3AxHoZQXydN8iQA"
"deliver_method": 0
},
"coupon_info": {
"user_coupon_id": "301234567890"
@ -97,6 +101,7 @@
"finder_id": "sph3FZbOEY46mAB",
"live_id": "export/UzFfAgtgekIEAQAAAAAAt40WWe5njQAAAAstQy6ubaLX4KHWvLEZgBPE5KNoYRJdUeaEzNPgMJq4tEJ8QSCaA2N_Iua2abcd",
"order_scene": 2
},
"sharer_info": {
"sharer_openid": "SHAREROPENID",
@ -128,7 +133,6 @@
],
"on_aftersale_order_cnt": 1
},
"openid": "OPENID",
"unionid": "UNIONID"
"openid": "OPENID"
}
}