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.
79 lines
2.4 KiB
79 lines
2.4 KiB
using BBWY.Common.Models;
|
|
using BBWY.JDSDK.Request;
|
|
using BBWY.Server.Model.Db;
|
|
using BBWY.Server.Model.Dto;
|
|
using Jd.Api;
|
|
using Jd.Api.Request;
|
|
using Jd.Api.Response;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Linq;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text.RegularExpressions;
|
|
using System.Threading.Tasks;
|
|
using io = System.IO;
|
|
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 a = new { A = 1, B = 2 };
|
|
var jtoken = JToken.FromObject(a);
|
|
var b = jtoken.Value<int>("status");
|
|
Console.WriteLine(b);
|
|
|
|
var appKey = "120EA9EC65AB017567D78CC1139EEEA5";
|
|
var appSecret = "866a9877f5f24b03b537483b4defe75d";
|
|
var token = "2ace3023200c4ea9aa682bbf8bffee18jztm";
|
|
var jdClient = GetJdClient(appKey, appSecret);
|
|
|
|
PopAfsSoaRefundapplyQueryPageListRequest req = new PopAfsSoaRefundapplyQueryPageListRequest();
|
|
//req.ids = "1428310918";
|
|
req.orderId = "249263452032";
|
|
req.checkTimeStart = DateTime.Now.AddDays(-60).ToString("yyyy-MM-dd HH:mm:ss");
|
|
req.checkTimeEnd = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
req.pageIndex = 1;
|
|
req.pageSize = 50;
|
|
|
|
|
|
PopAfsSoaRefundapplyQueryPageListResponse response = jdClient.Execute(req, token, DateTime.Now.ToLocalTime());
|
|
Console.WriteLine(JsonConvert.SerializeObject(response));
|
|
|
|
|
|
Console.WriteLine("\r\n\r\n");
|
|
AscServiceAndRefundViewRequest req2 = new AscServiceAndRefundViewRequest();
|
|
|
|
|
|
req2.orderId = 249263452032;
|
|
|
|
//req.applyTimeBegin = ;
|
|
|
|
//req.applyTimeEnd = ;
|
|
|
|
req2.approveTimeBegin = DateTime.Now.Date.AddDays(-1);
|
|
|
|
req2.approveTimeEnd = DateTime.Now;
|
|
|
|
//req.pageNumber = ;
|
|
|
|
//req.pageSize = ;
|
|
|
|
//req.extJsonStr = ;
|
|
|
|
//req.buId = ;
|
|
|
|
|
|
AscServiceAndRefundViewResponse response2 = jdClient.Execute(req2, token, DateTime.Now.ToLocalTime());
|
|
Console.WriteLine(JsonConvert.SerializeObject(response2));
|
|
Console.ReadKey();
|
|
}
|
|
}
|
|
}
|
|
|