fix(work): 修复部门 ID 值溢出错误问题

This commit is contained in:
Fu Diwei
2022-01-28 13:45:34 +08:00
parent 887abdf46f
commit 8b9b723f12
76 changed files with 266 additions and 91 deletions

View File

@@ -0,0 +1,54 @@
using System;
namespace Newtonsoft.Json.Converters
{
internal class TextualLongArrayWithPipeSplitConverter : JsonConverter<long[]?>
{
public override bool CanRead
{
get { return true; }
}
public override bool CanWrite
{
get { return true; }
}
public override long[]? ReadJson(JsonReader reader, Type objectType, long[]? existingValue, bool hasExistingValue, JsonSerializer serializer)
{
if (reader.TokenType == JsonToken.Null)
{
return null;
}
else if (reader.TokenType == JsonToken.String)
{
string? value = serializer.Deserialize<string>(reader);
if (value == null)
return null;
if (string.IsNullOrEmpty(value))
return Array.Empty<long>();
string[] strArr = value.Split('|');
long[] intArr = new long[strArr.Length];
for (int i = 0; i < strArr.Length; i++)
{
if (!long.TryParse(strArr[i], out long j))
throw new JsonSerializationException("Unexpected token when parsing string to long.");
intArr[i] = j;
}
return intArr;
}
throw new JsonSerializationException();
}
public override void WriteJson(JsonWriter writer, long[]? value, JsonSerializer serializer)
{
if (value != null)
writer.WriteValue(string.Join("|", value));
else
writer.WriteNull();
}
}
}

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Newtonsoft.Json.Converters
{
internal class TextualLongListWithPipeSplitConverter : JsonConverter
{
private readonly JsonConverter<long[]?> _converter = new TextualLongArrayWithPipeSplitConverter();
public override bool CanConvert(Type objectType)
{
return objectType.IsGenericType &&
typeof(IList<>).IsAssignableFrom(objectType.GetGenericTypeDefinition()) &&
typeof(long) == objectType.GetGenericArguments()[0];
}
public override bool CanRead
{
get { return true; }
}
public override bool CanWrite
{
get { return true; }
}
public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
{
long[]? array = _converter.ReadJson(reader, objectType, null, false, serializer);
return array?.ToList();
}
public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
{
_converter.WriteJson(writer, ((IList<long>?)value)?.ToArray(), serializer);
}
}
}

View File

@@ -0,0 +1,44 @@
using System.Text.Json.Serialization;
namespace System.Text.Json.Converters
{
internal class TextualLongArrayWithPipeSplitConverter : JsonConverter<long[]?>
{
public override long[]? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
if (reader.TokenType == JsonTokenType.Null)
{
return null;
}
else if (reader.TokenType == JsonTokenType.String)
{
string? value = reader.GetString();
if (value == null)
return null;
if (string.IsNullOrEmpty(value))
return Array.Empty<long>();
string[] strArr = value.Split('|');
long[] intArr = new long[strArr.Length];
for (int i = 0; i < strArr.Length; i++)
{
if (!long.TryParse(strArr[i], out long j))
throw new JsonException("Unexpected token when parsing string to long.");
intArr[i] = j;
}
return intArr;
}
throw new JsonException();
}
public override void Write(Utf8JsonWriter writer, long[]? value, JsonSerializerOptions options)
{
if (value != null)
writer.WriteStringValue(string.Join("|", value));
else
writer.WriteNullValue();
}
}
}

View File

@@ -0,0 +1,38 @@
using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
namespace System.Text.Json.Converters
{
internal class TextualLongListWithPipeSplitConverter : JsonConverterFactory
{
private sealed class InnerTextualIntegerListWithVBarSplitConverter : JsonConverter<IList<long>?>
{
private readonly JsonConverter<long[]?> _converter = new TextualLongArrayWithPipeSplitConverter();
public override IList<long>? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
long[]? array = _converter.Read(ref reader, typeToConvert, options);
IList<long>? list = array?.ToList();
return list;
}
public override void Write(Utf8JsonWriter writer, IList<long>? value, JsonSerializerOptions options)
{
_converter.Write(writer, value?.ToArray(), options);
}
}
public override bool CanConvert(Type typeToConvert)
{
return typeToConvert.IsGenericType &&
typeof(IList<>).IsAssignableFrom(typeToConvert.GetGenericTypeDefinition()) &&
typeof(long) == typeToConvert.GetGenericArguments()[0];
}
public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options)
{
return new InnerTextualIntegerListWithVBarSplitConverter();
}
}
}

View File

@@ -25,7 +25,7 @@
/// 获取或设置提单部门 ID。
/// </summary>
[System.Xml.Serialization.XmlElement("Party")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
}
public class Notifier

View File

@@ -210,7 +210,7 @@
/// 获取或设置部门 ID。
/// </summary>
[System.Xml.Serialization.XmlElement("Id", IsNullable = true)]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
/// <summary>
/// 获取或设置上级部门 ID。

View File

@@ -37,7 +37,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public int[] DepartmentIdList { get; set; } = default!;
public long[] DepartmentIdList { get; set; } = default!;
}
public class AllowedTag

View File

@@ -33,7 +33,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("allow_party")]
[System.Text.Json.Serialization.JsonPropertyName("allow_party")]
public IList<int>? AllowedDepartmentIdList { get; set; }
public IList<long>? AllowedDepartmentIdList { get; set; }
/// <summary>
/// 获取或设置可见标签 ID 列表。

View File

@@ -17,7 +17,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("invalidparty")]
[System.Text.Json.Serialization.JsonPropertyName("invalidparty")]
public int[]? InvalidDepartmentIdList { get; set; }
public long[]? InvalidDepartmentIdList { get; set; }
/// <summary>
/// 获取或设置无效的标签 ID 列表。

View File

@@ -42,7 +42,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
}
}

View File

@@ -19,7 +19,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("party")]
[System.Text.Json.Serialization.JsonPropertyName("party")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置标签 ID 列表。

View File

@@ -17,7 +17,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("invalidparty")]
[System.Text.Json.Serialization.JsonPropertyName("invalidparty")]
public int[]? InvalidDepartmentIdList { get; set; }
public long[]? InvalidDepartmentIdList { get; set; }
/// <summary>
/// 获取或设置无效的标签 ID 列表。

View File

@@ -25,7 +25,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public int[]? DepartmentIdList { get; set; }
public long[]? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置标签 ID 列表。

View File

@@ -10,7 +10,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
/// <summary>
/// 获取或设置部门名称。
@@ -31,7 +31,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("parentid")]
[System.Text.Json.Serialization.JsonPropertyName("parentid")]
public int? ParentDepartmentId { get; set; }
public long? ParentDepartmentId { get; set; }
/// <summary>
/// 获取或设置在上级部门中的次序值。

View File

@@ -10,6 +10,6 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
}
}

View File

@@ -10,6 +10,6 @@
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
}
}

View File

@@ -10,6 +10,6 @@
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
}
}

View File

@@ -10,6 +10,6 @@
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int? ParentDepartmentId { get; set; }
public long? ParentDepartmentId { get; set; }
}
}

View File

@@ -14,7 +14,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置部门名称。
@@ -35,7 +35,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("parentid")]
[System.Text.Json.Serialization.JsonPropertyName("parentid")]
public int ParentDepartmentId { get; set; }
public long ParentDepartmentId { get; set; }
/// <summary>
/// 获取或设置在上级部门中的次序值。

View File

@@ -10,6 +10,6 @@
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int? ParentDepartmentId { get; set; }
public long? ParentDepartmentId { get; set; }
}
}

View File

@@ -14,14 +14,14 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置上级部门 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("parentid")]
[System.Text.Json.Serialization.JsonPropertyName("parentid")]
public int ParentDepartmentId { get; set; }
public long ParentDepartmentId { get; set; }
/// <summary>
/// 获取或设置在上级部门中的次序值。

View File

@@ -10,7 +10,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置部门名称。
@@ -31,7 +31,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("parentid")]
[System.Text.Json.Serialization.JsonPropertyName("parentid")]
public int? ParentDepartmentId { get; set; }
public long? ParentDepartmentId { get; set; }
/// <summary>
/// 获取或设置在上级部门中的次序值。

View File

@@ -33,6 +33,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
}
}

View File

@@ -180,7 +180,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("party")]
[System.Text.Json.Serialization.JsonPropertyName("party")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置是否临时会话模式。

View File

@@ -196,7 +196,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("party")]
[System.Text.Json.Serialization.JsonPropertyName("party")]
public int[]? DepartmentIdList { get; set; }
public long[]? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置是否临时会话模式。

View File

@@ -61,7 +61,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("party")]
[System.Text.Json.Serialization.JsonPropertyName("party")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置是否临时会话模式。

View File

@@ -173,7 +173,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
}
}

View File

@@ -28,7 +28,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
}
}

View File

@@ -23,7 +23,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("department_list")]
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
}
}

View File

@@ -35,7 +35,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("department_list")]
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
public int[]? DepartmentIdList { get; set; }
public long[]? DepartmentIdList { get; set; }
}
}

View File

@@ -99,7 +99,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("to_party")]
[System.Text.Json.Serialization.JsonPropertyName("to_party")]
public IList<int>? ToDepartmentIdList { get; set; }
public IList<long>? ToDepartmentIdList { get; set; }
/// <summary>
/// 获取或设置是否发送给学校的所有家长。

View File

@@ -31,6 +31,6 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("invalid_party")]
[System.Text.Json.Serialization.JsonPropertyName("invalid_party")]
public int[]? InvalidDepartmentIdIdList { get; set; }
public long[]? InvalidDepartmentIdIdList { get; set; }
}
}

View File

@@ -115,7 +115,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("department_list")]
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
}
public class ExternalContact

View File

@@ -25,7 +25,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("department_list")]
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
public int[]? DepartmentIdList { get; set; }
public long[]? DepartmentIdList { get; set; }
}
public class ExternalContact

View File

@@ -47,7 +47,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
}
}

View File

@@ -28,7 +28,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
}
}

View File

@@ -21,7 +21,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public int[]? DepartmentIdList { get; set; }
public long[]? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置标签 ID 列表。

View File

@@ -23,7 +23,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置标签 ID 列表。

View File

@@ -25,7 +25,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyids")]
[System.Text.Json.Serialization.JsonPropertyName("partyids")]
public int[]? DepartmentIdList { get; set; }
public long[]? DepartmentIdList { get; set; }
}
public class ReportTo

View File

@@ -21,7 +21,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("department_id_list")]
[System.Text.Json.Serialization.JsonPropertyName("department_id_list")]
public int[]? DepartmentIdList { get; set; }
public long[]? DepartmentIdList { get; set; }
}
public class GroupChatRange

View File

@@ -14,7 +14,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("department_id")]
[System.Text.Json.Serialization.JsonPropertyName("department_id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置部门名称。
@@ -28,7 +28,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("parentid")]
[System.Text.Json.Serialization.JsonPropertyName("parentid")]
public int ParentDepartmentId { get; set; }
public long ParentDepartmentId { get; set; }
/// <summary>
/// 获取或设置在上级部门中的次序值。

View File

@@ -28,7 +28,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("main_department")]
[System.Text.Json.Serialization.JsonPropertyName("main_department")]
public int? AnchorMainDepartmentId { get; set; }
public long? AnchorMainDepartmentId { get; set; }
/// <summary>
/// 获取或设置直播标题。

View File

@@ -105,7 +105,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("main_department")]
[System.Text.Json.Serialization.JsonPropertyName("main_department")]
public int? CreatorMainDepartmentId { get; set; }
public long? CreatorMainDepartmentId { get; set; }
/// <summary>
/// 获取或设置会议标题。

View File

@@ -973,10 +973,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// 获取或设置接收消息的部门 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("toparty")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualIntegerListWithPipeSplitConverter))]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualLongListWithPipeSplitConverter))]
[System.Text.Json.Serialization.JsonPropertyName("toparty")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualIntegerListWithPipeSplitConverter))]
public IList<int>? ToDepartmentIdList { get; set; }
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualLongListWithPipeSplitConverter))]
public IList<long>? ToDepartmentIdList { get; set; }
/// <summary>
/// 获取或设置接收消息的标签 ID 列表。

View File

@@ -18,10 +18,10 @@
/// 获取或设置无效的部门 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("invalidparty")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualIntegerArrayWithPipeSplitConverter))]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualLongArrayWithPipeSplitConverter))]
[System.Text.Json.Serialization.JsonPropertyName("invalidparty")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualIntegerArrayWithPipeSplitConverter))]
public int[]? InvalidDepartmentIdList { get; set; }
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualLongArrayWithPipeSplitConverter))]
public long[]? InvalidDepartmentIdList { get; set; }
/// <summary>
/// 获取或设置无效的标签 ID 列表。

View File

@@ -56,7 +56,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("partyids")]
[System.Text.Json.Serialization.JsonPropertyName("partyids")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置标签 ID 列表。

View File

@@ -237,7 +237,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("openapi_id")]
[System.Text.Json.Serialization.JsonPropertyName("openapi_id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置成员名称。
@@ -476,7 +476,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("choose_department")]
[System.Text.Json.Serialization.JsonPropertyName("choose_department")]
public int? ApplicantDepartmentId { get; set; }
public long? ApplicantDepartmentId { get; set; }
/// <summary>
/// 获取或设置审批模板 ID。

View File

@@ -26,7 +26,7 @@
[Newtonsoft.Json.JsonProperty("partyid")]
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
}
public class Notifier
@@ -323,7 +323,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("openapi_id")]
[System.Text.Json.Serialization.JsonPropertyName("openapi_id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置成员名称。

View File

@@ -29,7 +29,7 @@
[Newtonsoft.Json.JsonProperty("open_partyid")]
[System.Text.Json.Serialization.JsonPropertyName("open_partyid")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
}
public class Tag

View File

@@ -34,7 +34,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("departments")]
[System.Text.Json.Serialization.JsonPropertyName("departments")]
public int[] DepartmentIdList { get; set; } = default!;
public long[] DepartmentIdList { get; set; } = default!;
}
}

View File

@@ -39,7 +39,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
/// <summary>
/// 获取或设置部门名称。
@@ -60,7 +60,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("parentid")]
[System.Text.Json.Serialization.JsonPropertyName("parentid")]
public int ParentDepartmentId { get; set; }
public long ParentDepartmentId { get; set; }
/// <summary>
/// 获取或设置标准年级。

View File

@@ -10,6 +10,6 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
}
}

View File

@@ -10,6 +10,6 @@
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
}
}

View File

@@ -10,6 +10,6 @@
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int? ParentDepartmentId { get; set; }
public long? ParentDepartmentId { get; set; }
}
}

View File

@@ -41,7 +41,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置部门名称。
@@ -62,7 +62,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("parentid")]
[System.Text.Json.Serialization.JsonPropertyName("parentid")]
public int ParentDepartmentId { get; set; }
public long ParentDepartmentId { get; set; }
/// <summary>
/// 获取或设置标准年级。

View File

@@ -46,14 +46,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置新的部门 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("new_id")]
[System.Text.Json.Serialization.JsonPropertyName("new_id")]
public int? NewDepartmentId { get; set; }
public long? NewDepartmentId { get; set; }
/// <summary>
/// 获取或设置部门名称。
@@ -67,7 +67,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("parentid")]
[System.Text.Json.Serialization.JsonPropertyName("parentid")]
public int? ParentDepartmentId { get; set; }
public long? ParentDepartmentId { get; set; }
/// <summary>
/// 获取或设置标准年级。

View File

@@ -18,7 +18,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyids")]
[System.Text.Json.Serialization.JsonPropertyName("partyids")]
public int[]? DepartmentIdList { get; set; }
public long[]? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置客户群(即班级群)名称列表。

View File

@@ -32,7 +32,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyids")]
[System.Text.Json.Serialization.JsonPropertyName("partyids")]
public int[] DepartmentIdList { get; set; } = default!;
public long[] DepartmentIdList { get; set; } = default!;
}
}

View File

@@ -32,7 +32,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partyids")]
[System.Text.Json.Serialization.JsonPropertyName("partyids")]
public int[] DepartmentIdList { get; set; } = default!;
public long[] DepartmentIdList { get; set; } = default!;
/// <summary>
/// 获取或设置观看时长(单位:秒)。

View File

@@ -71,7 +71,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("department")]
[System.Text.Json.Serialization.JsonPropertyName("department")]
public int[] DepartmentIdList { get; set; } = default!;
public long[] DepartmentIdList { get; set; } = default!;
/// <summary>
/// 获取或设置学生的家长列表。

View File

@@ -30,7 +30,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("department")]
[System.Text.Json.Serialization.JsonPropertyName("department")]
public IList<int> DepartmentIdList { get; set; } = new List<int>();
public IList<long> DepartmentIdList { get; set; } = new List<long>();
}
}

View File

@@ -37,7 +37,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("department")]
[System.Text.Json.Serialization.JsonPropertyName("department")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
}
}

View File

@@ -26,6 +26,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("department")]
[System.Text.Json.Serialization.JsonPropertyName("department")]
public IList<int> DepartmentIdList { get; set; } = new List<int>();
public IList<long> DepartmentIdList { get; set; } = new List<long>();
}
}

View File

@@ -33,6 +33,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("department")]
[System.Text.Json.Serialization.JsonPropertyName("department")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
}
}

View File

@@ -140,7 +140,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("allow_party")]
[System.Text.Json.Serialization.JsonPropertyName("allow_party")]
public int[]? AllowedDepartmentIdList { get; set; }
public long[]? AllowedDepartmentIdList { get; set; }
/// <summary>
/// 获取或设置可见标签 ID 列表。
@@ -161,7 +161,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("extra_party")]
[System.Text.Json.Serialization.JsonPropertyName("extra_party")]
public int[]? ExtraDepartmentIdList { get; set; }
public long[]? ExtraDepartmentIdList { get; set; }
/// <summary>
/// 获取或设置额外标签 ID 列表。

View File

@@ -76,7 +76,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置是否有可写权限。

View File

@@ -44,6 +44,6 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("partylist")]
[System.Text.Json.Serialization.JsonPropertyName("partylist")]
public int[] DepartmentIdList { get; set; } = default!;
public long[] DepartmentIdList { get; set; } = default!;
}
}

View File

@@ -26,6 +26,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("partylist")]
[System.Text.Json.Serialization.JsonPropertyName("partylist")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
}
}

View File

@@ -19,6 +19,6 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("invalidparty")]
[System.Text.Json.Serialization.JsonPropertyName("invalidparty")]
public int[]? InvalidDepartmentIdList { get; set; }
public long[]? InvalidDepartmentIdList { get; set; }
}
}

View File

@@ -263,7 +263,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("department")]
[System.Text.Json.Serialization.JsonPropertyName("department")]
public IList<int> DepartmentIdList { get; set; } = new List<int>();
public IList<long> DepartmentIdList { get; set; } = new List<long>();
/// <summary>
/// 获取或设置部门次序列表。
@@ -284,7 +284,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("main_department")]
[System.Text.Json.Serialization.JsonPropertyName("main_department")]
public int? MainDepartmentId { get; set; }
public long? MainDepartmentId { get; set; }
/// <summary>
/// 获取或设置直属上级成员账号列表。

View File

@@ -109,7 +109,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("department")]
[System.Text.Json.Serialization.JsonPropertyName("department")]
public int[] DepartmentIdList { get; set; } = default!;
public long[] DepartmentIdList { get; set; } = default!;
/// <summary>
/// 获取或设置部门次序列表。
@@ -130,7 +130,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("main_department")]
[System.Text.Json.Serialization.JsonPropertyName("main_department")]
public int? MainDepartmentId { get; set; }
public long? MainDepartmentId { get; set; }
/// <summary>
/// 获取或设置直属上级成员账号列表。

View File

@@ -10,7 +10,7 @@
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public int DepartmentId { get; set; }
public long DepartmentId { get; set; }
/// <summary>
/// 获取或设置是否递归获取子部门成员。

View File

@@ -35,7 +35,7 @@
/// </summary>
[Newtonsoft.Json.JsonProperty("department")]
[System.Text.Json.Serialization.JsonPropertyName("department")]
public int[] DepartmentIdList { get; set; } = default!;
public long[] DepartmentIdList { get; set; } = default!;
}
}

View File

@@ -93,7 +93,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("department")]
[System.Text.Json.Serialization.JsonPropertyName("department")]
public IList<int>? DepartmentIdList { get; set; }
public IList<long>? DepartmentIdList { get; set; }
/// <summary>
/// 获取或设置部门次序列表。
@@ -114,7 +114,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("main_department")]
[System.Text.Json.Serialization.JsonPropertyName("main_department")]
public int? MainDepartmentId { get; set; }
public long? MainDepartmentId { get; set; }
/// <summary>
/// 获取或设置直属上级成员账号列表。

View File

@@ -30,7 +30,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("departmentid")]
[System.Text.Json.Serialization.JsonPropertyName("departmentid")]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
/// <summary>
/// 获取或设置权限。

View File

@@ -30,7 +30,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("departmentid")]
[System.Text.Json.Serialization.JsonPropertyName("departmentid")]
public int? DepartmentId { get; set; }
public long? DepartmentId { get; set; }
}
}