mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 14:04:32 +08:00
feat(work): 新增根据会议室预定 ID 查询预定详情接口
This commit is contained in:
parent
193f4c207f
commit
58ad0af933
@ -523,6 +523,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinOAMeetingRoomCancelBookResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/oa/meetingroom/bookinfo/get 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/93620 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinOAMeetingRoomBookInfoGetResponse> ExecuteCgibinOAMeetingRoomBookInfoGetAsync(this WechatWorkClient client, Models.CgibinOAMeetingRoomBookInfoGetRequest 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", "oa", "meetingroom", "bookinfo", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinOAMeetingRoomBookInfoGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/oa/meetingroom/bookinfo/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinOAMeetingRoomBookInfoGetRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置会议室 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("meetingroom_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("meetingroom_id")]
|
||||
public int MeetingRoomId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置预定 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("booking_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("booking_id")]
|
||||
public string BookingId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/oa/meetingroom/bookinfo/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinOAMeetingRoomBookInfoGetResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Schedule : CgibinOAMeetingRoomGetBookingInfoResponse.Types.Booking.Types.Schedule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置预定 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("booking_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("booking_id")]
|
||||
public string BookingId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主预定 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("master_booking_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("master_booking_id")]
|
||||
public string? MasterBookingId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置会议室 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("meetingroom_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("meetingroom_id")]
|
||||
public int MeetingRoomId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置预定信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("schedule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("schedule")]
|
||||
public Types.Schedule Schedule { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"meetingroom_id": 1,
|
||||
"booking_id": "bkebsada6e027c123cbafAAA"
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"meetingroom_id": 1,
|
||||
"schedule": {
|
||||
"booking_id": "bkebsada6e027c123cbafAAA",
|
||||
"master_booking_id": "rbsho97cbidajgixnyk8eAA",
|
||||
"schedule_id": "17c7d2bd9f20d652840f72f59e796AAA",
|
||||
"start_time": 1593532800,
|
||||
"end_time": 1593662400,
|
||||
"booker": "zhangsan",
|
||||
"status": 0
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user