步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.0 KiB

3 years ago
using BBWY.Common.Http;
using BBWY.Server.Model.Db;
using com.alibaba.openapi.client;
using com.alibaba.openapi.client.policy;
3 years ago
using Jd.ACES;
3 years ago
using Jd.Api;
3 years ago
using Jd.Api.Request;
3 years ago
using Jd.Api.Response;
3 years ago
using Microsoft.Extensions.DependencyInjection;
3 years ago
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
3 years ago
using System.Linq;
3 years ago
using System.Threading;
3 years ago
namespace BBWY.Test
{
internal class Program
{
3 years ago
private static IJdClient GetJdClient(string appKey, string appSecret)
{
return new DefaultJdClient("https://api.jd.com/routerjson", appKey, appSecret);
}
static void Main(string[] args)
{
var appkey = "120EA9EC65AB017567D78CC1139EEEA5";
var appSecret = "866a9877f5f24b03b537483b4defe75d";
3 years ago
var token = "e3bb89d1dcf6461fae2f197dfc5d6d68niyj";//"2ace3023200c4ea9aa682bbf8bffee18jztm";
3 years ago
var startDate = DateTime.Parse("2022-09-29");
var endDate = DateTime.Parse("2022-09-29");
var jdClient = GetJdClient(appkey, appSecret);
3 years ago
var req = new DspPlatformFinanceOpenapiQuerycostdetailsRequest();
req.beginDate = startDate.ToString("yyyy-MM-dd");
req.endDate = endDate.ToString("yyyy-MM-dd");
req.pageNo = 1;
req.pageSize = 100;
req.moneyType = 1;
//var req = new AdsIbgUniversalJosServiceSkuQueryRequest();
//req.businessType = "134217728";
//req.clickOrOrderCaliber = "1";
//req.clickOrOrderDay = "0";
//req.clickStartDay = "2022-09-25";
//req.clickEndDay = "2022-09-25";
//req.orderStartDay = "2022-09-25";
//req.orderEndDay = "2022-09-25";
//req.startDay = "2022-09-25";
//req.endDay = "2022-09-25";
//req.accessPin = "ecmax2017";
var response = jdClient.Execute(req, token, DateTime.Now.ToLocalTime());
Console.WriteLine(JsonConvert.SerializeObject(response));
Console.ReadKey();
}
}
}