mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
feat(work): 新增防疫场所码相关接口
This commit is contained in:
parent
e4dc019282
commit
1b77eb377a
@ -436,5 +436,67 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinReportResidentGetOrderInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SiteCode
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/report/sitecode/list 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/93514 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinReportSiteCodeListResponse> ExecuteCgibinReportSiteCodeListAsync(this WechatWorkClient client, Models.CgibinReportSiteCodeListRequest 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, "cgi-bin", "report", "sitecode", "list")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinReportSiteCodeListResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/report/sitecode/get_site_report_info 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95461 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinReportSiteCodeGetSiteReportInfoResponse> ExecuteCgibinReportSiteCodeGetSiteReportInfoAsync(this WechatWorkClient client, Models.CgibinReportSiteCodeGetSiteReportInfoRequest 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, "cgi-bin", "report", "sitecode", "get_site_report_info")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinReportSiteCodeGetSiteReportInfoResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/report/sitecode/get_report_answer 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95464 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinReportSiteCodeGetReportAnswerResponse> ExecuteCgibinReportSiteCodeGetReportAnswerAsync(this WechatWorkClient client, Models.CgibinReportSiteCodeGetReportAnswerRequest 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, "cgi-bin", "report", "sitecode", "get_report_answer")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinReportSiteCodeGetReportAnswerResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -322,8 +322,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
.CreateRequest(request, HttpMethod.Get, "cgi-bin", "user", "list_member_auth")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.NextCursor != null)
|
||||
flurlReq.SetQueryParam("cursor", request.NextCursor);
|
||||
if (request.Cursor != null)
|
||||
flurlReq.SetQueryParam("cursor", request.Cursor);
|
||||
|
||||
if (request.Limit != null)
|
||||
flurlReq.SetQueryParam("limit", request.Limit);
|
||||
|
@ -19,7 +19,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -24,6 +24,6 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -10,7 +10,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -46,6 +46,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -195,6 +195,6 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,6 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,6 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,6 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,6 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -10,7 +10,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -10,7 +10,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -24,6 +24,6 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -17,7 +17,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页每页数量。
|
||||
|
@ -327,7 +327,7 @@
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("has_more")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool HasMore { get; set; } = default!;
|
||||
public bool HasMore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
|
@ -17,7 +17,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -17,6 +17,6 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string NextCursor { get; set; } = "0";
|
||||
public string Cursor { get; set; } = "0";
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -46,7 +46,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public int NextCursor { get; set; }
|
||||
public int Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -33,7 +33,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public int NextCursor { get; set; }
|
||||
public int Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -24,7 +24,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -0,0 +1,36 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/report/sitecode/get_report_answer 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinReportSiteCodeGetReportAnswerRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置场所码 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("siteid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("siteid")]
|
||||
public string SiteCodeId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("date")]
|
||||
public string DateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/report/sitecode/get_report_answer 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinReportSiteCodeGetReportAnswerResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Answer
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ReportValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置问题 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_id")]
|
||||
public int QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单选题答案 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("single_choice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("single_choice")]
|
||||
public int? SingleChoiceOptionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置多选题答案 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("multi_choice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("multi_choice")]
|
||||
public int[]? MultiChoiceOptionIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置填空题答案内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string? Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string? Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置行程卡类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("itinerary_card_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("itinerary_card_type")]
|
||||
public int? ItineraryCardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置高风险行程信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("high_risk_area")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("high_risk_area")]
|
||||
public string? HighRiskArea { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上报时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("report_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("report_time")]
|
||||
public long ReportTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上报信息列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("report_values")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("report_values")]
|
||||
public Types.ReportValue[] ReportValueList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置答案列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("answers")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("answers")]
|
||||
public Types.Answer[] AnswerList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否还有更多数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("has_more")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("has_more")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool HasMore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/report/sitecode/get_site_report_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinReportSiteCodeGetSiteReportInfoRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置场所码 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("siteid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("siteid")]
|
||||
public string SiteCodeId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/report/sitecode/get_site_report_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinReportSiteCodeGetSiteReportInfoResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class QuestionTemplate
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Option
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置选项 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("option_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("option_id")]
|
||||
public int OptionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置选项文案。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("option_text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("option_text")]
|
||||
public string OptionText { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_id")]
|
||||
public int QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_type")]
|
||||
public int QuestionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否必填。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_required")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_required")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置选项列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("option_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("option_list")]
|
||||
public Types.Option[]? OptionList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置健康上报问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_templates")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_templates")]
|
||||
public Types.QuestionTemplate[] QuestionTemplateList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/report/sitecode/list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinReportSiteCodeListRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/report/sitecode/list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinReportSiteCodeListResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SiteCode
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置场所码 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public string Id { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场所码类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public string Type { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场所码行政区域。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("area")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("area")]
|
||||
public string Area { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场所码详细地址。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("address")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("address")]
|
||||
public string Address { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场所码名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置负责人 UserId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("admin")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("admin")]
|
||||
public string[] AdminUserIdList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二维码 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qr_code_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qr_code_url")]
|
||||
public string QrcodeUrl { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场所码列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("site_code_infos")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("site_code_infos")]
|
||||
public Types.SiteCode[] SiteCodeList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
}
|
||||
}
|
@ -17,6 +17,6 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -10,7 +10,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? NextCursor { get; set; }
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"siteid": "siteid",
|
||||
"date": "2020-03-27",
|
||||
"cursor": "cursor",
|
||||
"limit": 100
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"answers": [
|
||||
{
|
||||
"report_time": 123456789,
|
||||
"report_values": [
|
||||
{
|
||||
"question_id": 1,
|
||||
"single_choice": 2
|
||||
},
|
||||
{
|
||||
"question_id": 2,
|
||||
"text": "广东省广州市"
|
||||
},
|
||||
{
|
||||
"question_id": 3,
|
||||
"multi_choice": [1, 3]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"report_time": 123456789,
|
||||
"report_values": [
|
||||
{
|
||||
"question_id": 1,
|
||||
"single_choice": 1
|
||||
},
|
||||
{
|
||||
"question_id": 2,
|
||||
"text": "广东省深圳市"
|
||||
},
|
||||
{
|
||||
"question_id": 3,
|
||||
"multi_choice": [1, 2, 3]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"next_cursor": "NEXT_CURSOR",
|
||||
"has_more": 0
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"siteid": "siteid"
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"question_templates": [
|
||||
{
|
||||
"question_id": 1,
|
||||
"title": "常驻地址",
|
||||
"question_type": 1,
|
||||
"is_required": 0
|
||||
},
|
||||
{
|
||||
"question_id": 2,
|
||||
"title": "请问你有任何身体不适吗?",
|
||||
"question_type": 2,
|
||||
"is_required": 1,
|
||||
"option_list": [
|
||||
{
|
||||
"option_id": 1,
|
||||
"option_text": "有"
|
||||
},
|
||||
{
|
||||
"option_id": 2,
|
||||
"option_text": "没有"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"cursor": "CURSOR",
|
||||
"limit": 100
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"site_code_infos": [
|
||||
{
|
||||
"id": "siteid",
|
||||
"type": "商场超市",
|
||||
"area": "广东省/广州市/荔湾区",
|
||||
"address": "广州市广州大饭店",
|
||||
"name": "广州市广州大饭店",
|
||||
"admin": ["zhangsan", "lisi"],
|
||||
"qr_code_url": "https://www.abc"
|
||||
},
|
||||
{
|
||||
"id": "siteid",
|
||||
"type": "商场超市",
|
||||
"area": "广东省/广州市/荔湾区",
|
||||
"address": "广州市广州大饭店",
|
||||
"name": "广州市广州大饭店",
|
||||
"admin": ["zhangsan", "lisi"],
|
||||
"qr_code_url": "https://www.abc"
|
||||
}
|
||||
],
|
||||
"next_cursor": "NEXT_CURSOR"
|
||||
}
|
Loading…
Reference in New Issue
Block a user