mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 01:58:14 +08:00
feat(wxapi): 新增微信长辈就医相关接口
This commit is contained in:
@@ -53,6 +53,8 @@
|
||||
| √ | 微信发票 | |
|
||||
| √ | 微信非税缴费 | |
|
||||
| √ | 扫服务号二维码打开小程序 | |
|
||||
| √ | 微信就医助手 | |
|
||||
| √ | 微信长辈就医 | |
|
||||
|
||||
</details>
|
||||
|
||||
|
@@ -36,7 +36,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
/// <para>异步调用 [POST] /cityservice/sendchannelmsg 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://docs.qq.com/doc/DQXRyQURVdHJsaGJy ]]>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/offiaccount/medicalassistant.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
@@ -78,6 +78,55 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.CityServiceGetServicePathResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cityservice/getmedrealname 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/offiaccount/elderMedical/elderMedical-api.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CityServiceGetMedicalRealNameResponse> ExecuteCityServiceGetMedicalRealNameAsync(this WechatApiClient client, Models.CityServiceGetMedicalRealNameRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
if (request.AppId is null)
|
||||
request.AppId = client.Credentials.AppId;
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateFlurlRequest(request, HttpMethod.Post, "cityservice", "getmedrealname")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.CityServiceGetMedicalRealNameResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cityservice/getmsgrelation 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/offiaccount/elderMedical/elderMedical-api.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CityServiceGetMessageRelationResponse> ExecuteCityServiceGetMessageRelationAsync(this WechatApiClient client, Models.CityServiceGetMessageRelationRequest 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, "cityservice", "getmsgrelation")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.CityServiceGetMessageRelationResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
#region Face
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cityservice/face/identify/getuseridkey 接口。</para>
|
||||
|
@@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cityservice/getmedrealname 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CityServiceGetMedicalRealNameRequest : WechatApiRequest, IInferable<CityServiceGetMedicalRealNameRequest, CityServiceGetMedicalRealNameResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置业务方 AppId。如果不指定将使用构造 <see cref="WechatApiClient"/> 时的 <see cref="WechatApiClientOptions.AppId"/> 参数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("app_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("app_id")]
|
||||
public string? AppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_id")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置实名信息 Code。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("wxmed_authcode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("wxmed_authcode")]
|
||||
public string AuthCode { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cityservice/getmedrealname 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CityServiceGetMedicalRealNameResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置业务方 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("app_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("app_id")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_id")]
|
||||
public string OpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置实名信息加密密钥版本号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("key_version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("key_version")]
|
||||
public int KeyVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置加密后的实名信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cipher_real_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cipher_real_name")]
|
||||
public string CipherRealName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置加密算法。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cipher_algorithm")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cipher_algorithm")]
|
||||
public string CipherAlgorithm { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cityservice/getmsgrelation 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CityServiceGetMessageRelationRequest : WechatApiRequest, IInferable<CityServiceGetMessageRelationRequest, CityServiceGetMessageRelationResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置业务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("business_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_id")]
|
||||
public int BusinessId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_id")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cityservice/getmsgrelation 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CityServiceGetMessageRelationResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否已订阅。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_subscribed")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanReadOnlyConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_subscribed")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanReadOnlyConverter))]
|
||||
public bool IsSubscribed { get; set; }
|
||||
}
|
||||
}
|
@@ -651,6 +651,15 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("business_id")]
|
||||
public int BusinessId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否是测试版本。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("testonly_is_trial")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("testonly_is_trial")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
|
||||
public bool? IsTrial { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置业务字段。
|
||||
/// </summary>
|
||||
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"app_id": "wx23dde3xd34569cba",
|
||||
"open_id": "ont-9vr_is4GBmeuh_xy1YHidhgY",
|
||||
"wxmed_authcode": "BMUewIb9qr2GMDeInZKOBg.."
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"cipher_real_name": "",
|
||||
"cipher_algorithm": "",
|
||||
"key_version": 0,
|
||||
"app_id": "",
|
||||
"open_id": ""
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"business_id": 130,
|
||||
"open_id": "ont-9vr_is4GBmeuh_xy1YHidhgY"
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"is_subscribed": 1
|
||||
}
|
Reference in New Issue
Block a user