diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/FuwuhaoManager.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/FuwuhaoManager.cs index 90b1d8b2..d99af62d 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/FuwuhaoManager.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/FuwuhaoManager.cs @@ -109,10 +109,7 @@ public class FuwuhaoManager : DomainService var jsonContent = await response.Content.ReadAsStringAsync(); _logger.LogInformation($"服务号code获取用户基础信息:{jsonContent}"); - var result = JsonSerializer.Deserialize(jsonContent, new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower - }); + var result = JsonSerializer.Deserialize(jsonContent); return result; } @@ -133,10 +130,7 @@ public class FuwuhaoManager : DomainService var jsonContent = await response.Content.ReadAsStringAsync(); _logger.LogInformation($"服务号code获取用户详细信息:{jsonContent}"); - var result = JsonSerializer.Deserialize(jsonContent, new JsonSerializerOptions - { - PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower - }); + var result = JsonSerializer.Deserialize(jsonContent); return result; } diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/UserBaseInfoResponse.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/UserBaseInfoResponse.cs index bd2afb36..6becf902 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/UserBaseInfoResponse.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/UserBaseInfoResponse.cs @@ -1,3 +1,5 @@ +using System.Text.Json.Serialization; + namespace Yi.Framework.AiHub.Domain.Managers.Fuwuhao; /// @@ -8,35 +10,30 @@ public class UserBaseInfoResponse /// /// 访问令牌 /// + [JsonPropertyName("access_token")] public string AccessToken { get; set; } /// /// 过期时间(秒) /// + [JsonPropertyName("expires_in")] public int ExpiresIn { get; set; } /// /// 刷新令牌 /// + [JsonPropertyName("refresh_token")] public string RefreshToken { get; set; } /// /// 用户OpenID /// + [JsonPropertyName("openid")] public string OpenId { get; set; } /// /// 授权作用域 /// + [JsonPropertyName("scope")] public string Scope { get; set; } - - /// - /// 是否为快照用户 - /// - public int IsSnapshotUser { get; set; } - - /// - /// 用户UnionID - /// - public string UnionId { get; set; } } \ No newline at end of file diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/UserInfoResponse.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/UserInfoResponse.cs index a8c2faa7..72241b2f 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/UserInfoResponse.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/Fuwuhao/UserInfoResponse.cs @@ -1,3 +1,5 @@ +using System.Text.Json.Serialization; + namespace Yi.Framework.AiHub.Domain.Managers.Fuwuhao; /// @@ -8,45 +10,42 @@ public class UserInfoResponse /// /// 用户OpenID /// + [JsonPropertyName("openid")] public string OpenId { get; set; } /// /// 用户昵称 /// + [JsonPropertyName("nickname")] public string Nickname { get; set; } /// /// 用户性别,值为1时是男性,值为2时是女性,值为0时是未知 /// + [JsonPropertyName("sex")] public int Sex { get; set; } /// /// 用户个人资料填写的省份 /// + [JsonPropertyName("province")] public string Province { get; set; } /// /// 普通用户个人资料填写的城市 /// + [JsonPropertyName("city")] public string City { get; set; } /// /// 国家,如中国为CN /// + [JsonPropertyName("country")] public string Country { get; set; } /// /// 用户头像,最后一个数值代表正方形头像大小(有0、46、64、96、132数值可选,0代表640*640正方形头像) /// + [JsonPropertyName("headimgurl")] public string HeadImgUrl { get; set; } - - /// - /// 用户特权信息 - /// - public string[] Privilege { get; set; } - - /// - /// 用户UnionID - /// - public string UnionId { get; set; } } \ No newline at end of file