using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OASystem.Domain.ViewModels.JuHeExchangeRate { /// /// 聚合接口 Result /// public class JuHeAPIResult { /// /// 服务级错误码 /// 202301 查询不到结果 /// public int Error_code { get; set; } /// /// 系统级错误码 /// 错误码 说明 旧版本(resultcode) /// 10001 错误的请求KEY 101 /// 10002 该KEY无请求权限 102 /// 10003 KEY过期 103 /// 10004 错误的OPENID 104 /// 10005 应用未审核超时,请提交认证 105 /// 10007 未知的请求源 107 /// 10008 被禁止的IP 108 /// 10009 被禁止的KEY 109 /// 10011 当前IP请求超过限制 111 /// 10012 请求超过次数限制 112 /// 10013 测试KEY超过请求限制 113 /// 10014 系统内部异常(调用充值类业务时,请务必联系客服或通过订单查询接口检测订单,避免造成损失) 114 /// 10020 接口维护 120 /// 10021 接口停用 121 /// public string? Resultcode { get; set; } /// /// 消息 /// public string? Reason { get; set; } /// /// 数据源 /// public object? Result { get; set; } public JuHeAPIResult() { } public JuHeAPIResult(int code, string reason) { Error_code = code; Resultcode = "-1 参数错误"; Reason = reason; Result = new { }; } public JuHeAPIResult(int code,string resultcode,string reason,object? result) { Error_code = code; Resultcode = resultcode; Reason = reason; Result = result; } } /// /// 汇率接口 返回实体类 /// public class ExchangeRateModel { /// /// 货币名称 /// public string? Name { get; set; } /// /// 现汇买入价 /// public string? FBuyPri { get; set; } /// /// 现钞买入价 /// public string? MBuyPri { get; set; } /// /// 现汇卖出价 /// public string? FSellPri { get; set; } /// /// 现钞卖出价 /// public string? MSellPri { get; set; } /// /// 银行折算价/中间价 /// public string? BankConversionPri { get; set; } /// /// 发布日期 /// public string? Date { get; set; } /// /// 发布时间 /// public string? Time { get; set; } } /// /// 汇率 币种Model /// public record RateCurrencyModel { /// /// 币种名称 /// public string CurrencyName { get; set; } /// /// 币种Code /// public string CurrencyCode{ get; set; } } public class JuHeTransResult { public int error_code { get; set; } public string reason { get; set; } public result result { get; set; } } public class result { public data data { get; set; } public string orderid { get; set; } } public class data { public string res { get; set; } public double confidence { get; set; } } public class ContinentInfoView { public string name { get; set; } public string name_en { get; set; } public TimezoneInfoView[] tz { get; set; } } public class TimezoneInfoView { public string tz_name { get; set; } public string tz_simple { get; set; } public string time { get; set; } public long timestamp { get; set; } public string timezone { get; set; } public string week { get; set; } public string timezone_abbreviation { get; set; } } }