From a745e2c8278a2ad1e789419821baf4c83b496b00 Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Tue, 27 Sep 2022 19:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E8=B4=B9=E8=AE=B0=E5=BD=95=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.JDSDK/Domain/OpenApiPageVo.cs | 32 +++++++ BBWY.JDSDK/Domain/OpenApiResDto.cs | 32 +++++++ BBWY.JDSDK/Domain/QueryCostDetailsVo.cs | 22 +++++ ...rmFinanceOpenapiQuerycostdetailsRequest.cs | 84 +++++++++++++++++++ ...mFinanceOpenapiQuerycostdetailsResponse.cs | 16 ++++ BBWY.Test/Program.cs | 17 +++- 6 files changed, 201 insertions(+), 2 deletions(-) create mode 100644 BBWY.JDSDK/Domain/OpenApiPageVo.cs create mode 100644 BBWY.JDSDK/Domain/OpenApiResDto.cs create mode 100644 BBWY.JDSDK/Domain/QueryCostDetailsVo.cs create mode 100644 BBWY.JDSDK/Request/DspPlatformFinanceOpenapiQuerycostdetailsRequest.cs create mode 100644 BBWY.JDSDK/Response/DspPlatformFinanceOpenapiQuerycostdetailsResponse.cs diff --git a/BBWY.JDSDK/Domain/OpenApiPageVo.cs b/BBWY.JDSDK/Domain/OpenApiPageVo.cs new file mode 100644 index 00000000..f4f23e1e --- /dev/null +++ b/BBWY.JDSDK/Domain/OpenApiPageVo.cs @@ -0,0 +1,32 @@ +using System; +using System.Xml.Serialization; +using System.Collections.Generic; +using Newtonsoft.Json; +using Jd.Api.Domain; +namespace Jd.Api.Domain +{ + +[Serializable] +public class OpenApiPageVo:JdObject{ + [JsonProperty("total")] +public long + + total + { get; set; } + [JsonProperty("pageNo")] +public int + + pageNo + { get; set; } + [JsonProperty("pageSize")] +public int + + pageSize + { get; set; } + [JsonProperty("data")] +public List + + data + { get; set; } + } +} diff --git a/BBWY.JDSDK/Domain/OpenApiResDto.cs b/BBWY.JDSDK/Domain/OpenApiResDto.cs new file mode 100644 index 00000000..95c30940 --- /dev/null +++ b/BBWY.JDSDK/Domain/OpenApiResDto.cs @@ -0,0 +1,32 @@ +using System; +using System.Xml.Serialization; +using System.Collections.Generic; +using Newtonsoft.Json; +using Jd.Api.Domain; +namespace Jd.Api.Domain +{ + +[Serializable] +public class OpenApiResDto:JdObject{ + [JsonProperty("msg")] +public string + + msg + { get; set; } + [JsonProperty("traceId")] +public string + + traceId + { get; set; } + [JsonProperty("code")] +public int + + code + { get; set; } + [JsonProperty("data")] +public QueryCostDetailsVo + + data + { get; set; } + } +} diff --git a/BBWY.JDSDK/Domain/QueryCostDetailsVo.cs b/BBWY.JDSDK/Domain/QueryCostDetailsVo.cs new file mode 100644 index 00000000..14b05f37 --- /dev/null +++ b/BBWY.JDSDK/Domain/QueryCostDetailsVo.cs @@ -0,0 +1,22 @@ +using System; +using System.Xml.Serialization; +using System.Collections.Generic; +using Newtonsoft.Json; +using Jd.Api.Domain; +namespace Jd.Api.Domain +{ + +[Serializable] +public class QueryCostDetailsVo:JdObject{ + [JsonProperty("totalAmount")] +public string + + totalAmount + { get; set; } + [JsonProperty("page")] +public OpenApiPageVo + + page + { get; set; } + } +} diff --git a/BBWY.JDSDK/Request/DspPlatformFinanceOpenapiQuerycostdetailsRequest.cs b/BBWY.JDSDK/Request/DspPlatformFinanceOpenapiQuerycostdetailsRequest.cs new file mode 100644 index 00000000..d7720776 --- /dev/null +++ b/BBWY.JDSDK/Request/DspPlatformFinanceOpenapiQuerycostdetailsRequest.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using Jd.Api.Response; +using Jd.Api.Util; +namespace Jd.Api.Request +{ + public class DspPlatformFinanceOpenapiQuerycostdetailsRequest : JdRequestBase + { + public string +accessPin + { get; set; } + + public string +authType + { get; set; } + + public string +operatorPin + { get; set; } + + public string +beginDate + { get; set; } + + public string +endDate + { get; set; } + + public string +orderType + { get; set; } + public Nullable +pageNo + { get; set; } + + public Nullable +moneyType + { get; set; } + + public Nullable +pageSize + { get; set; } + + public string +subPin + { get; set; } + + public override string ApiName + { + get { return "jingdong.dsp.platform.finance.openapi.querycostdetails"; } + } + protected override void PrepareParam(IDictionary parameters) + { + parameters.Add("accessPin", this.accessPin +); + parameters.Add("authType", this.authType +); + parameters.Add("operatorPin", this.operatorPin +); + parameters.Add("beginDate", this.beginDate +); + parameters.Add("endDate", this.endDate +); + parameters.Add("orderType", this.orderType +); + parameters.Add("pageNo", this.pageNo +); + parameters.Add("moneyType", this.moneyType +); + parameters.Add("pageSize", this.pageSize +); + parameters.Add("subPin", this.subPin +); + } + } +} + + + + + + + + diff --git a/BBWY.JDSDK/Response/DspPlatformFinanceOpenapiQuerycostdetailsResponse.cs b/BBWY.JDSDK/Response/DspPlatformFinanceOpenapiQuerycostdetailsResponse.cs new file mode 100644 index 00000000..07cda09a --- /dev/null +++ b/BBWY.JDSDK/Response/DspPlatformFinanceOpenapiQuerycostdetailsResponse.cs @@ -0,0 +1,16 @@ +using System; +using System.Xml.Serialization; +using System.Collections.Generic; +using Newtonsoft.Json; + using Jd.Api.Domain; + namespace Jd.Api.Response +{ + +public class DspPlatformFinanceOpenapiQuerycostdetailsResponse:JdResponse{ + [JsonProperty("returnType")] +public OpenApiResDto + + returnType + { get; set; } + } +} diff --git a/BBWY.Test/Program.cs b/BBWY.Test/Program.cs index ba888a7d..786cf7a2 100644 --- a/BBWY.Test/Program.cs +++ b/BBWY.Test/Program.cs @@ -27,8 +27,21 @@ namespace BBWY.Test var appSecret = "866a9877f5f24b03b537483b4defe75d"; var token = "2ace3023200c4ea9aa682bbf8bffee18jztm"; - - + var jdClient = GetJdClient(appkey, appSecret); + var req = new DspPlatformFinanceOpenapiQuerycostdetailsRequest(); + + //req.accessPin = "abc"; + //req.authType = "abc"; + //req.operatorPin = "abc"; + req.beginDate = "2022-09-21"; + req.endDate = "2022-09-27"; + req.pageNo = 1; + req.pageSize = 100; + req.moneyType = 1; + //req.subPin = "abc"; + + DspPlatformFinanceOpenapiQuerycostdetailsResponse response = jdClient.Execute(req, token, DateTime.Now.ToLocalTime()); + Console.WriteLine(JsonConvert.SerializeObject(response)); Console.ReadKey(); } }