From 6123794193a0cd26ea7ddf8ae4a6256b3e30e12c Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Mon, 15 Jan 2024 13:53:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(wxapi):=20=E6=96=B0=E5=A2=9E=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=B1=E5=8C=BB=E5=8A=A9=E6=89=8B=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=8E=A8=E9=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...atApiClientExecuteCityServiceExtensions.cs | 20 + .../CityServiceSendChannelMessageRequest.cs | 661 ++++++++++++++++++ .../CityServiceSendChannelMessageResponse.cs | 9 + .../CityServiceSendMessageDataRequest.cs | 4 +- .../CityServiceSendChannelMessageRequest.json | 10 + 5 files changed, 702 insertions(+), 2 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendChannelMessageRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendChannelMessageResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CityService/CityServiceSendChannelMessageRequest.json diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCityServiceExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCityServiceExtensions.cs index 7ede26b7e..4e9513aaf 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCityServiceExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteCityServiceExtensions.cs @@ -29,6 +29,26 @@ public static class WechatApiClientExecuteCityServiceExtensions return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } + /// + /// 异步调用 [POST] /cityservice/sendchannelmsg 接口。 + /// REF: https://docs.qq.com/doc/DQXRyQURVdHJsaGJy + /// + /// + /// + /// + /// + public static async Task ExecuteCityServiceSendChannelMessageAsync(this WechatApiClient client, Models.CityServiceSendChannelMessageRequest 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, "cityservice", "sendchannelmsg") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + /// /// 异步调用 [POST] /cityservice/getservicepath 接口。 /// REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/cityservice/InterconnectionCapabilities/API/API.html diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendChannelMessageRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendChannelMessageRequest.cs new file mode 100644 index 000000000..e20cb53cc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendChannelMessageRequest.cs @@ -0,0 +1,661 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cityservice/sendchannelmsg 接口的请求。 + /// + public class CityServiceSendChannelMessageRequest : WechatApiRequest, IInferable + { + public static class Types + { + /// + /// 业务参数基类。 + /// + public class BusinessInfo + { + public static class Types + { + public class RedirectPage + { + /// + /// 获取或设置页面类型。 + /// + [Newtonsoft.Json.JsonProperty("page_type")] + [System.Text.Json.Serialization.JsonPropertyName("page_type")] + public string PageType { get; set; } = string.Empty; + + /// + /// 获取或设置网址。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("fullpath")] + [System.Text.Json.Serialization.JsonPropertyName("fullpath")] + public string? PagePath { get; set; } + } + } + + /// + /// 获取或设置跳转页面信息。 + /// + [Newtonsoft.Json.JsonProperty("redirect_page")] + [System.Text.Json.Serialization.JsonPropertyName("redirect_page")] + public Types.RedirectPage? RedirectPage { get; set; } + + /// + /// 获取或设置扩展字段。 + /// + [Newtonsoft.Json.JsonExtensionData] + [System.Text.Json.Serialization.JsonExtensionData] + public IDictionary? ExtensionData { get; set; } + } + + /// + /// 就医助手业务(: 150)参数。 + /// + public class BusinessInfoAs150 : BusinessInfo + { + /// + /// 获取或设置取药地址。 + /// + [Newtonsoft.Json.JsonProperty("address")] + [System.Text.Json.Serialization.JsonPropertyName("address")] + public string? Address { get; set; } + + /// + /// 获取或设置住院号。 + /// + [Newtonsoft.Json.JsonProperty("admission_no")] + [System.Text.Json.Serialization.JsonPropertyName("admission_no")] + public string? AdmissionNumber { get; set; } + + /// + /// 获取或设置入院时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("admission_time")] + [System.Text.Json.Serialization.JsonPropertyName("admission_time")] + public string? AdmissionTimeString { get; set; } + + /// + /// 获取或设置金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("amount")] + [System.Text.Json.Serialization.JsonPropertyName("amount")] + public int? Amount { get; set; } + + /// + /// 获取或设置申请状态。 + /// + [Newtonsoft.Json.JsonProperty("apply_status")] + [System.Text.Json.Serialization.JsonPropertyName("apply_status")] + public string? ApplyStatus { get; set; } + + /// + /// 获取或设置预约日期字符串。 + /// + [Newtonsoft.Json.JsonProperty("appointment_date")] + [System.Text.Json.Serialization.JsonPropertyName("appointment_date")] + public string? AppointmentDateString { get; set; } + + /// + /// 获取或设置预约进度。 + /// + [Newtonsoft.Json.JsonProperty("appointment_progress")] + [System.Text.Json.Serialization.JsonPropertyName("appointment_progress")] + public string? AppointmentProgress { get; set; } + + /// + /// 获取或设置预约时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("appointment_time")] + [System.Text.Json.Serialization.JsonPropertyName("appointment_time")] + public string? AppointmentTimeString { get; set; } + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("audit_status")] + [System.Text.Json.Serialization.JsonPropertyName("audit_status")] + public string? AuditStatus { get; set; } + + /// + /// 获取或设置余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("balance")] + [System.Text.Json.Serialization.JsonPropertyName("balance")] + public int? Balance { get; set; } + + /// + /// 获取或设置床位状态。 + /// + [Newtonsoft.Json.JsonProperty("bed_status")] + [System.Text.Json.Serialization.JsonPropertyName("bed_status")] + public string? BedStatus { get; set; } + + /// + /// 获取或设置清单日期字符串。 + /// + [Newtonsoft.Json.JsonProperty("checklist_date")] + [System.Text.Json.Serialization.JsonPropertyName("checklist_date")] + public string? ChecklistDateString { get; set; } + + /// + /// 获取或设置结算时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("clear_time")] + [System.Text.Json.Serialization.JsonPropertyName("clear_time")] + public string? ClearTimeString { get; set; } + + /// + /// 获取或设置评价状态。 + /// + [Newtonsoft.Json.JsonProperty("comment_status")] + [System.Text.Json.Serialization.JsonPropertyName("comment_status")] + public string? CommentStatus { get; set; } + + /// + /// 获取或设置危急值项目。 + /// + [Newtonsoft.Json.JsonProperty("critical_value_name")] + [System.Text.Json.Serialization.JsonPropertyName("critical_value_name")] + public string? CriticalValueName { get; set; } + + /// + /// 获取或设置危急值结果。 + /// + [Newtonsoft.Json.JsonProperty("critical_value_result")] + [System.Text.Json.Serialization.JsonPropertyName("critical_value_result")] + public string? CriticalValueResult { get; set; } + + /// + /// 获取或设置配送内容。 + /// + [Newtonsoft.Json.JsonProperty("deliver_content")] + [System.Text.Json.Serialization.JsonPropertyName("deliver_content")] + public string? DeliverContent { get; set; } + + /// + /// 获取或设置配送单号。 + /// + [Newtonsoft.Json.JsonProperty("deliver_no")] + [System.Text.Json.Serialization.JsonPropertyName("deliver_no")] + public string? DeliverNumber { get; set; } + + /// + /// 获取或设置科室名称。 + /// + [Newtonsoft.Json.JsonProperty("department_name")] + [System.Text.Json.Serialization.JsonPropertyName("department_name")] + public string? DepartmentName { get; set; } + + /// + /// 获取或设置押金金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("deposit")] + [System.Text.Json.Serialization.JsonPropertyName("deposit")] + public int? Deposit { get; set; } + + /// + /// 获取或设置检出时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("detect_time")] + [System.Text.Json.Serialization.JsonPropertyName("detect_time")] + public string? DetectTimeString { get; set; } + + /// + /// 获取或设置医嘱内容。 + /// + [Newtonsoft.Json.JsonProperty("doc_advice")] + [System.Text.Json.Serialization.JsonPropertyName("doc_advice")] + public string? DoctorAdvice { get; set; } + + /// + /// 获取或设置医生姓名。 + /// + [Newtonsoft.Json.JsonProperty("doc_name")] + [System.Text.Json.Serialization.JsonPropertyName("doc_name")] + public string? DoctorName { get; set; } + + /// + /// 获取或设置办理时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("enter_time")] + [System.Text.Json.Serialization.JsonPropertyName("enter_time")] + public string? EnterTimeString { get; set; } + + /// + /// 获取或设置失败原因。 + /// + [Newtonsoft.Json.JsonProperty("fail_reason")] + [System.Text.Json.Serialization.JsonPropertyName("fail_reason")] + public string? FailReason { get; set; } + + /// + /// 获取或设置金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("fee")] + [System.Text.Json.Serialization.JsonPropertyName("fee")] + public int? Fee { get; set; } + + /// + /// 获取或设置文档类型。 + /// + [Newtonsoft.Json.JsonProperty("file_type")] + [System.Text.Json.Serialization.JsonPropertyName("file_type")] + public string? FileType { get; set; } + + /// + /// 获取或设置随访状态。 + /// + [Newtonsoft.Json.JsonProperty("follow_up_status")] + [System.Text.Json.Serialization.JsonPropertyName("follow_up_status")] + public string? FollowUpStatus { get; set; } + + /// + /// 获取或设置住院医院。 + /// + [Newtonsoft.Json.JsonProperty("hospital_name")] + [System.Text.Json.Serialization.JsonPropertyName("hospital_name")] + public string? HospitalName { get; set; } + + /// + /// 获取或设置转入医院。 + /// + [Newtonsoft.Json.JsonProperty("in_hospital")] + [System.Text.Json.Serialization.JsonPropertyName("in_hospital")] + public string? InHospital { get; set; } + + /// + /// 获取或设置住院状态。 + /// + [Newtonsoft.Json.JsonProperty("in_hospital_state")] + [System.Text.Json.Serialization.JsonPropertyName("in_hospital_state")] + public string? InHospitalState { get; set; } + + /// + /// 获取或设置发起方。 + /// + [Newtonsoft.Json.JsonProperty("initiator")] + [System.Text.Json.Serialization.JsonPropertyName("initiator")] + public string? Initiator { get; set; } + + /// + /// 获取或设置发起时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("init_time")] + [System.Text.Json.Serialization.JsonPropertyName("init_time")] + public string? InitTimeString { get; set; } + + /// + /// 获取或设置问诊时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("inquiry_time")] + [System.Text.Json.Serialization.JsonPropertyName("inquiry_time")] + public string? InquiryTimeString { get; set; } + + /// + /// 获取或设置检查项目。 + /// + [Newtonsoft.Json.JsonProperty("inspect_item")] + [System.Text.Json.Serialization.JsonPropertyName("inspect_item")] + public string? InspectItem { get; set; } + + /// + /// 获取或设置检查地点。 + /// + [Newtonsoft.Json.JsonProperty("inspect_place")] + [System.Text.Json.Serialization.JsonPropertyName("inspect_place")] + public string? InspectPlace { get; set; } + + /// + /// 获取或设置检查时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("inspect_time")] + [System.Text.Json.Serialization.JsonPropertyName("inspect_time")] + public string? InspectTimeString { get; set; } + + /// + /// 获取或设置体检项目。 + /// + [Newtonsoft.Json.JsonProperty("medical_item")] + [System.Text.Json.Serialization.JsonPropertyName("medical_item")] + public string? MedicalItem { get; set; } + + /// + /// 获取或设置体检地点。 + /// + [Newtonsoft.Json.JsonProperty("medical_place")] + [System.Text.Json.Serialization.JsonPropertyName("medical_place")] + public string? MedicalPlace { get; set; } + + /// + /// 获取或设置体检时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("medical_time")] + [System.Text.Json.Serialization.JsonPropertyName("medical_time")] + public string? MedicalTimeString { get; set; } + + /// + /// 获取或设置药品内容。 + /// + [Newtonsoft.Json.JsonProperty("medicine")] + [System.Text.Json.Serialization.JsonPropertyName("medicine")] + public string? Medicine { get; set; } + + /// + /// 获取或设置药品名称。 + /// + [Newtonsoft.Json.JsonProperty("medicine_name")] + [System.Text.Json.Serialization.JsonPropertyName("medicine_name")] + public string? MedicineName { get; set; } + + /// + /// 获取或设置用药提醒。 + /// + [Newtonsoft.Json.JsonProperty("medicine_remind")] + [System.Text.Json.Serialization.JsonPropertyName("medicine_remind")] + public string? MedicineRemind { get; set; } + + /// + /// 获取或设置就医须知。 + /// + [Newtonsoft.Json.JsonProperty("memo")] + [System.Text.Json.Serialization.JsonPropertyName("memo")] + public string? Memo { get; set; } + + /// + /// 获取或设置转出医院。 + /// + [Newtonsoft.Json.JsonProperty("out_hospital")] + [System.Text.Json.Serialization.JsonPropertyName("out_hospital")] + public string? OutHospital { get; set; } + + /// + /// 获取或设置患者就诊卡号。 + /// + [Newtonsoft.Json.JsonProperty("pat_hospital_id")] + [System.Text.Json.Serialization.JsonPropertyName("pat_hospital_id")] + public string? PatientHospitalId { get; set; } + + /// + /// 获取或设置患者姓名。 + /// + [Newtonsoft.Json.JsonProperty("pat_name")] + [System.Text.Json.Serialization.JsonPropertyName("pat_name")] + public string? PatientName { get; set; } + + /// + /// 获取或设置缴费金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("pay_amount")] + [System.Text.Json.Serialization.JsonPropertyName("pay_amount")] + public int? PayAmount { get; set; } + + /// + /// 获取或设置支付时间戳。 + /// + [Newtonsoft.Json.JsonProperty("pay_time")] + [System.Text.Json.Serialization.JsonPropertyName("pay_time")] + public long? PayTimestamp { get; set; } + + /// + /// 获取或设置处方内容。 + /// + [Newtonsoft.Json.JsonProperty("prescription_content")] + [System.Text.Json.Serialization.JsonPropertyName("prescription_content")] + public string? PrescriptionContent { get; set; } + + /// + /// 获取或设置开方时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("rescription_time")] + [System.Text.Json.Serialization.JsonPropertyName("rescription_time")] + public string? PrescriptionTimeString { get; set; } + + /// + /// 获取或设置领取方式。 + /// + [Newtonsoft.Json.JsonProperty("receive_way")] + [System.Text.Json.Serialization.JsonPropertyName("receive_way")] + public string? ReceiveWay { get; set; } + + /// + /// 获取或设置接诊状态。 + /// + [Newtonsoft.Json.JsonProperty("reception_status")] + [System.Text.Json.Serialization.JsonPropertyName("reception_status")] + public string? ReceptionStatus { get; set; } + + /// + /// 获取或设置待充值金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("recharge_amount")] + [System.Text.Json.Serialization.JsonPropertyName("recharge_amount")] + public int? RechargeAmount { get; set; } + + /// + /// 获取或设置可退余额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("refundable_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refundable_amount")] + public int? RefundableBalance { get; set; } + + /// + /// 获取或设置退款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_amount")] + public int? RefundAmount { get; set; } + + /// + /// 获取或设置退款结果。 + /// + [Newtonsoft.Json.JsonProperty("refund_result")] + [System.Text.Json.Serialization.JsonPropertyName("refund_result")] + public string? RefundResult { get; set; } + + /// + /// 获取或设置退款状态。 + /// + [Newtonsoft.Json.JsonProperty("refund_status")] + [System.Text.Json.Serialization.JsonPropertyName("refund_status")] + public string? RefundStatus { get; set; } + + /// + /// 获取或设置拒诊原因。 + /// + [Newtonsoft.Json.JsonProperty("reject_reason")] + [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置回复内容。 + /// + [Newtonsoft.Json.JsonProperty("reply_content")] + [System.Text.Json.Serialization.JsonPropertyName("reply_content")] + public string? ReplyContent { get; set; } + + /// + /// 获取或设置回复时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("reply_time")] + [System.Text.Json.Serialization.JsonPropertyName("reply_time")] + public string? ReplyTimeString { get; set; } + + /// + /// 获取或设置复诊计划。 + /// + [Newtonsoft.Json.JsonProperty("revisit_plan")] + [System.Text.Json.Serialization.JsonPropertyName("revisit_plan")] + public string? RevisitPlan { get; set; } + + /// + /// 获取或设置签署状态。 + /// + [Newtonsoft.Json.JsonProperty("sign_status")] + [System.Text.Json.Serialization.JsonPropertyName("sign_status")] + public string? SignStatus { get; set; } + + /// + /// 获取或设置停诊原因。 + /// + [Newtonsoft.Json.JsonProperty("stop_reason")] + [System.Text.Json.Serialization.JsonPropertyName("stop_reason")] + public string? StopReason { get; set; } + + /// + /// 获取或设置手术医生。 + /// + [Newtonsoft.Json.JsonProperty("surgery_doc")] + [System.Text.Json.Serialization.JsonPropertyName("surgery_doc")] + public string? SuegeryDoctor { get; set; } + + /// + /// 获取或设置手术名称。 + /// + [Newtonsoft.Json.JsonProperty("suegery_name")] + [System.Text.Json.Serialization.JsonPropertyName("suegery_name")] + public string? SuegeryName { get; set; } + + /// + /// 获取或设置手术时间字符串。 + /// + [Newtonsoft.Json.JsonProperty("surgery_time")] + [System.Text.Json.Serialization.JsonPropertyName("surgery_time")] + public string? SuegeryTimeString { get; set; } + + /// + /// 获取或设置手术科室。 + /// + [Newtonsoft.Json.JsonProperty("surgery_department")] + [System.Text.Json.Serialization.JsonPropertyName("surgery_department")] + public string? SurgeryDepartment { get; set; } + + /// + /// 获取或设置手术进度。 + /// + [Newtonsoft.Json.JsonProperty("surgery_stage")] + [System.Text.Json.Serialization.JsonPropertyName("surgery_stage")] + public string? SurgeryStage { get; set; } + + /// + /// 获取或设置开票日期字符串。 + /// + [Newtonsoft.Json.JsonProperty("ticket_date")] + [System.Text.Json.Serialization.JsonPropertyName("ticket_date")] + public string? TicketDateString { get; set; } + + /// + /// 获取或设置开票时间戳。 + /// + [Newtonsoft.Json.JsonProperty("ticket_time")] + [System.Text.Json.Serialization.JsonPropertyName("ticket_time")] + public long? TicketTimestamp { get; set; } + + /// + /// 获取或设置就医须知。 + /// + [Newtonsoft.Json.JsonProperty("tips")] + [System.Text.Json.Serialization.JsonPropertyName("tips")] + public string? Tips { get; set; } + + /// + /// 获取或设置待办事项。 + /// + [Newtonsoft.Json.JsonProperty("todo")] + [System.Text.Json.Serialization.JsonPropertyName("todo")] + public string? Todo { get; set; } + + /// + /// 获取或设置交易金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("trade_amount")] + [System.Text.Json.Serialization.JsonPropertyName("trade_amount")] + public int? TradeAmount { get; set; } + + /// + /// 获取或设置交易时间戳。 + /// + [Newtonsoft.Json.JsonProperty("trade_time")] + [System.Text.Json.Serialization.JsonPropertyName("trade_time")] + public long? TradeTimestamp { get; set; } + + /// + /// 获取或设置转诊状态。 + /// + [Newtonsoft.Json.JsonProperty("transfer_status")] + [System.Text.Json.Serialization.JsonPropertyName("transfer_status")] + public string? TransferStatus { get; set; } + + /// + /// 获取或设置候诊状态。 + /// + [Newtonsoft.Json.JsonProperty("wait_status")] + [System.Text.Json.Serialization.JsonPropertyName("wait_status")] + public string? WaitStatus { get; set; } + } + } + + /// + /// 获取或设置微信 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string AppId { get; set; } = string.Empty; + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置业务方订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string? OrderId { get; set; } + + /// + /// 获取或设置业务方消息 ID。 + /// + [Newtonsoft.Json.JsonProperty("msg_id")] + [System.Text.Json.Serialization.JsonPropertyName("msg_id")] + public string MessageId { get; set; } = string.Empty; + + /// + /// 获取或设置子状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置业务 ID。 + /// + [Newtonsoft.Json.JsonProperty("business_id")] + [System.Text.Json.Serialization.JsonPropertyName("business_id")] + public int BusinessId { get; set; } + + /// + /// 获取或设置业务字段。 + /// + [Newtonsoft.Json.JsonProperty("business_info")] + [System.Text.Json.Serialization.JsonPropertyName("business_info")] + public Types.BusinessInfo? BusinessInfo { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendChannelMessageResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendChannelMessageResponse.cs new file mode 100644 index 000000000..3eceb4a40 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendChannelMessageResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /cityservice/sendchannelmsg 接口的响应。 + /// + public class CityServiceSendChannelMessageResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendMessageDataRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendMessageDataRequest.cs index d4e060b86..571f5a460 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendMessageDataRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CityService/CityServiceSendMessageDataRequest.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace SKIT.FlurlHttpClient.Wechat.Api.Models { @@ -15,7 +15,7 @@ public class DataItem : CgibinMessageTemplateSendRequest.Types.DataItem } /// - /// 获取或设置用户唯一标识。 + /// 获取或设置用户的 OpenId。 /// [Newtonsoft.Json.JsonProperty("openid")] [System.Text.Json.Serialization.JsonPropertyName("openid")] diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CityService/CityServiceSendChannelMessageRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CityService/CityServiceSendChannelMessageRequest.json new file mode 100644 index 000000000..23d4b2a64 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/CityService/CityServiceSendChannelMessageRequest.json @@ -0,0 +1,10 @@ +{ + "status": 0, + "open_id": "ksdjgkjslkgvjlsakdfj", + "order_id": "order1", + "app_id": "wx23dde3xd34569cba", + "msg_id": "msg1", + "business_id": 0, + "business_info": { + } +}