feat(wxapi): 新增交易评价管理相关接口
Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
CodeLint / Lint (push) Waiting to run

This commit is contained in:
Fu Diwei
2025-04-29 19:42:24 +08:00
parent a2188d28b3
commit 62d2fbad83
26 changed files with 1025 additions and 5 deletions

View File

@@ -89,14 +89,13 @@
| √ | 微信客服 | | |
| × | <del>广告</del> | | 异构协议,需独立模块 |
| √ | 小程序评价 | 行业能力 | |
| √ | 小程序评价 | 行业能力 | |
| √ | 小程序直播 | 行业能力 | |
| √ | 微信学生身份快速验证 | 行业能力 | |
| √ | 微信物流服务 | 行业能力 | |
| × | <del>乘车码</del> | 行业能力 | _开发中_ |
| √ | 小程序 B2B 门店助手 | 行业能力 | |
| √ | 短剧小程序 | 行业能力 | |
| × | <del>小说小程序</del> | 行业能力 | _开发中_ |
| √ | 购物订单 | 商业能力 | |
| | 小说小程序 | 行业能力 | |
| √ | 交易保障 | 商业能力 | |
| √ | 小程序推广员 | 商业能力 | |
| √ | 交易组件 | 商业能力 | |
@@ -107,6 +106,7 @@
| √ | 多端能力 | 多端能力 | |
| √ | 服务市场 | 服务市场 | |
| √ | 城市服务 | 城市服务 | |
| √ | 付费能力 | 付费能力 | |
</details>

View File

@@ -0,0 +1,34 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.wxa_comment_bad_score 事件的数据。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/guarantee/comment.html#_4-1%E5%B7%AE%E8%AF%84%E9%80%9A%E7%9F%A5CallBack ]]>
/// </para>
/// </summary>
public class WxaCommentBadScoreEvent : WechatApiEvent
{
public static class Types
{
public class Result
{
/// <summary>
/// 获取或设置评价 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("comment_id")]
[System.Text.Json.Serialization.JsonPropertyName("comment_id")]
[System.Xml.Serialization.XmlElement("comment_id")]
public string CommentId { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置评价结果信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("result")]
[System.Text.Json.Serialization.JsonPropertyName("result")]
[System.Xml.Serialization.XmlElement("result")]
public Types.Result Result { get; set; } = default!;
}
}

View File

@@ -0,0 +1,69 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.secbook_audit_event 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/novel-api.html#%E5%AE%A1%E6%A0%B8%E7%8A%B6%E6%80%81%E4%BA%8B%E4%BB%B6 </para>
/// </summary>
public class SecBookAuditEvent : WechatApiEvent
{
public static class Types
{
public class EventData
{
public static class Types
{
public class AuditDetail
{
/// <summary>
/// 获取或设置审核状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
[System.Xml.Serialization.XmlElement("status")]
public int Status { get; set; }
/// <summary>
/// 获取或设置提审时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("create_time")]
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
[System.Xml.Serialization.XmlElement("create_time")]
public long CreateTimestamp { get; set; }
/// <summary>
/// 获取或设置审核时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("audit_time")]
[System.Text.Json.Serialization.JsonPropertyName("audit_time")]
[System.Xml.Serialization.XmlElement("audit_time")]
public long AuditTimestamp { get; set; }
}
}
/// <summary>
/// 获取或设置作品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("book_id")]
[System.Text.Json.Serialization.JsonPropertyName("book_id")]
[System.Xml.Serialization.XmlElement("book_id")]
public string BookId { get; set; } = default!;
/// <summary>
/// 获取或设置审核信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("audit_detail")]
[System.Text.Json.Serialization.JsonPropertyName("audit_detail")]
[System.Xml.Serialization.XmlElement("audit_detail")]
public Types.AuditDetail AuditDetail { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置事件信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("audit_event")]
[System.Text.Json.Serialization.JsonPropertyName("audit_event")]
[System.Xml.Serialization.XmlElement("audit_event")]
public Types.EventData EventData { get; set; } = default!;
}
}

View File

@@ -44,7 +44,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
[Newtonsoft.Json.JsonProperty("audit_time")]
[System.Text.Json.Serialization.JsonPropertyName("audit_time")]
[System.Xml.Serialization.XmlElement("audit_time")]
public long? AuditTimestamp { get; set; }
public long AuditTimestamp { get; set; }
}
}

View File

@@ -44,7 +44,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
[Newtonsoft.Json.JsonProperty("WxOrderId")]
[System.Text.Json.Serialization.JsonPropertyName("WxOrderId")]
[System.Xml.Serialization.XmlElement("WxOrderId")]
public string WechatpayOrderId { get; set; } = default!;
public string WechatpayTransactionId { get; set; } = default!;
/// <summary>
/// 获取或设置退款单的微信支付单号。

View File

@@ -9,6 +9,152 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
{
public static class WechatApiClientExecuteWxaApiExtensions
{
#region Comment
/// <summary>
/// <para>异步调用 [GET] /wxaapi/comment/mpcommentlist/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/guarantee/comment.html#_1-1%E6%9F%A5%E8%AF%A2%E8%AF%84%E4%BB%B7%E5%88%97%E8%A1%A8 ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaApiCommentMpCommentListGetResponse> ExecuteWxaApiCommentMpCommentListGetAsync(this WechatApiClient client, Models.WxaApiCommentMpCommentListGetRequest 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.Get, "wxaapi", "comment", "mpcommentlist", "get")
.SetQueryParam("access_token", request.AccessToken)
.SetQueryParam("startTime", request.StartTimestamp)
.SetQueryParam("endTime", request.EndTimestamp)
.SetQueryParam("filterType", request.FilterType)
.SetQueryParam("offset", request.Offset)
.SetQueryParam("limit", request.Limit);
return await client.SendFlurlRequestAsJsonAsync<Models.WxaApiCommentMpCommentListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [GET] /wxaapi/comment/replyandcommentreplylist/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/guarantee/comment.html#_1-2%E6%9F%A5%E8%AF%A2%E8%AF%84%E8%AE%BA%E5%88%97%E8%A1%A8 ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaApiCommentReplyAndCommentReplyListGetResponse> ExecuteWxaApiCommentReplyAndCommentReplyListGetAsync(this WechatApiClient client, Models.WxaApiCommentReplyAndCommentReplyListGetRequest 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.Get, "wxaapi", "comment", "replyandcommentreplylist", "get")
.SetQueryParam("access_token", request.AccessToken)
.SetQueryParam("commentId", request.CommentId);
return await client.SendFlurlRequestAsJsonAsync<Models.WxaApiCommentReplyAndCommentReplyListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /wxaapi/comment/commentreply/add 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/guarantee/comment.html#_2-1%E5%88%9B%E5%BB%BA%E8%AF%84%E8%AE%BA ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaApiCommentReplyAddResponse> ExecuteWxaApiCommentReplyAddAsync(this WechatApiClient client, Models.WxaApiCommentReplyAddRequest 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, "wxaapi", "comment", "reply", "add")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.WxaApiCommentReplyAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /wxaapi/comment/commentreply/delete 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/guarantee/comment.html#_3-2%E5%88%A0%E9%99%A4%E5%9B%9E%E5%A4%8D ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaApiCommentReplyDeleteResponse> ExecuteWxaApiCommentReplyDeleteAsync(this WechatApiClient client, Models.WxaApiCommentReplyDeleteRequest 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, "wxaapi", "comment", "reply", "delete")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.WxaApiCommentReplyDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /wxaapi/comment/apikfquota/reset 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/guarantee/comment.html#_4-2%E9%87%8D%E7%BD%AEApi%E5%AE%A2%E6%9C%8Dquota ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaApiCommentApiKfQuotaResetResponse> ExecuteWxaApiCommentApiKfQuotaResetAsync(this WechatApiClient client, Models.WxaApiCommentApiKfQuotaResetRequest 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, "wxaapi", "comment", "apikfquota", "reset")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.WxaApiCommentApiKfQuotaResetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /wxaapi/comment/confirmcompromise 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/guarantee/comment.html#_5%E3%80%81%E7%A1%AE%E8%AE%A4%E5%92%8C%E8%A7%A3 ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.WxaApiCommentConfirmCompromiseResponse> ExecuteWxaApiCommentConfirmCompromiseAsync(this WechatApiClient client, Models.WxaApiCommentConfirmCompromiseRequest 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, "wxaapi", "comment", "confirmcompromise")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.WxaApiCommentConfirmCompromiseResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
#endregion
#region NewTemplate
/// <summary>
/// <para>异步调用 [POST] /wxaapi/newtmpl/addtemplate 接口。</para>

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxaapi/comment/apikfquota/reset 接口的请求。</para>
/// </summary>
public class WxaApiCommentApiKfQuotaResetRequest : WechatApiRequest, IInferable<WxaApiCommentApiKfQuotaResetRequest, WxaApiCommentApiKfQuotaResetResponse>
{
/// <summary>
/// 获取或设置评价 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentId")]
[System.Text.Json.Serialization.JsonPropertyName("commentId")]
public string CommentId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxaapi/comment/apikfquota/reset 接口的响应。</para>
/// </summary>
public class WxaApiCommentApiKfQuotaResetResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,31 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxaapi/comment/confirmcompromise 接口的请求。</para>
/// </summary>
public class WxaApiCommentConfirmCompromiseRequest : WechatApiRequest, IInferable<WxaApiCommentConfirmCompromiseRequest, WxaApiCommentConfirmCompromiseResponse>
{
/// <summary>
/// 获取或设置评价 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentId")]
[System.Text.Json.Serialization.JsonPropertyName("commentId")]
public string CommentId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置和解的图片 MediaId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("picList")]
[System.Text.Json.Serialization.JsonPropertyName("picList")]
public IList<string>? PictureMediaIdList { get; set; }
/// <summary>
/// 获取或设置和解的文本内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("content")]
[System.Text.Json.Serialization.JsonPropertyName("content")]
public string? Content { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxaapi/comment/confirmcompromise 接口的响应。</para>
/// </summary>
public class WxaApiCommentConfirmCompromiseResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,43 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [GET] /wxaapi/comment/mpcommentlist/get 接口的请求。</para>
/// </summary>
public class WxaApiCommentMpCommentListGetRequest : WechatApiRequest, IInferable<WxaApiCommentMpCommentListGetRequest, WxaApiCommentMpCommentListGetResponse>
{
/// <summary>
/// 获取或设置查询时间段的开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public long StartTimestamp { get; set; }
/// <summary>
/// 获取或设置查询时间段的结束时间戳。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public long EndTimestamp { get; set; }
/// <summary>
/// 获取或设置过滤的数据类型。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int? FilterType { get; set; }
/// <summary>
/// 获取或设置分页起始位置。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int? Offset { get; set; }
/// <summary>
/// 获取或设置分页每页数量。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int? Limit { get; set; }
}
}

View File

@@ -0,0 +1,287 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [GET] /wxaapi/comment/mpcommentlist/get 接口的响应。</para>
/// </summary>
public class WxaApiCommentMpCommentListGetResponse : WechatApiResponse
{
public static class Types
{
public class Comment
{
public static class Types
{
public class OrderInfo
{
/// <summary>
/// 获取或设置商户单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("busiOrderId")]
[System.Text.Json.Serialization.JsonPropertyName("busiOrderId")]
public string BusinessOrderId { get; set; } = default!;
}
public class UserInfo
{
/// <summary>
/// 获取或设置用户的 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置用户的昵称。
/// </summary>
[Newtonsoft.Json.JsonProperty("nickName")]
[System.Text.Json.Serialization.JsonPropertyName("nickName")]
public string Nickname { get; set; } = default!;
/// <summary>
/// 获取或设置用户的头像 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("headImg")]
[System.Text.Json.Serialization.JsonPropertyName("headImg")]
public string HeadImageUrl { get; set; } = default!;
}
public class BusinessInfo
{
/// <summary>
/// 获取或设置小程序的 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置小程序的昵称。
/// </summary>
[Newtonsoft.Json.JsonProperty("nickName")]
[System.Text.Json.Serialization.JsonPropertyName("nickName")]
public string Nickname { get; set; } = default!;
/// <summary>
/// 获取或设置小程序的头像 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("headImg")]
[System.Text.Json.Serialization.JsonPropertyName("headImg")]
public string HeadImageUrl { get; set; } = default!;
}
public class ContentInfo
{
public static class Types
{
public class Media
{
/// <summary>
/// 获取或设置图片 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("img")]
[System.Text.Json.Serialization.JsonPropertyName("img")]
public string? ImageUrl { get; set; }
/// <summary>
/// 获取或设置缩略图 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("thumbImg")]
[System.Text.Json.Serialization.JsonPropertyName("thumbImg")]
public string? ImageThumbnailUrl { get; set; }
/// <summary>
/// 获取或设置视频 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("video")]
[System.Text.Json.Serialization.JsonPropertyName("video")]
public string? VideoUrl { get; set; }
/// <summary>
/// 获取或设置视频封面 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("videoCover")]
[System.Text.Json.Serialization.JsonPropertyName("videoCover")]
public string? VideoCoverUrl { get; set; }
/// <summary>
/// 获取或设置视频时长(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("videoDuration")]
[System.Text.Json.Serialization.JsonPropertyName("videoDuration")]
public int? VideoDuration { get; set; }
}
}
/// <summary>
/// 获取或设置评价内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("txt")]
[System.Text.Json.Serialization.JsonPropertyName("txt")]
public string Text { get; set; } = default!;
/// <summary>
/// 获取或设置媒体文件列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("media")]
[System.Text.Json.Serialization.JsonPropertyName("media")]
public Types.Media[]? MediaList { get; set; }
}
public class ExtraInfo
{
/// <summary>
/// 获取或设置是否已发过差评客服会话。
/// </summary>
[Newtonsoft.Json.JsonProperty("isAlreadySendTmpl")]
[System.Text.Json.Serialization.JsonPropertyName("isAlreadySendTmpl")]
public bool IsAlreadySendTemplate { get; set; }
}
public class ProductInfo
{
public static class Types
{
public class Product
{
/// <summary>
/// 获取或设置商品名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = default!;
/// <summary>
/// 获取或设置商品图片 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("picUrl")]
[System.Text.Json.Serialization.JsonPropertyName("picUrl")]
public string PictureUrl { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置商品列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("productList")]
[System.Text.Json.Serialization.JsonPropertyName("productList")]
public Types.Product[] ProductList { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置评价 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentId")]
[System.Text.Json.Serialization.JsonPropertyName("commentId")]
public string CommentId { get; set; } = default!;
/// <summary>
/// 获取或设置金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("amount")]
[System.Text.Json.Serialization.JsonPropertyName("amount")]
public int Amount { get; set; }
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("orderId")]
[System.Text.Json.Serialization.JsonPropertyName("orderId")]
public string OrderId { get; set; } = default!;
/// <summary>
/// 获取或设置微信支付订单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("wxPayId")]
[System.Text.Json.Serialization.JsonPropertyName("wxPayId")]
public string WechatpayTransactionId { get; set; } = default!;
/// <summary>
/// 获取或设置支付时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("payTime")]
[System.Text.Json.Serialization.JsonPropertyName("payTime")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long PayTimestamp { get; set; }
/// <summary>
/// 获取或设置创建时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("createTime")]
[System.Text.Json.Serialization.JsonPropertyName("createTime")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long CreateTimestamp { get; set; }
/// <summary>
/// 获取或设置评价分数。
/// </summary>
[Newtonsoft.Json.JsonProperty("score")]
[System.Text.Json.Serialization.JsonPropertyName("score")]
public int Score { get; set; }
/// <summary>
/// 获取或设置评价商品信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("productInfo")]
[System.Text.Json.Serialization.JsonPropertyName("productInfo")]
public Types.ProductInfo ProductInfo { get; set; } = default!;
/// <summary>
/// 获取或设置商家订单信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("orderInfo")]
[System.Text.Json.Serialization.JsonPropertyName("orderInfo")]
public Types.OrderInfo? OrderInfo { get; set; }
/// <summary>
/// 获取或设置评价订单信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("userInfo")]
[System.Text.Json.Serialization.JsonPropertyName("userInfo")]
public Types.UserInfo? UserInfo { get; set; }
/// <summary>
/// 获取或设置商家小程序信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("bizInfo")]
[System.Text.Json.Serialization.JsonPropertyName("bizInfo")]
public Types.BusinessInfo? BusinessInfo { get; set; }
/// <summary>
/// 获取或设置评价内容信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("content")]
[System.Text.Json.Serialization.JsonPropertyName("content")]
public Types.ContentInfo ContentInfo { get; set; } = default!;
/// <summary>
/// 获取或设置评价额外信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("extInfo")]
[System.Text.Json.Serialization.JsonPropertyName("extInfo")]
public Types.ExtraInfo ExtraInfo { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置评价列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentList")]
[System.Text.Json.Serialization.JsonPropertyName("commentList")]
public Types.Comment[] CommentList { get; set; } = default!;
/// <summary>
/// 获取或设置评价总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total")]
[System.Text.Json.Serialization.JsonPropertyName("total")]
public int TotalCount { get; set; }
/// <summary>
/// 获取或设置分页起始位置。
/// </summary>
[Newtonsoft.Json.JsonProperty("offset")]
[System.Text.Json.Serialization.JsonPropertyName("offset")]
public int? Offset { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxaapi/comment/commentreply/add 接口的请求。</para>
/// </summary>
public class WxaApiCommentReplyAddRequest : WechatApiRequest, IInferable<WxaApiCommentReplyAddRequest, WxaApiCommentReplyAddResponse>
{
/// <summary>
/// 获取或设置评价 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentId")]
[System.Text.Json.Serialization.JsonPropertyName("commentId")]
public string CommentId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置评论的内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("content")]
[System.Text.Json.Serialization.JsonPropertyName("content")]
public string Content { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxaapi/comment/commentreply/add 接口的响应。</para>
/// </summary>
public class WxaApiCommentReplyAddResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [GET] /wxaapi/comment/replyandcommentreplylist/get 接口的请求。</para>
/// </summary>
public class WxaApiCommentReplyAndCommentReplyListGetRequest : WechatApiRequest, IInferable<WxaApiCommentReplyAndCommentReplyListGetRequest, WxaApiCommentReplyAndCommentReplyListGetResponse>
{
/// <summary>
/// 获取或设置评价 ID。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string CommentId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,173 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [GET] /wxaapi/comment/replyandcommentreplylist/get 接口的响应。</para>
/// </summary>
public class WxaApiCommentReplyAndCommentReplyListGetResponse : WechatApiResponse
{
public static class Types
{
public class Data
{
public static class Types
{
public class Reply
{
public static class Types
{
public class ContentInfo
{
/// <summary>
/// 获取或设置内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("content")]
[System.Text.Json.Serialization.JsonPropertyName("content")]
public string Content { get; set; } = default!;
}
public class UserInfo
{
/// <summary>
/// 获取或设置昵称。
/// </summary>
[Newtonsoft.Json.JsonProperty("nickname")]
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
public string Nickname { get; set; } = default!;
/// <summary>
/// 获取或设置头像 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("imgUrl")]
[System.Text.Json.Serialization.JsonPropertyName("imgUrl")]
public string HeadImageUrl { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置评论 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("replyId")]
[System.Text.Json.Serialization.JsonPropertyName("replyId")]
public string ReplyId { get; set; } = default!;
/// <summary>
/// 获取或设置评价 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentId")]
[System.Text.Json.Serialization.JsonPropertyName("commentId")]
public string CommentId { get; set; } = default!;
/// <summary>
/// 获取或设置评论内容信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("replyContent")]
[System.Text.Json.Serialization.JsonPropertyName("replyContent")]
public Types.ContentInfo ContentInfo { get; set; } = default!;
/// <summary>
/// 获取或设置评论用户信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("replyObject")]
[System.Text.Json.Serialization.JsonPropertyName("replyObject")]
public Types.UserInfo UserInfo { get; set; } = default!;
/// <summary>
/// 获取或设置创建时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("createTime")]
[System.Text.Json.Serialization.JsonPropertyName("createTime")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long CreateTimestamp { get; set; }
/// <summary>
/// 获取或设置更新时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("updateTime")]
[System.Text.Json.Serialization.JsonPropertyName("updateTime")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long UpdateTimestamp { get; set; }
}
public class CommentReply
{
public static class Types
{
public class ContentInfo : Reply.Types.ContentInfo
{
}
public class UserInfo : Reply.Types.UserInfo
{
}
}
/// <summary>
/// 获取或设置回复 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentReplyId")]
[System.Text.Json.Serialization.JsonPropertyName("commentReplyId")]
public string CommentReplyId { get; set; } = default!;
/// <summary>
/// 获取或设置评价 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentId")]
[System.Text.Json.Serialization.JsonPropertyName("commentId")]
public string CommentId { get; set; } = default!;
/// <summary>
/// 获取或设置评论内容信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentReplyContent")]
[System.Text.Json.Serialization.JsonPropertyName("commentReplyContent")]
public Types.ContentInfo ContentInfo { get; set; } = default!;
/// <summary>
/// 获取或设置评论用户信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentReplyObject")]
[System.Text.Json.Serialization.JsonPropertyName("commentReplyObject")]
public Types.UserInfo UserInfo { get; set; } = default!;
/// <summary>
/// 获取或设置创建时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("createTime")]
[System.Text.Json.Serialization.JsonPropertyName("createTime")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long CreateTimestamp { get; set; }
/// <summary>
/// 获取或设置更新时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("updateTime")]
[System.Text.Json.Serialization.JsonPropertyName("updateTime")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long UpdateTimestamp { get; set; }
}
}
/// <summary>
/// 获取或设置评论信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("reply")]
[System.Text.Json.Serialization.JsonPropertyName("reply")]
public Types.Reply Reply { get; set; } = default!;
/// <summary>
/// 获取或设置评论回复列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentReplyList")]
[System.Text.Json.Serialization.JsonPropertyName("commentReplyList")]
public Types.CommentReply[] CommentReplyList { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置返回数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("list")]
[System.Text.Json.Serialization.JsonPropertyName("list")]
public Types.Data Data { get; set; } = default!;
}
}

View File

@@ -0,0 +1,29 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxaapi/comment/commentreply/delete 接口的请求。</para>
/// </summary>
public class WxaApiCommentReplyDeleteRequest : WechatApiRequest, IInferable<WxaApiCommentReplyDeleteRequest, WxaApiCommentReplyDeleteResponse>
{
/// <summary>
/// 获取或设置评价 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentId")]
[System.Text.Json.Serialization.JsonPropertyName("commentId")]
public string CommentId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置评论 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("replyId")]
[System.Text.Json.Serialization.JsonPropertyName("replyId")]
public string ReplyId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置评论回复 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("commentReplyId")]
[System.Text.Json.Serialization.JsonPropertyName("commentReplyId")]
public string CommentReplyId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /wxaapi/comment/commentreply/delete 接口的响应。</para>
/// </summary>
public class WxaApiCommentReplyDeleteResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,10 @@
<xml>
<ToUserName><![CDATA[gh_abcdefg]]></ToUserName>
<FromUserName><![CDATA[oABCD]]></FromUserName>
<CreateTime>1704038400</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[wxa_comment_bad_score]]></Event>
<result>
<comment_id>2272502024443330610</comment_id>
</result>
</xml>

View File

@@ -0,0 +1,15 @@
<xml>
<ToUserName>gh_abcdefg</ToUserName>
<FromUserName>oABCD</FromUserName>
<CreateTime>12344555555</CreateTime>
<MsgType>event</MsgType>
<Event>secbook_audit_event</Event>
<audit_event>
<book_id>A1b2C3d4</book_id>
<audit_detail>
<status>3</status>
<create_time>168625255</create_time>
<audit_time>168626255</audit_time>
</audit_detail>
</audit_event>
</xml>

View File

@@ -0,0 +1,5 @@
{
"commentId": "xxxxxxxxxx",
"picList": [ "mediaid", "mediaid" ],
"content": "我是和解的内容"
}

View File

@@ -0,0 +1,49 @@
{
"errcode": 0,
"commentList": [
{
"commentId": "2797755680173111111",
"amount": 100,
"orderId": "payorder@_4200001761202302096311111111",
"payTime": "1675915718",
"wxPayId": "4200001761202302096311111111",
"orderInfo": {
"busiOrderId": "xxxxxx"
},
"userInfo": {
"openid": "xxxxxxxxxx",
"headImg": "http://wx.qlogo.cn/mmhead/xxxxxxxxxxx",
"nickName": "test"
},
"bizInfo": {
"appid": "wx1234567890",
"headImg": "http://wx.qlogo.cn/mmhead/xxxxxxxxxxxx",
"nickName": "xxx"
},
"score": 200,
"createTime": "1676351504",
"content": {
"media": [
{
"img": "http://xxx",
"thumbImg": "http://xxx"
}
],
"txt": "一般吧 我总感觉这个成分很伤皮肤,用了之后一直很干燥,不是很喜欢这款产品"
},
"extInfo": {
"isAlreadySendTmpl": false
},
"productInfo": {
"productList": [
{
"name": "纸巾一张",
"picUrl": "https://xxxxxx"
}
]
}
}
],
"total": 3,
"offset": 0
}

View File

@@ -0,0 +1,4 @@
{
"commentId": "xxxxxxxxxx",
"content": "我是内容"
}

View File

@@ -0,0 +1,29 @@
{
"errcode": 0,
"list": {
"reply": {
"commentId": "123",
"replyId": "1",
"createTime": "1669032337",
"updateTime": "1669032341",
"replyContent": { "content": "999" },
"replyObject": {
"nickname": "小程序名称",
"imgUrl": "http://xxx/xx"
}
},
"commentReplyList": [
{
"commentId": "12345",
"commentReplyId": "1",
"createTime": "1669032388",
"updateTime": "1669032392",
"commentReplyContent": { "content": "uuuuuuuuu" },
"commentReplyObject": {
"nickname": "啊哈",
"imgUrl": "xxx"
}
}
]
}
}

View File

@@ -0,0 +1,5 @@
{
"commentId": "xxxxxxxxxx",
"replyId": "xxxxx",
"commentReplyId": "xxxxx"
}