mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-16 16:50:43 +08:00
feat(work): 随官方更新微信客服接待人员管理相关接口模型
This commit is contained in:
parent
9eed805c78
commit
9d2e86750e
@ -32,7 +32,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/kf/account/list 接口。</para>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/account/list 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/94661 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/94691 </para>
|
||||
/// </summary>
|
||||
@ -46,7 +46,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Get, "cgi-bin", "kf", "account", "list")
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "kf", "account", "list")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfAccountListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
|
@ -1,9 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/kf/account/list 接口的请求。</para>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/account/list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfAccountListRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("offset")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/kf/account/list 接口的响应。</para>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/account/list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfAccountListResponse : WechatWorkResponse
|
||||
{
|
||||
|
@ -19,6 +19,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid_list")]
|
||||
public IList<string> UserIdList { get; set; } = new List<string>();
|
||||
public IList<string>? UserIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置接待人员的部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_id_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_id_list")]
|
||||
public IList<int>? DepartmentIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid_list")]
|
||||
public IList<string> UserIdList { get; set; } = new List<string>();
|
||||
public IList<string>? UserIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置接待人员的部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_id_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_id_list")]
|
||||
public IList<int>? DepartmentIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -14,14 +14,21 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string UserId { get; set; } = default!;
|
||||
public string? UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置接待状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置接待人员的部门 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_id")]
|
||||
public int? DepartmentId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,8 @@
|
||||
"oper_userid": "rocky",
|
||||
"add_way": 10,
|
||||
"wechat_channels": {
|
||||
"nickname": "视频号名称"
|
||||
"nickname": "视频号名称",
|
||||
"source": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1 +1,4 @@
|
||||
{}
|
||||
{
|
||||
"offset": 0,
|
||||
"limit": 100
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
{
|
||||
"open_kfid": "kfxxxxxxxxxxxxxx",
|
||||
"userid_list": [
|
||||
"zhangsan",
|
||||
"lisi"
|
||||
]
|
||||
"userid_list": [ "zhangsan", "lisi" ],
|
||||
"department_id_list": [ 2, 4 ]
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
{
|
||||
"open_kfid": "kfxxxxxxxxxxxxxx",
|
||||
"userid_list": [
|
||||
"zhangsan",
|
||||
"lisi"
|
||||
]
|
||||
"userid_list": [ "zhangsan", "lisi" ],
|
||||
"department_id_list": [ 2, 4 ]
|
||||
}
|
@ -9,6 +9,12 @@
|
||||
{
|
||||
"userid": "lisi",
|
||||
"status": 1
|
||||
},
|
||||
{
|
||||
"department_id": 2
|
||||
},
|
||||
{
|
||||
"department_id": 3
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user