mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 10:38:10 +08:00
feat(wxapi): 新增视频号小店获取商品库存流水接口
This commit is contained in:
@@ -2883,52 +2883,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductQrcodeGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductQrcodeGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <para>异步调用 [POST] /channels/ec/product/stock/update 接口。</para>
|
|
||||||
/// <para>
|
|
||||||
/// REF: <br/>
|
|
||||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/product/stock_update.html ]]>
|
|
||||||
/// </para>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="client"></param>
|
|
||||||
/// <param name="request"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static async Task<Models.ChannelsECProductStockUpdateResponse> ExecuteChannelsECProductStockUpdateAsync(this WechatApiClient client, Models.ChannelsECProductStockUpdateRequest request, CancellationToken cancellationToken = default)
|
|
||||||
{
|
|
||||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
|
||||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
|
||||||
|
|
||||||
IFlurlRequest flurlReq = client
|
|
||||||
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "product", "stock", "update")
|
|
||||||
.SetQueryParam("access_token", request.AccessToken);
|
|
||||||
|
|
||||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductStockUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// <para>异步调用 [POST] /channels/ec/product/stock/get 接口。</para>
|
|
||||||
/// <para>
|
|
||||||
/// REF: <br/>
|
|
||||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/product/get_stock.html ]]>
|
|
||||||
/// </para>
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="client"></param>
|
|
||||||
/// <param name="request"></param>
|
|
||||||
/// <param name="cancellationToken"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static async Task<Models.ChannelsECProductStockGetResponse> ExecuteChannelsECProductStockGetAsync(this WechatApiClient client, Models.ChannelsECProductStockGetRequest request, CancellationToken cancellationToken = default)
|
|
||||||
{
|
|
||||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
|
||||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
|
||||||
|
|
||||||
IFlurlRequest flurlReq = client
|
|
||||||
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "product", "stock", "get")
|
|
||||||
.SetQueryParam("access_token", request.AccessToken);
|
|
||||||
|
|
||||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductStockGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region ECProduct/LimitedDiscountTask
|
#region ECProduct/LimitedDiscountTask
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>异步调用 [POST] /channels/ec/product/limiteddiscounttask/add 接口。</para>
|
/// <para>异步调用 [POST] /channels/ec/product/limiteddiscounttask/add 接口。</para>
|
||||||
@@ -3022,6 +2976,100 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductLimitedDiscountTaskDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductLimitedDiscountTaskDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region ECProduct/Stock
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /channels/ec/product/stock/update 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/product/stock_update.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.ChannelsECProductStockUpdateResponse> ExecuteChannelsECProductStockUpdateAsync(this WechatApiClient client, Models.ChannelsECProductStockUpdateRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "product", "stock", "update")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductStockUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /channels/ec/product/stock/get 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/product/get_stock.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.ChannelsECProductStockGetResponse> ExecuteChannelsECProductStockGetAsync(this WechatApiClient client, Models.ChannelsECProductStockGetRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "product", "stock", "get")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductStockGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /channels/ec/product/stock/batchget 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/product/batchget_stock.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.ChannelsECProductStockBatchGetResponse> ExecuteChannelsECProductStockBatchGetAsync(this WechatApiClient client, Models.ChannelsECProductStockBatchGetRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "product", "stock", "batchget")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductStockBatchGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /channels/ec/product/stock/getflow 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/product/get_stock_flow.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.ChannelsECProductStockGetFlowResponse> ExecuteChannelsECProductStockGetFlowAsync(this WechatApiClient client, Models.ChannelsECProductStockGetFlowRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "product", "stock", "getflow")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECProductStockGetFlowResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ECQIC
|
#region ECQIC
|
||||||
|
@@ -0,0 +1,17 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /channels/ec/product/stock/batchget 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ChannelsECProductStockBatchGetRequest : WechatApiRequest, IInferable<ChannelsECProductStockBatchGetRequest, ChannelsECProductStockBatchGetResponse>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品 ID 列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||||
|
public IList<long> ProductIdList { get; set; } = new List<long>();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,70 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /channels/ec/product/stock/batchget 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ChannelsECProductStockBatchGetResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class ProductStock
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class SKUStock : ChannelsECProductStockGetResponse.Types.Data
|
||||||
|
{
|
||||||
|
/// <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("finder_total_num")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("finder_total_num")]
|
||||||
|
public int? FinderTotalStock { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品 ID。
|
||||||
|
/// </summary>
|
||||||
|
[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; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置 SKU 库存列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sku_stock")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sku_stock")]
|
||||||
|
public Types.SKUStock[] SKUStockList { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品库存列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("spu_stock_list")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("spu_stock_list")]
|
||||||
|
public Types.ProductStock[] StockList { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置返回数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,74 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /channels/ec/product/stock/getflow 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ChannelsECProductStockGetFlowRequest : WechatApiRequest, IInferable<ChannelsECProductStockGetFlowRequest, ChannelsECProductStockGetFlowResponse>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||||
|
public long ProductId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置 SKU ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("sku_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
|
||||||
|
public long SKUId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置库存类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("stock_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("stock_type")]
|
||||||
|
public int StockType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置达人的视频号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("finder_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("finder_id")]
|
||||||
|
public string? FinderId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置时间范围开始时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("begin_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("begin_time")]
|
||||||
|
public long BeginTimestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置时间范围结束时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("end_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
|
||||||
|
public long EndTimestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置库存事件类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("op_type_list")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("op_type_list")]
|
||||||
|
public IList<int>? OperateTypeList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分页每页数量。
|
||||||
|
/// <para>默认值:10</para>
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||||
|
public int PageSize { get; set; } = 10;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分页游标。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||||
|
public string? PageCursor { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,146 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /channels/ec/product/stock/getflow 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ChannelsECProductStockGetFlowResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class StockFlow
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class ExtraInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置归还的源库存子类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("unmove_from_stock_sub_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("unmove_from_stock_sub_type")]
|
||||||
|
public int? UnmoveFromStockSubType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置分配的目标库存子类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("move_to_stock_sub_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("move_to_stock_sub_type")]
|
||||||
|
public int? MoveToStockSubType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置操作来源。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("upload_source")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("upload_source")]
|
||||||
|
public int? UploadSource { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置订单 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||||
|
public string? OrderId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置区域仓库 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("out_warehouse_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("out_warehouse_id")]
|
||||||
|
public string? OutWarehouseId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置限时抢购任务 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("limited_discount_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("limited_discount_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
public long? LimitedDiscountTaskId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置达人的视频号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("finder_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("finder_id")]
|
||||||
|
public string? FinderId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置操作数量。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("amount")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||||
|
public int Amount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置开始数量。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("beginning_amount")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("beginning_amount")]
|
||||||
|
public int BeginningAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置结束数量。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("ending_amount")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("ending_amount")]
|
||||||
|
public int EndingAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置库存子类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("stock_sub_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("stock_sub_type")]
|
||||||
|
public int StockSubType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置库存事件类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("op_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("op_type")]
|
||||||
|
public int OperateType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置流水发生时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("update_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
|
||||||
|
public long UpdateTimestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置额外信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("ext_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("ext_info")]
|
||||||
|
public Types.ExtraInfo? ExtraInfo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置库存流水列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("stock_flow_info_list")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("stock_flow_info_list")]
|
||||||
|
public Types.StockFlow[] StockFlowList { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置下一页分页游标。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||||
|
public string? NextCursor { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置返回数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
@@ -26,6 +26,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
[Newtonsoft.Json.JsonProperty("num")]
|
[Newtonsoft.Json.JsonProperty("num")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("num")]
|
[System.Text.Json.Serialization.JsonPropertyName("num")]
|
||||||
public int Stock { get; set; }
|
public int Stock { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置锁定库存数量。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("lock_stock")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("lock_stock")]
|
||||||
|
public int? LockStock { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"product_id": [ "10000017524246" ]
|
||||||
|
}
|
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"errcode": 0,
|
||||||
|
"errmsg": "ok",
|
||||||
|
"data": {
|
||||||
|
"spu_stock_list": [
|
||||||
|
{
|
||||||
|
"product_id": "10000017524246",
|
||||||
|
"sku_stock": [
|
||||||
|
{
|
||||||
|
"sku_id": "764787449",
|
||||||
|
"normal_stock_num": 990,
|
||||||
|
"limited_discount_stock_num": 0,
|
||||||
|
"warehouse_stocks": [
|
||||||
|
{
|
||||||
|
"out_warehouse_id": "test4",
|
||||||
|
"num": 44,
|
||||||
|
"lock_stock": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"out_warehouse_id": "test2",
|
||||||
|
"num": 44,
|
||||||
|
"lock_stock": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"out_warehouse_id": "test3",
|
||||||
|
"num": 8,
|
||||||
|
"lock_stock": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"out_warehouse_id": "test1",
|
||||||
|
"num": 80,
|
||||||
|
"lock_stock": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"finder_total_num": 300,
|
||||||
|
"total_stock_num": 1166
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"product_id": "10000032267694",
|
||||||
|
"sku_id": "1064839936",
|
||||||
|
"stock_type": 0,
|
||||||
|
"begin_time": 1689218360,
|
||||||
|
"end_time": 1689736760,
|
||||||
|
"page_size": 10
|
||||||
|
}
|
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"errcode": 0,
|
||||||
|
"errmsg": "ok",
|
||||||
|
"data": {
|
||||||
|
"stock_flow_info_list": [
|
||||||
|
{
|
||||||
|
"amount": 300,
|
||||||
|
"beginning_amount": 842,
|
||||||
|
"ending_amount": 542,
|
||||||
|
"stock_sub_type": 1,
|
||||||
|
"op_type": 6,
|
||||||
|
"update_time": 1689735682,
|
||||||
|
"ext_info": {
|
||||||
|
"move_to_stock_sub_type": 4,
|
||||||
|
"upload_source": 0,
|
||||||
|
"order_id": "0",
|
||||||
|
"out_warehouse_id": "",
|
||||||
|
"limited_discount_id": "0",
|
||||||
|
"finder_id": "sphn9rhffKDiLAf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"amount": 1,
|
||||||
|
"beginning_amount": 843,
|
||||||
|
"ending_amount": 842,
|
||||||
|
"stock_sub_type": 1,
|
||||||
|
"op_type": 4,
|
||||||
|
"update_time": 1689520907,
|
||||||
|
"ext_info": {
|
||||||
|
"upload_source": 0,
|
||||||
|
"order_id": "3712984209868589056",
|
||||||
|
"out_warehouse_id": "",
|
||||||
|
"limited_discount_id": "0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"next_key": ""
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"product_id": "10000000088178",
|
||||||
|
"sku_id": "462966239"
|
||||||
|
}
|
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"errcode": 0,
|
||||||
|
"errmsg": "ok",
|
||||||
|
"data": {
|
||||||
|
"normal_stock_num": 998,
|
||||||
|
"limited_discount_stock_num": 0,
|
||||||
|
"warehouse_stocks": [
|
||||||
|
{
|
||||||
|
"out_warehouse_id": "test1",
|
||||||
|
"num": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"out_warehouse_id": "test2",
|
||||||
|
"num": 22
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"out_warehouse_id": "test3",
|
||||||
|
"num": 33
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"out_warehouse_id": "test4",
|
||||||
|
"num": 44
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"total_stock_num": 1107
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user