mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-16 07:59:44 +08:00
feat(work): 新增人事助手花名册相关接口
This commit is contained in:
parent
fb58d4ca32
commit
5ecc266963
@ -59,6 +59,7 @@
|
||||
| √ | 办公:打卡 | 企业 & 第三方 & 服务商 | |
|
||||
| √ | 办公:审批 | 企业 & 第三方 & 服务商 | |
|
||||
| √ | 办公:汇报 | 企业 | |
|
||||
| √ | 办公:人事助手 | 企业 | |
|
||||
| √ | 办公:会议室 | 企业 | |
|
||||
| √ | 办公:紧急通知 | 企业 | |
|
||||
| √ | 智慧硬件 | 第三方 | |
|
||||
|
@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
{
|
||||
public static class WechatWorkClientExecuteCgibinHrExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/hr/get_fields 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/99131 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinHrGetFieldsResponse> ExecuteCgibinHrGetFieldsAsync(this WechatWorkClient client, Models.CgibinHrGetFieldsRequest 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.Get, "cgi-bin", "hr", "get_fields")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinHrGetFieldsResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/hr/get_staff_info 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/99132 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinHrGetStaffInfoResponse> ExecuteCgibinHrGetStaffInfoAsync(this WechatWorkClient client, Models.CgibinHrGetStaffInfoRequest 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", "hr", "get_staff_info")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinHrGetStaffInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/hr/update_staff_info 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/99133 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinHrUpdateStaffInfoResponse> ExecuteCgibinHrUpdateStaffInfoAsync(this WechatWorkClient client, Models.CgibinHrUpdateStaffInfoRequest 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", "hr", "update_staff_info")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinHrUpdateStaffInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/hr/get_fields 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinHrGetFieldsRequest : WechatWorkRequest
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/hr/get_fields 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinHrGetFieldsResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class FieldGroup
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Field
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置字段 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fieldid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fieldid")]
|
||||
public int FieldId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("field_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("field_name")]
|
||||
public string FieldName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("field_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("field_type")]
|
||||
public int FieldType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否必须。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_must")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_must")]
|
||||
public bool IsMust { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public int GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_name")]
|
||||
public string GroupName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("field_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("field_list")]
|
||||
public Types.Field[] FieldList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_list")]
|
||||
public Types.FieldGroup[] FieldGroupList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/hr/get_staff_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinHrGetStaffInfoRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Field
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置字段 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fieldid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fieldid")]
|
||||
public int FieldId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置需要获取的字段下标。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_idx")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_idx")]
|
||||
public int? SubIndex { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否获取全部字段信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("get_all")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("get_all")]
|
||||
public bool? RequireAll { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置需要获取的字段列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fieldids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fieldids")]
|
||||
public IList<Types.Field>? FieldList { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/hr/get_staff_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinHrGetStaffInfoResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Field
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class MobileValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置国际区号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_country_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_country_code")]
|
||||
public string CountryCode { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置手机号码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_mobile")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_mobile")]
|
||||
public string MobileNumber { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class FileValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置文件 MediaId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
|
||||
public string[] MediaIdList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fieldid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fieldid")]
|
||||
public int FieldId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段下标。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_idx")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_idx")]
|
||||
public int? SubIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置查询结果。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public int Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段值的类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_type")]
|
||||
public int ValueType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字符串类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_string")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_string")]
|
||||
public string? StringValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 32 位非负整数类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_uint32")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_uint32")]
|
||||
public uint? UInt32Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 64 位非负整数类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_uint64")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_uint64")]
|
||||
public ulong? UInt64Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 32 位整数类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_int32")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_int32")]
|
||||
public int? Int32Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 64 位整数类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_int64")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_int64")]
|
||||
public long? Int64Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置手机号码类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_mobile")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_mobile")]
|
||||
public Types.MobileValue? MobileValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_file")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_file")]
|
||||
public Types.FileValue? FileValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fieldinfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fieldinfo")]
|
||||
public Types.Field[] FieldList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,178 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/hr/update_staff_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinHrUpdateStaffInfoRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class UpdatedItem
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class MobileValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置国际区号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_country_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_country_code")]
|
||||
public string CountryCode { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置手机号码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_mobile")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_mobile")]
|
||||
public string MobileNumber { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class FileValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置文件 MediaId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
|
||||
public IList<string> MediaIdList { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fieldid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fieldid")]
|
||||
public int FieldId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置需要获取的字段下标。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_idx")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_idx")]
|
||||
public int? SubIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字符串类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_string")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_string")]
|
||||
public string? StringValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 32 位非负整数类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_uint32")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_uint32")]
|
||||
public uint? UInt32Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 64 位非负整数类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_uint64")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_uint64")]
|
||||
public ulong? UInt64Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 32 位整数类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_int32")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_int32")]
|
||||
public int? Int32Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 64 位整数类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_int64")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_int64")]
|
||||
public long? Int64Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置手机号码类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_mobile")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_mobile")]
|
||||
public Types.MobileValue? MobileValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件类型的字段值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value_file")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value_file")]
|
||||
public Types.FileValue? FileValue { get; set; }
|
||||
}
|
||||
|
||||
public class InsertedItem
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Field : UpdatedItem
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段组类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_type")]
|
||||
public int GroupType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("item")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("item")]
|
||||
public IList<Types.Field> FieldList { get; set; } = new List<Types.Field>();
|
||||
}
|
||||
|
||||
public class RemovedItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置字段组类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_type")]
|
||||
public int GroupType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段组下标。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_idx")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_idx")]
|
||||
public int SubIndex { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置需要更新的项列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_items")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_items")]
|
||||
public IList<Types.UpdatedItem>? UpdatedItemList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置需要新增的项列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("insert_items")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("insert_items")]
|
||||
public IList<Types.InsertedItem>? InsertedItemList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置需要删除的项列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remove_items")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remove_items")]
|
||||
public IList<Types.RemovedItem>? RemovedItemList { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/hr/update_staff_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinHrUpdateStaffInfoResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class UpdatedResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置字段 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fieldid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fieldid")]
|
||||
public int FieldId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置需要获取的字段下标。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_idx")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_idx")]
|
||||
public int? SubIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新结果。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public int Result { get; set; }
|
||||
}
|
||||
|
||||
public class InsertedResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置字段组类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_type")]
|
||||
public int GroupType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段下标。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("idx")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("idx")]
|
||||
public int? Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置新增结果。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public int Result { get; set; }
|
||||
}
|
||||
|
||||
public class RemovedResult
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置字段组类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_type")]
|
||||
public int GroupType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置字段组下标。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_idx")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_idx")]
|
||||
public int SubIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置删除结果。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public int Result { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新结果列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_results")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_results")]
|
||||
public Types.UpdatedResult[]? UpdatedResultList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置新增结果列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("insert_result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("insert_result")]
|
||||
public Types.InsertedResult[]? InsertedResultList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置删除结果列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remove_results")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remove_results")]
|
||||
public Types.RemovedResult[]? RemovedResultList { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"group_list": [
|
||||
{
|
||||
"group_id": 1001,
|
||||
"group_name": "个人信息",
|
||||
"field_list": [
|
||||
{
|
||||
"fieldid": 11001,
|
||||
"field_name": "姓名",
|
||||
"field_type": 1,
|
||||
"is_must": true
|
||||
},
|
||||
{
|
||||
"fieldid": 11002,
|
||||
"field_name": "别名",
|
||||
"field_type": 1,
|
||||
"is_must": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"group_id": 1002,
|
||||
"group_name": "在职信息",
|
||||
"field_list": [
|
||||
{
|
||||
"fieldid": 12024,
|
||||
"field_name": "工号",
|
||||
"field_type": 1,
|
||||
"is_must": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"userid": "xxxxx",
|
||||
"get_all": false,
|
||||
"fieldids": [
|
||||
{
|
||||
"fieldid": 11004,
|
||||
"sub_idx": 0
|
||||
},
|
||||
{
|
||||
"fieldid": 14001,
|
||||
"sub_idx": 1
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"fieldinfo": [
|
||||
{
|
||||
"fieldid": 11004,
|
||||
"sub_idx": 0,
|
||||
"result": 1,
|
||||
"value_type": 3,
|
||||
"value_uint32": 1
|
||||
},
|
||||
{
|
||||
"fieldid": 11003,
|
||||
"sub_idx": 0,
|
||||
"result": 1,
|
||||
"value_type": 5,
|
||||
"value_mobile": {
|
||||
"value_country_code": "xx",
|
||||
"value_mobile": "xxxxxxxxxx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"fieldid": 19001,
|
||||
"sub_idx": 0,
|
||||
"result": 1,
|
||||
"value_type": 6,
|
||||
"value_file": {
|
||||
"media_id": [ "xxxxxx", "xxxxxx" ]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
{
|
||||
"userid": "xxxxx",
|
||||
"update_items": [
|
||||
{
|
||||
"fieldid": 11020,
|
||||
"sub_idx": 0,
|
||||
"value_string": "xxxxx"
|
||||
},
|
||||
{
|
||||
"fieldid": 17003,
|
||||
"sub_idx": 1,
|
||||
"value_mobile": {
|
||||
"value_country_code": "xxx",
|
||||
"value_mobile": "xxxxxxxx"
|
||||
}
|
||||
}
|
||||
],
|
||||
"remove_items": [
|
||||
{
|
||||
"group_type": 1,
|
||||
"sub_idx": 1
|
||||
},
|
||||
{
|
||||
"group_type": 1,
|
||||
"sub_idx": 2
|
||||
}
|
||||
],
|
||||
"insert_items": [
|
||||
{
|
||||
"group_type": 4,
|
||||
"item": [
|
||||
{
|
||||
"fieldid": 17001,
|
||||
"sub_idx": 0,
|
||||
"value_string": "孙悟空"
|
||||
},
|
||||
{
|
||||
"fieldid": 17002,
|
||||
"sub_idx": 0,
|
||||
"value_uint32": 1
|
||||
},
|
||||
{
|
||||
"fieldid": 17003,
|
||||
"sub_idx": 0,
|
||||
"value_mobile": {
|
||||
"value_country_code": "xxx",
|
||||
"value_mobile": "xxxxxxxx"
|
||||
}
|
||||
},
|
||||
{
|
||||
"fieldid": 17004,
|
||||
"sub_idx": 0,
|
||||
"value_string": "娜美克星"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"update_results": [
|
||||
{
|
||||
"fieldid": 11001,
|
||||
"sub_idx": 0,
|
||||
"result": 1
|
||||
}
|
||||
],
|
||||
"remove_results": [
|
||||
{
|
||||
"group_type": 1,
|
||||
"sub_idx": 20,
|
||||
"result": 3
|
||||
}
|
||||
],
|
||||
"insert_result": [
|
||||
{
|
||||
"group_type": 1,
|
||||
"idx": 1,
|
||||
"result": 4
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user