|
|
|
using BBWY.Common.Http;
|
|
|
|
using BBWY.Server.Model.Db;
|
|
|
|
using com.alibaba.openapi.client;
|
|
|
|
using com.alibaba.openapi.client.policy;
|
|
|
|
using Jd.ACES;
|
|
|
|
using Jd.Api;
|
|
|
|
using Jd.Api.Request;
|
|
|
|
using Jd.Api.Response;
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
using System;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Threading;
|
|
|
|
|
|
|
|
namespace BBWY.Test
|
|
|
|
{
|
|
|
|
internal class Program
|
|
|
|
{
|
|
|
|
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";
|
|
|
|
var token = "eda9bd0d9c2b48fba96ebc415669cea7jkmg";//"2ace3023200c4ea9aa682bbf8bffee18jztm";
|
|
|
|
|
|
|
|
var startDate = DateTime.Parse("2022-08-01");
|
|
|
|
var endDate = DateTime.Parse("2022-08-31");
|
|
|
|
var jdClient = GetJdClient(appkey, appSecret);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|