mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-15 21:06:27 +08:00
feat(work): 新增获取单个部门和子部门 ID 列表的相关接口
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/department/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinDepartmentGetRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int DepartmentId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/department/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinDepartmentGetResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Department : CgibinDepartmentListResponse.Types.Department
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department")]
|
||||
public Types.Department Department { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/department/simplelist 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinDepartmentSimpleListRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置指定上级部门 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? ParentDepartmentId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/department/simplelist 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinDepartmentSimpleListResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Department
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id")]
|
||||
public int DepartmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上级部门 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("parentid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("parentid")]
|
||||
public int ParentDepartmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置在上级部门中的次序值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order")]
|
||||
public long DepartmentOrder { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_id")]
|
||||
public Types.Department[] DepartmentList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user