From cc444a668f6045f8aa6ae4c146aa253e7d57e923 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Mon, 14 Mar 2022 14:01:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(work):=20=E9=9A=8F=E5=AE=98=E6=96=B9?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=A4=96=E9=83=A8=E8=81=94=E7=B3=BB=E4=BA=BA?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inExternalContactBatchGetByUserResponse.cs | 64 +------------------ .../CgibinExternalContactGetResponse.cs | 26 +++++++- ...ExternalContactBatchGetByUserResponse.json | 16 +++-- .../CgibinExternalContactGetResponse.json | 22 +++---- 4 files changed, 43 insertions(+), 85 deletions(-) diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinExternalContact/CgibinExternalContactBatchGetByUserResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinExternalContact/CgibinExternalContactBatchGetByUserResponse.cs index 49b8f0da..aaf46309 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinExternalContact/CgibinExternalContactBatchGetByUserResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinExternalContact/CgibinExternalContactBatchGetByUserResponse.cs @@ -15,70 +15,8 @@ { } - public class FollowUser + public class FollowUser : CgibinExternalContactGetResponse.Types.FollowUser { - /// - /// 获取或设置该成员对外部联系人的备注。 - /// - [Newtonsoft.Json.JsonProperty("remark")] - [System.Text.Json.Serialization.JsonPropertyName("remark")] - public string Remark { get; set; } = default!; - - /// - /// 获取或设置该成员对外部联系人的备注企业名称。 - /// - [Newtonsoft.Json.JsonProperty("remark_corp_name")] - [System.Text.Json.Serialization.JsonPropertyName("remark_corp_name")] - public string? RemarkCompany { get; set; } - - /// - /// 获取或设置该成员对外部联系人的备注手机号码列表。 - /// - [Newtonsoft.Json.JsonProperty("remark_mobiles")] - [System.Text.Json.Serialization.JsonPropertyName("remark_mobiles")] - public string[]? RemarkMobileNumberList { get; set; } - - /// - /// 获取或设置该成员对外部联系人的描述。 - /// - [Newtonsoft.Json.JsonProperty("description")] - [System.Text.Json.Serialization.JsonPropertyName("description")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置该成员添加外部联系人所打企业标签 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("tag_id")] - [System.Text.Json.Serialization.JsonPropertyName("tag_id")] - public string[] TagIdList { get; set; } = default!; - - /// - /// 获取或设置该成员添加外部联系人的来源。 - /// - [Newtonsoft.Json.JsonProperty("add_way")] - [System.Text.Json.Serialization.JsonPropertyName("add_way")] - public int AddWay { get; set; } - - /// - /// 获取或设置该成员添加外部联系人的时间戳。 - /// - [Newtonsoft.Json.JsonProperty("createtime")] - [System.Text.Json.Serialization.JsonPropertyName("createtime")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置企业自定义渠道参数。 - /// - [Newtonsoft.Json.JsonProperty("state")] - [System.Text.Json.Serialization.JsonPropertyName("state")] - public string? State { get; set; } - - /// - /// 获取或设置发起添加的成员账号。 - /// - [Newtonsoft.Json.JsonProperty("oper_userid")] - [System.Text.Json.Serialization.JsonPropertyName("oper_userid")] - public string? OperateUserId { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinExternalContact/CgibinExternalContactGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinExternalContact/CgibinExternalContactGetResponse.cs index e3ee600d..367db9f7 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinExternalContact/CgibinExternalContactGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinExternalContact/CgibinExternalContactGetResponse.cs @@ -168,6 +168,16 @@ [System.Text.Json.Serialization.JsonPropertyName("group_name")] public string? TagGroupName { get; set; } } + + public class WechatChannels + { + /// + /// 获取或设置视频号昵称。 + /// + [Newtonsoft.Json.JsonProperty("nickname")] + [System.Text.Json.Serialization.JsonPropertyName("nickname")] + public string? Nickname { get; set; } + } } /// @@ -210,7 +220,14 @@ /// [Newtonsoft.Json.JsonProperty("tags")] [System.Text.Json.Serialization.JsonPropertyName("tags")] - public Types.Tag[]? Tags { get; set; } + public Types.Tag[]? TagList { get; set; } + + /// + /// 获取或设置该成员添加外部联系人所打企业标签 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("tag_id")] + [System.Text.Json.Serialization.JsonPropertyName("tag_id")] + public string[]? TagIdList { get; set; } /// /// 获取或设置该成员添加外部联系人的来源。 @@ -239,6 +256,13 @@ [Newtonsoft.Json.JsonProperty("oper_userid")] [System.Text.Json.Serialization.JsonPropertyName("oper_userid")] public string? OperateUserId { get; set; } + + /// + /// 获取或设置视频号信息。 + /// + [Newtonsoft.Json.JsonProperty("wechat_channels")] + [System.Text.Json.Serialization.JsonPropertyName("wechat_channels")] + public Types.WechatChannels? WechatChannels { get; set; } } } diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinExternalContact/CgibinExternalContactBatchGetByUserResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinExternalContact/CgibinExternalContactBatchGetByUserResponse.json index b4ed2d6b..11869fc4 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinExternalContact/CgibinExternalContactBatchGetByUserResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinExternalContact/CgibinExternalContactBatchGetByUserResponse.json @@ -43,17 +43,18 @@ } }, "follow_info": { + "userid": "rocky", "remark": "李部长", "description": "对接采购事务", "createtime": 1525779812, - "tag_id": [ "etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA" ], + "tag_id": ["etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA"], "remark_corp_name": "腾讯科技", - "remark_mobiles": [ - "13800000001", - "13000000002" - ], + "remark_mobiles": ["13800000001", "13000000002"], "oper_userid": "rocky", - "add_way": 1 + "add_way": 10, + "wechat_channels": { + "nickname": "视频号名称" + } } }, { @@ -69,10 +70,11 @@ "unionid": "ozynqsulJFCZ2asdaf8h-nuasdAAA" }, "follow_info": { + "userid": "lisi", "remark": "王助理", "description": "采购问题咨询", "createtime": 1525881637, - "tag_id": [ "etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA" ], + "tag_id": ["etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA", "stJHDDGi0mAGi0mACHBBByujaW"], "state": "外联二维码1", "oper_userid": "woAJ2GCAAAd1asdasdjO4wKmE8AabjBBB", "add_way": 3 diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinExternalContact/CgibinExternalContactGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinExternalContact/CgibinExternalContactGetResponse.json index d4d02f8f..ddb6a992 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinExternalContact/CgibinExternalContactGetResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinExternalContact/CgibinExternalContactGetResponse.json @@ -14,14 +14,8 @@ "unionid": "ozynqsulJFCZ2z1aYeS8h-nuasdAAA", "is_subscribe": 1, "subscriber_info": { - "tag_id": [ - "TAG_ID1", - "TAG_ID2" - ], - "remark_mobiles": [ - "10000000000", - "10000000001" - ], + "tag_id": ["TAG_ID1", "TAG_ID2"], + "remark_mobiles": ["10000000000", "10000000001"], "remark": "李小明-爸爸" }, "external_profile": { @@ -68,12 +62,12 @@ } ], "remark_corp_name": "腾讯科技", - "remark_mobiles": [ - "13800000001", - "13000000002" - ], + "remark_mobiles": ["13800000001", "13000000002"], "oper_userid": "rocky", - "add_way": 1 + "add_way": 10, + "wechat_channels": { + "nickname": "视频号名称" + } }, { "userid": "tommy", @@ -86,4 +80,4 @@ } ], "next_cursor": "NEXT_CUROSR" -} \ No newline at end of file +}