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(); } }