feat(wxapi): 随官方更新视频号小店商品分类相关接口模型

This commit is contained in:
Fu Diwei
2024-11-04 21:02:36 +08:00
parent bbe04ba535
commit 949c3cd886
20 changed files with 262 additions and 27 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models namespace SKIT.FlurlHttpClient.Wechat.Api.Models
@@ -13,6 +14,16 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{ {
public static class Types public static class Types
{ {
public class Category
{
/// <summary>
/// 获取或设置分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("cat_id")]
[System.Text.Json.Serialization.JsonPropertyName("cat_id")]
public long CategoryId { get; set; }
}
public class Brand public class Brand
{ {
/// <summary> /// <summary>
@@ -27,23 +38,33 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary> /// <summary>
/// 获取或设置一级类目 ID。 /// 获取或设置一级类目 ID。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("level1")] [Newtonsoft.Json.JsonProperty("level1")]
[System.Text.Json.Serialization.JsonPropertyName("level1")] [System.Text.Json.Serialization.JsonPropertyName("level1")]
public long FirstCategoryId { get; set; } public long? FirstCategoryId { get; set; }
/// <summary> /// <summary>
/// 获取或设置二级类目 ID。 /// 获取或设置二级类目 ID。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("level2")] [Newtonsoft.Json.JsonProperty("level2")]
[System.Text.Json.Serialization.JsonPropertyName("level2")] [System.Text.Json.Serialization.JsonPropertyName("level2")]
public long SecondCategoryId { get; set; } public long? SecondCategoryId { get; set; }
/// <summary> /// <summary>
/// 获取或设置三级类目 ID。 /// 获取或设置三级类目 ID。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("level3")] [Newtonsoft.Json.JsonProperty("level3")]
[System.Text.Json.Serialization.JsonPropertyName("level3")] [System.Text.Json.Serialization.JsonPropertyName("level3")]
public long ThirdCategoryId { get; set; } public long? ThirdCategoryId { get; set; }
/// <summary>
/// 获取或设置新版分类列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public IList<Types.Category>? CategoryV2List { get; set; }
/// <summary> /// <summary>
/// 获取或设置资质材料图片 MediaId 列表。 /// 获取或设置资质材料图片 MediaId 列表。

View File

@@ -49,6 +49,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("level")] [System.Text.Json.Serialization.JsonPropertyName("level")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public int Level { get; set; } public int Level { get; set; }
/// <summary>
/// 获取或设置是否是叶子节点。
/// </summary>
[Newtonsoft.Json.JsonProperty("leaf")]
[System.Text.Json.Serialization.JsonPropertyName("leaf")]
public bool? IsLeaf { get; set; }
} }
public class Qualification public class Qualification
@@ -141,8 +148,16 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary> /// <summary>
/// 获取或设置类目列表。 /// 获取或设置类目列表。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("cats")] [Newtonsoft.Json.JsonProperty("cats")]
[System.Text.Json.Serialization.JsonPropertyName("cats")] [System.Text.Json.Serialization.JsonPropertyName("cats")]
public Types.Category[] CategoryList { get; set; } = default!; public Types.Category[] CategoryList { get; set; } = default!;
/// <summary>
/// 获取或设置新版类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public Types.Category[] CategoryV2List { get; set; } = default!;
} }
} }

View File

@@ -1,3 +1,5 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{ {
/// <summary> /// <summary>
@@ -31,14 +33,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("f_cat_id")] [System.Text.Json.Serialization.JsonPropertyName("f_cat_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ParentCategoryId { get; set; } public long ParentCategoryId { get; set; }
/// <summary>
/// 获取或设置是否是叶子节点。
/// </summary>
[Newtonsoft.Json.JsonProperty("leaf")]
[System.Text.Json.Serialization.JsonPropertyName("leaf")]
public bool? IsLeaf { get; set; }
} }
} }
/// <summary> /// <summary>
/// 获取或设置类目列表。 /// 获取或设置类目列表。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("cat_list")] [Newtonsoft.Json.JsonProperty("cat_list")]
[System.Text.Json.Serialization.JsonPropertyName("cat_list")] [System.Text.Json.Serialization.JsonPropertyName("cat_list")]
public Types.Category[] CategoryList { get; set; } = default!; public Types.Category[] CategoryList { get; set; } = default!;
/// <summary>
/// 获取或设置新版类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cat_list_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cat_list_v2")]
public Types.Category[] CategoryV2List { get; set; } = default!;
} }
} }

View File

@@ -60,7 +60,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string Type { get; set; } = default!; public string Type { get; set; } = default!;
/// <summary> /// <summary>
/// 获取或设置新版属性类型(后续将替代 <see cref="Type"/> 字段) /// 获取或设置新版属性类型。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("type_v2")] [Newtonsoft.Json.JsonProperty("type_v2")]
[System.Text.Json.Serialization.JsonPropertyName("type_v2")] [System.Text.Json.Serialization.JsonPropertyName("type_v2")]

View File

@@ -1,3 +1,5 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{ {
/// <summary> /// <summary>
@@ -34,9 +36,17 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary> /// <summary>
/// 获取或设置商品类目列表。 /// 获取或设置商品类目列表。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("cats")] [Newtonsoft.Json.JsonProperty("cats")]
[System.Text.Json.Serialization.JsonPropertyName("cats")] [System.Text.Json.Serialization.JsonPropertyName("cats")]
public new Types.Category[] CategoryList { get; set; } = default!; public new Types.Category[]? CategoryList { get; set; }
/// <summary>
/// 获取或设置新版商品类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public Types.Category[]? CategoryV2List { get; set; }
} }
} }

View File

@@ -1,3 +1,5 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{ {
/// <summary> /// <summary>
@@ -55,9 +57,17 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary> /// <summary>
/// 获取或设置商品类目列表。 /// 获取或设置商品类目列表。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("cats")] [Newtonsoft.Json.JsonProperty("cats")]
[System.Text.Json.Serialization.JsonPropertyName("cats")] [System.Text.Json.Serialization.JsonPropertyName("cats")]
public Types.Category[] CategoryList { get; set; } = default!; public Types.Category[]? CategoryList { get; set; } = default!;
/// <summary>
/// 获取或设置新版商品类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public Types.Category[]? CategoryV2List { get; set; }
} }
} }

View File

@@ -383,9 +383,17 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary> /// <summary>
/// 获取或设置商品类目列表。 /// 获取或设置商品类目列表。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("cats")] [Newtonsoft.Json.JsonProperty("cats")]
[System.Text.Json.Serialization.JsonPropertyName("cats")] [System.Text.Json.Serialization.JsonPropertyName("cats")]
public IList<Types.Category> CategoryList { get; set; } = new List<Types.Category>(); public IList<Types.Category>? CategoryList { get; set; }
/// <summary>
/// 获取或设置新版商品类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public IList<Types.Category>? CategoryV2List { get; set; }
/// <summary> /// <summary>
/// 获取或设置商品属性列表。 /// 获取或设置商品属性列表。

View File

@@ -412,9 +412,17 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary> /// <summary>
/// 获取或设置商品类目列表。 /// 获取或设置商品类目列表。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("cats")] [Newtonsoft.Json.JsonProperty("cats")]
[System.Text.Json.Serialization.JsonPropertyName("cats")] [System.Text.Json.Serialization.JsonPropertyName("cats")]
public Types.Category[] CategoryList { get; set; } = default!; public Types.Category[]? CategoryList { get; set; }
/// <summary>
/// 获取或设置新版商品类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public Types.Category[]? CategoryV2List { get; set; }
/// <summary> /// <summary>
/// 获取或设置商品属性列表。 /// 获取或设置商品属性列表。

View File

@@ -167,9 +167,17 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary> /// <summary>
/// 获取或设置商品类目列表。 /// 获取或设置商品类目列表。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("cats")] [Newtonsoft.Json.JsonProperty("cats")]
[System.Text.Json.Serialization.JsonPropertyName("cats")] [System.Text.Json.Serialization.JsonPropertyName("cats")]
public IList<Types.Category> CategoryList { get; set; } = new List<Types.Category>(); public IList<Types.Category>? CategoryList { get; set; }
/// <summary>
/// 获取或设置新版商品类目列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public IList<Types.Category>? CategoryV2List { get; set; }
/// <summary> /// <summary>
/// 获取或设置商品属性列表。 /// 获取或设置商品属性列表。

View File

@@ -1,4 +1,4 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{ {
/// <summary> /// <summary>
/// <para>表示 [POST] /channels/ec/window/product/get 接口的请求。</para> /// <para>表示 [POST] /channels/ec/window/product/get 接口的请求。</para>
@@ -18,5 +18,12 @@
[Newtonsoft.Json.JsonProperty("appid")] [Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")] [System.Text.Json.Serialization.JsonPropertyName("appid")]
public string AppId { get; set; } = string.Empty; public string AppId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置是否查询带货商品。
/// </summary>
[Newtonsoft.Json.JsonProperty("need_cps_product")]
[System.Text.Json.Serialization.JsonPropertyName("need_cps_product")]
public bool? RequireCPSProduct { get; set; }
} }
} }

View File

@@ -1,3 +1,5 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{ {
/// <summary> /// <summary>
@@ -157,10 +159,19 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// <summary> /// <summary>
/// 获取或设置商品三级类目 ID。 /// 获取或设置商品三级类目 ID。
/// </summary> /// </summary>
[Obsolete("相关接口或字段于 2024-10-28 下线。")]
[Newtonsoft.Json.JsonProperty("third_category_id")] [Newtonsoft.Json.JsonProperty("third_category_id")]
[System.Text.Json.Serialization.JsonPropertyName("third_category_id")] [System.Text.Json.Serialization.JsonPropertyName("third_category_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ThirdCategoryId { get; set; } public long? ThirdCategoryId { get; set; }
/// <summary>
/// 获取或设置新版商品三级类目 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("leaf_category_id")]
[System.Text.Json.Serialization.JsonPropertyName("leaf_category_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long? LeafCategoryId { get; set; }
/// <summary> /// <summary>
/// 获取或设置商品状态。 /// 获取或设置商品状态。

View File

@@ -3,7 +3,24 @@
"level1": 7419, "level1": 7419,
"level2": 7439, "level2": 7439,
"level3": 7448, "level3": 7448,
"certificate": [ "THE_MEDIA_ID_1", "THE_MEDIA_ID_2" ], "cats_v2": [
{
"cat_id": 6033
},
{
"cat_id": 6057
},
{
"cat_id": 6091
},
{
"cat_id": 6093
}
],
"certificate": [
"THE_MEDIA_ID_1",
"THE_MEDIA_ID_2"
],
"brand_list": [ "brand_list": [
{ "brand_id": 1001 }, { "brand_id": 1001 },
{ "brand_id": 1002 } { "brand_id": 1002 }

View File

@@ -12,19 +12,16 @@
"level": 3 "level": 3
}, },
"qua": { "qua": {
"qua_id": "0",
"need_to_apply": true, "need_to_apply": true,
"tips": "", "tips": "",
"mandatory": true "mandatory": true
}, },
"product_qua": { "product_qua": {
"qua_id": "0",
"need_to_apply": true, "need_to_apply": true,
"tips": "", "tips": "",
"mandatory": true "mandatory": true
}, },
"brand_qua": { "brand_qua": {
"qua_id": "0",
"need_to_apply": true, "need_to_apply": true,
"tips": "", "tips": "",
"mandatory": true "mandatory": true
@@ -71,5 +68,59 @@
} }
] ]
} }
],
"cats_v2": [
{
"cat_and_qua": [
{
"cat": {
"cat_id": "545709",
"name": "公路电子收费/ETC/OBU",
"f_cat_id": "10000131",
"level": 3,
"leaf": true
},
"qua": {
"qua_id": "1111608",
"need_to_apply": true,
"tips": "1、主体要求\n1入驻主体类型仅限于企业。\n2开店主体公司注册资本不低于100万注册时间不少于1年。\n\n2、行业资质\n1交通运输部指定全国各省份的ETC发行机构或合作机构。需提交交通部或交通厅关于ETC发行服务机构的信息公开单位证明截图或同等效力的证明材料参考示例《证明材料示例》https://docs.qq.com/doc/DVXBuUHpPSFdmYmJW\n2需提交关于合法合规经营产品的承诺函。承诺函模板https://docs.qq.com/doc/p/68313cd4ca24c6f0577d5ed3578c906ae9d67c91",
"mandatory": true
},
"brand_qua": {
"qua_id": "1111609",
"need_to_apply": true,
"tips": "1、属于品牌商标权利人/一级授权经销商。\n2、品牌须在京东有开设自营旗舰店/自营官方旗舰店或在天猫有开设官方旗舰店店铺;\n3、品牌须在在京东开设的自营旗舰店/自营官方旗舰店或在天猫开设的官方旗舰店店铺主营类目需和申请视频号橱窗定向准入的类目一致,请提供相应截图。\n4、品牌商标注册证需包含所申请范围",
"mandatory": true
},
"product_qua_list": [
]
},
{
"cat": {
"cat_id": "10000131",
"name": "车载电器",
"f_cat_id": "10000126",
"level": 2,
"leaf": false
},
"product_qua_list": [
]
},
{
"cat": {
"cat_id": "10000126",
"name": "汽车",
"f_cat_id": "0",
"level": 1,
"leaf": false
},
"product_qua_list": [
]
}
]
}
] ]
} }

View File

@@ -1,4 +1,4 @@
{ {
"errcode": 0, "errcode": 0,
"errmsg": "ok", "errmsg": "ok",
"cat_list": [ "cat_list": [
@@ -12,5 +12,25 @@
"f_cat_id": 0, "f_cat_id": 0,
"name": "鞋帽" "name": "鞋帽"
} }
],
"cat_list_v2": [
{
"cat_id": 1,
"f_cat_id": 0,
"name": "服饰",
"leaf": false
},
{
"cat_id": 2,
"f_cat_id": 0,
"name": "鞋帽",
"leaf": false
},
{
"cat_id": 3,
"f_cat_id": 0,
"name": "生鲜水产",
"leaf": false
}
] ]
} }

View File

@@ -26,6 +26,20 @@
{ {
"cat_id": "1452" "cat_id": "1452"
} }
],
"cats_v2": [
{
"cat_id": "1421"
},
{
"cat_id": "1443"
},
{
"cat_id": "1452"
},
{
"cat_id": "1476"
}
] ]
} }
} }

View File

@@ -26,6 +26,20 @@
{ {
"cat_id": "1452" "cat_id": "1452"
} }
],
"cats_v2": [
{
"cat_id": "1421"
},
{
"cat_id": "1443"
},
{
"cat_id": "1452"
},
{
"cat_id": "1476"
}
] ]
} }
} }

View File

@@ -9,12 +9,13 @@
"https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ" "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ"
] ]
}, },
"cats": [ "cats": [],
"cats_v2": [
{ {
"cat_id": "6033" "cat_id": "10000111"
}, },
{ {
"cat_id": "6057" "cat_id": "10000113"
}, },
{ {
"cat_id": "6091" "cat_id": "6091"

View File

@@ -14,15 +14,16 @@
"https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ" "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ"
] ]
}, },
"cats": [ "cats": [],
"cats_v2": [
{ {
"cat_id": "1" "cat_id": "10000111"
}, },
{ {
"cat_id": "2" "cat_id": "10000113"
}, },
{ {
"cat_id": "3" "cat_id": "6091"
} }
], ],
"attrs": [ "attrs": [

View File

@@ -11,12 +11,13 @@
], ],
"desc": "物美价廉" "desc": "物美价廉"
}, },
"cats": [ "cats": [],
"cats_v2": [
{ {
"cat_id": "6033" "cat_id": "10000111"
}, },
{ {
"cat_id": "6057" "cat_id": "10000113"
}, },
{ {
"cat_id": "6091" "cat_id": "6091"

View File

@@ -1,4 +1,4 @@
{ {
"errcode": 0, "errcode": 0,
"errmsg": "ok", "errmsg": "ok",
"product": { "product": {
@@ -7,6 +7,7 @@
"title": "任天堂 Nintendo Switch 国行续航增强版 NS家用体感游戏机掌机 便携掌上游戏机 红蓝主机", "title": "任天堂 Nintendo Switch 国行续航增强版 NS家用体感游戏机掌机 便携掌上游戏机 红蓝主机",
"img_url": "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ", "img_url": "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ",
"third_category_id": 6091, "third_category_id": 6091,
"leaf_category_id": 6091,
"status": 1, "status": 1,
"market_price": 1500, "market_price": 1500,
"selling_price": 1300, "selling_price": 1300,