feat: 为微信服务号用户信息响应模型添加JsonPropertyName映射并移除无用字段

This commit is contained in:
chenchun
2025-08-29 13:41:50 +08:00
parent ad8f48f36b
commit 5d29fd6d3b
3 changed files with 18 additions and 28 deletions

View File

@@ -109,10 +109,7 @@ public class FuwuhaoManager : DomainService
var jsonContent = await response.Content.ReadAsStringAsync();
_logger.LogInformation($"服务号code获取用户基础信息{jsonContent}");
var result = JsonSerializer.Deserialize<UserBaseInfoResponse>(jsonContent, new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower
});
var result = JsonSerializer.Deserialize<UserBaseInfoResponse>(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<UserInfoResponse>(jsonContent, new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseLower
});
var result = JsonSerializer.Deserialize<UserInfoResponse>(jsonContent);
return result;
}