feat: 为微信服务号用户信息响应模型添加JsonPropertyName映射并移除无用字段
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user