mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 18:22:24 +08:00
feat(wxapi): 新增小程序联盟定向计划推广相关接口
This commit is contained in:
@@ -250,5 +250,69 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
return await client.SendRequestWithJsonAsync<Models.UnionPromoterOrderSearchResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
return await client.SendRequestWithJsonAsync<Models.UnionPromoterOrderSearchResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Target
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [GET] /union/promoter/target/plan_info 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/union/access-guidelines/promoter/api/target_plan/target_plan.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.UnionPromoterTargetPlanInfoResponse> ExecuteUnionPromoterTargetPlanInfoAsync(this WechatApiClient client, Models.UnionPromoterTargetPlanInfoRequest 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
|
||||||
|
.CreateRequest(request, HttpMethod.Get, "union", "promoter", "target", "plan_info")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken)
|
||||||
|
.SetQueryParam("planInvitationUrl", request.PlanInvitaionUrl);
|
||||||
|
|
||||||
|
return await client.SendRequestWithJsonAsync<Models.UnionPromoterTargetPlanInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /union/promoter/target/apply_target 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/union/access-guidelines/promoter/api/target_plan/target_plan.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.UnionPromoterTargetApplyTargetResponse> ExecuteUnionPromoterTargetApplyTargetAsync(this WechatApiClient client, Models.UnionPromoterTargetApplyTargetRequest 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
|
||||||
|
.CreateRequest(request, HttpMethod.Post, "union", "promoter", "target", "apply_target")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendRequestWithJsonAsync<Models.UnionPromoterTargetApplyTargetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [GET] /union/promoter/target/apply_status 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/union/access-guidelines/promoter/api/target_plan/target_plan.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.UnionPromoterTargetApplyStatusResponse> ExecuteUnionPromoterTargetApplyStatusAsync(this WechatApiClient client, Models.UnionPromoterTargetApplyStatusRequest 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
|
||||||
|
.CreateRequest(request, HttpMethod.Get, "union", "promoter", "target", "apply_status")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken)
|
||||||
|
.SetQueryParam("planId", request.PlanId);
|
||||||
|
|
||||||
|
return await client.SendRequestWithJsonAsync<Models.UnionPromoterTargetApplyStatusResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -36,7 +36,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
public string Name { get; set; } = default!;
|
public string Name { get; set; } = default!;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Attribute
|
public class Parameter
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置属性的 Key。
|
/// 获取或设置属性的 Key。
|
||||||
@@ -93,7 +93,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
public string? SubTitle { get; set; }
|
public string? SubTitle { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置主图 Url 列表。
|
/// 获取或设置商品主图 URL 列表。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("headImg")]
|
[Newtonsoft.Json.JsonProperty("headImg")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("headImg")]
|
[System.Text.Json.Serialization.JsonPropertyName("headImg")]
|
||||||
@@ -140,7 +140,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("param")]
|
[Newtonsoft.Json.JsonProperty("param")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("param")]
|
[System.Text.Json.Serialization.JsonPropertyName("param")]
|
||||||
public Attribute[] AttributeList { get; set; } = default!;
|
public Parameter[] ParameterList { get; set; } = default!;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置运费信息。
|
/// 获取或设置运费信息。
|
||||||
@@ -161,7 +161,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("totalStockNum")]
|
[Newtonsoft.Json.JsonProperty("totalStockNum")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("totalStockNum")]
|
[System.Text.Json.Serialization.JsonPropertyName("totalStockNum")]
|
||||||
public int Stock { get; set; }
|
public int TotalStock { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SKU
|
public class SKU
|
||||||
@@ -233,7 +233,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("status")]
|
[Newtonsoft.Json.JsonProperty("status")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||||
public int Status { get; set; }
|
public int? Status { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置 SKU 基本信息。
|
/// 获取或设置 SKU 基本信息。
|
||||||
@@ -491,7 +491,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("hasCoupon")]
|
[System.Text.Json.Serialization.JsonPropertyName("hasCoupon")]
|
||||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||||
public bool HasCommission { get; set; }
|
public bool HasCoupon { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置优惠券 ID。
|
/// 获取或设置优惠券 ID。
|
||||||
@@ -504,8 +504,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取或设置优惠券详细信息。
|
/// 获取或设置优惠券详细信息。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Newtonsoft.Json.JsonProperty("couponInfo")]
|
[Newtonsoft.Json.JsonProperty("couponDetail")]
|
||||||
[System.Text.Json.Serialization.JsonPropertyName("couponInfo")]
|
[System.Text.Json.Serialization.JsonPropertyName("couponDetail")]
|
||||||
public Types.CouponDetail? CouponDetail { get; set; }
|
public Types.CouponDetail? CouponDetail { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /union/promoter/target/apply_status 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class UnionPromoterTargetApplyStatusRequest : WechatApiRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置定向计划 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planId")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planId")]
|
||||||
|
public string PlanId { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,73 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /union/promoter/target/apply_status 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class UnionPromoterTargetApplyStatusResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Data
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置定向计划 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planId")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planId")]
|
||||||
|
public string PlanId { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置申请状态。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("promoterStatus")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("promoterStatus")]
|
||||||
|
public int PromoterStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置申请原因。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("applyReason")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("applyReason")]
|
||||||
|
public string? ApplyReason { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置申请时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("applyTime")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("applyTime")]
|
||||||
|
public long? ApplyTimestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置加入时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("joinTime")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("joinTime")]
|
||||||
|
public long? JoinTimestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置拒绝时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("rejectTime")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("rejectTime")]
|
||||||
|
public long? RejectTimestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置移除时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("removeTime")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("removeTime")]
|
||||||
|
public long? RemoveTimestamp { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置返回数据。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("data")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||||
|
public Types.Data Data { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /union/promoter/target/apply_target 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class UnionPromoterTargetApplyTargetRequest : WechatApiRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置定向计划 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planId")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planId")]
|
||||||
|
public string PlanId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置申请原因。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("applyReason")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("applyReason")]
|
||||||
|
public string ApplyReason { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /union/promoter/target/apply_target 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class UnionPromoterTargetApplyTargetResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /union/promoter/target/plan_info 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class UnionPromoterTargetPlanInfoRequest : WechatApiRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置定向计划邀请链接。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
public string PlanInvitaionUrl { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,304 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /union/promoter/target/plan_info 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class UnionPromoterTargetPlanInfoResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class TargetPlan
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置计划 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planId")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planId")]
|
||||||
|
|
||||||
|
public string PlanId { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置计划名称。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planName")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planName")]
|
||||||
|
|
||||||
|
public string PlanName { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置计划描述。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planDesc")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planDesc")]
|
||||||
|
|
||||||
|
public string Description { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置计划状态。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planStatus")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planStatus")]
|
||||||
|
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
|
||||||
|
public int Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置计划开始时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planStartTime")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planStartTime")]
|
||||||
|
|
||||||
|
public long StartTimestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置计划结束时间戳。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planEndTime")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planEndTime")]
|
||||||
|
|
||||||
|
public long EndTimestamp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置扩展信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("extInfo")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("extInfo")]
|
||||||
|
|
||||||
|
public object Extra { get; set; } = default!;
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Product
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class ProductDetail
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Category : UnionPromoterProductListResponse.Types.Product.Types.ProductDetail.Types.Category
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Detail : UnionPromoterProductListResponse.Types.Product.Types.ProductDetail.Types.Information.Types.Detail
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Parameter : UnionPromoterProductListResponse.Types.Product.Types.ProductDetail.Types.Parameter
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SKU : UnionPromoterProductListResponse.Types.Product.Types.ProductDetail.Types.SKU
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品标题。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("title")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||||
|
|
||||||
|
public string Title { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品子标题。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("subTitle")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("subTitle")]
|
||||||
|
|
||||||
|
public string SubTitle { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品主图 URL 列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("headImg")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("headImg")]
|
||||||
|
|
||||||
|
public string[] HeadImageUrlList { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品类目列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("category")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("category")]
|
||||||
|
|
||||||
|
public Types.Category[] CategoryList { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置品牌 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("brandId")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("brandId")]
|
||||||
|
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
public int BrandId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置品牌名称。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("brand")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("brand")]
|
||||||
|
public string? BrandName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置型号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("model")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("model")]
|
||||||
|
public string? Model { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品详情信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("detail")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("detail")]
|
||||||
|
public Types.Detail Detail { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品属性列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("param")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("param")]
|
||||||
|
public Types.Parameter[] ParameterList { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置 SKU 最低价格(单位:分)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("minPrice")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("minPrice")]
|
||||||
|
public int MinPrice { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置总库存。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("totalStockNum")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("totalStockNum")]
|
||||||
|
public int TotalStock { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置总销量。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("totalSoldNum")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("totalSoldNum")]
|
||||||
|
public int TotalSales { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class League : UnionPromoterProductListResponse.Types.Product.Types.League
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置是否为禁用的微信 UIN。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("banBizuin")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("banBizuin")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
|
||||||
|
public bool? IsBannedBusinessUIN { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置是否为禁用的类目。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("banCategory")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("banCategory")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
|
||||||
|
public bool? IsBannedCategory { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置是否为禁用的商品。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("banProduct")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("banProduct")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
|
||||||
|
public bool? IsBannedProduct { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Coupon : UnionPromoterProductListResponse.Types.Product.Types.Coupon
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置优惠金额(单位:分)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("discount")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("discount")]
|
||||||
|
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||||
|
public int? Discount { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置计划 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("planId")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("planId")]
|
||||||
|
|
||||||
|
public string PlanId { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("productId")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("productId")]
|
||||||
|
|
||||||
|
public string ProductId { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品状态。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("productStatus")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("productStatus")]
|
||||||
|
|
||||||
|
public int ProductStatus { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置佣金率(单位:万分之一)。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("commissionRatio")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("commissionRatio")]
|
||||||
|
|
||||||
|
public int CommissionRatio { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品详情信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("productDetailInfo")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("productDetailInfo")]
|
||||||
|
|
||||||
|
public Types.ProductDetail ProductDetail { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置联盟佣金信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("leagueExInfo")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("leagueExInfo")]
|
||||||
|
|
||||||
|
public Types.League League { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置优惠券信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("couponInfo")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("couponInfo")]
|
||||||
|
|
||||||
|
public Types.Coupon Coupon { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置定向计划信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("targetPlanInfo")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("targetPlanInfo")]
|
||||||
|
|
||||||
|
public Types.TargetPlan TargetPlan { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商品列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("productListInfo")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("productListInfo")]
|
||||||
|
|
||||||
|
public Types.Product[] ProductList { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1 @@
|
|||||||
|
{}
|
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"errcode": 0,
|
||||||
|
"errmsg": "ok",
|
||||||
|
"data": {
|
||||||
|
"planId": "1964112935262240768",
|
||||||
|
"promoterStatus": 1,
|
||||||
|
"applyTime": 1626692835,
|
||||||
|
"joinTime": 0,
|
||||||
|
"applyReason": "okok",
|
||||||
|
"rejectTime": 0,
|
||||||
|
"removeTime": 0
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"planId": "123LKAJSDLKJSADLKwqij21dsdsdsd312joewq=",
|
||||||
|
"applyReason": "推客申请加入原因"
|
||||||
|
}
|
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"errcode": 0,
|
||||||
|
"errmsg": "ok"
|
||||||
|
}
|
@@ -0,0 +1 @@
|
|||||||
|
{}
|
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"errcode": 0,
|
||||||
|
"errmsg": "ok",
|
||||||
|
"targetPlanInfo": {
|
||||||
|
"planId": "1964112935262240768",
|
||||||
|
"planStatus": 1,
|
||||||
|
"planName": "TEST定向计划CR",
|
||||||
|
"planDesc": "TEST定向计划CR",
|
||||||
|
"planStartTime": 1629216000,
|
||||||
|
"planEndTime": 1630166399,
|
||||||
|
"extInfo": {
|
||||||
|
"bizBasicInfo": {
|
||||||
|
"headimgurl": "http://wx.qlogo.cn/mmhead/Q3auHgzwzM77ia7ibuPAQBJgME8gFF9APicaSpd7evrLCVb5hn2zsUBOw",
|
||||||
|
"nickname": "猪腩肉小商店",
|
||||||
|
"appid": "wxb825f130c284597f"
|
||||||
|
},
|
||||||
|
"data": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"productListInfo": [
|
||||||
|
{
|
||||||
|
"planId": "1964112935262240768",
|
||||||
|
"productId": "37610006",
|
||||||
|
"productStatus": 1,
|
||||||
|
"commissionRatio": 700,
|
||||||
|
"productDetailInfo": {
|
||||||
|
"headImg": [
|
||||||
|
"https://store.mp.video.tencent-cloud.com/161/20304/snscosdownload/SZ/reserved/60a77aac00065bee000000006a849d09000000a000004f50"
|
||||||
|
],
|
||||||
|
"category": [
|
||||||
|
{
|
||||||
|
"catId": "1208",
|
||||||
|
"name": "宠物生活"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"catId": "1224",
|
||||||
|
"name": "猫狗出行"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"catId": "1227",
|
||||||
|
"name": "宠物鞋服"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"param": [],
|
||||||
|
"title": "新商品哈哈中",
|
||||||
|
"subTitle": "",
|
||||||
|
"model": "",
|
||||||
|
"detail": {
|
||||||
|
"detailImg": []
|
||||||
|
},
|
||||||
|
"brandId": "2100000000",
|
||||||
|
"totalStockNum": "128",
|
||||||
|
"totalSoldNum": "2"
|
||||||
|
},
|
||||||
|
"leagueExInfo": {
|
||||||
|
"hasCommission": 1,
|
||||||
|
"commissionRatio": 700,
|
||||||
|
"commissionValue": 7,
|
||||||
|
"banBizuin": 0,
|
||||||
|
"banCategory": 0,
|
||||||
|
"banProduct": 0
|
||||||
|
},
|
||||||
|
"couponInfo": {
|
||||||
|
"couponId": "0",
|
||||||
|
"discount": "0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user