|
|
|
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 = "b46065ef5b894f2297686e28d39cb37a2mdy";//"2ace3023200c4ea9aa682bbf8bffee18jztm";
|
|
|
|
|
|
|
|
IJdClient client = GetJdClient(appkey, appSecret);
|
|
|
|
|
|
|
|
var req5 = new AdsIbgUniversalJosServiceCampaignQueryRequest();
|
|
|
|
req5.startDay = "2022-10-05";
|
|
|
|
req5.endDay = "2022-10-05";
|
|
|
|
req5.businessType = "2";
|
|
|
|
req5.accessPin = "腾奇666";
|
|
|
|
req5.clickOrOrderDay = "0";
|
|
|
|
req5.giftFlag = "0";
|
|
|
|
req5.clickOrOrderCaliber = "1";
|
|
|
|
//req.isDaily = "";
|
|
|
|
AdsIbgUniversalJosServiceCampaignQueryResponse response5 = client.Execute(req5, token, DateTime.Now.ToLocalTime());
|
|
|
|
Console.WriteLine(JsonConvert.SerializeObject(response5));
|
|
|
|
|
|
|
|
|
|
|
|
Console.WriteLine("-------------------------------------------------");
|
|
|
|
|
|
|
|
var req6 = new AdsIbgUniversalJosServiceCampaignQueryRequest();
|
|
|
|
req6.startDay = "2022-10-06";
|
|
|
|
req6.endDay = "2022-10-06";
|
|
|
|
req6.businessType = "2";
|
|
|
|
req6.accessPin = "腾奇666";
|
|
|
|
req6.clickOrOrderDay = "0";
|
|
|
|
req6.giftFlag = "0";
|
|
|
|
req6.clickOrOrderCaliber = "1";
|
|
|
|
//req.isDaily = "";
|
|
|
|
AdsIbgUniversalJosServiceCampaignQueryResponse response6 = client.Execute(req6, token, DateTime.Now.ToLocalTime());
|
|
|
|
Console.WriteLine(JsonConvert.SerializeObject(response6));
|
|
|
|
Console.ReadKey();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|