步步为盈
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.

72 lines
2.8 KiB

2 years ago
using Jd.ACES;
using Jd.Api;
using Jd.Api.Request;
using Newtonsoft.Json;
3 years ago
using Newtonsoft.Json.Linq;
using System;
3 years ago
using System.Collections.Generic;
using System.Linq;
2 years ago
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
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);
}
2 years ago
public static string Md5Encrypt(string originStr)
{
using (var md5 = MD5.Create())
{
return string.Join(string.Empty, md5.ComputeHash(Encoding.UTF8.GetBytes(originStr)).Select(x => x.ToString("x2")));
}
}
static void Main(string[] args)
{
2 years ago
2 years ago
//var appkey = "E1AA9247D5583A6D87449CE6AB290185";
//var appSecret = "e479558ddd9e40f8929cfc00c6cbbc9c";
var appkey = "120EA9EC65AB017567D78CC1139EEEA5";
var appSecret = "8a42bc2301e8439b896e99f5475e0a9b";
3 years ago
////0e61c4a8ec3e4df4b5836e10884db9220yth 齐盛
2 years ago
var token = "2ace3023200c4ea9aa682bbf8bffee18jztm"; //布莱特玩具
//var token = "01f5be2cb4d741dda66bce2356941597mdfm"; //布莱特玩具 token2
//var token = "01dc6f6e7fc34dcd99090d690312556cmdfk"; //齐盛
//var token = "9fffa982da23446fb035499ae5622f49odjk"; //腾奇
//var token = "c22ff4d37b6c4bbd82cd9e8d0dab42dbziyz"; //森王车品
//var token = "44c19a1c1fbd4641957e6e8985ed1358jmtl"; //森王玩具
3 years ago
2 years ago
IJdClient client = GetJdClient(appkey, appSecret);
PopOrderSearchRequest req = new PopOrderSearchRequest();
2 years ago
2 years ago
req.startDate = "2023-03-05 13:30:00";
2 years ago
2 years ago
req.endDate = "2023-03-06 00:00:00";
req.orderState = "WAIT_SELLER_STOCK_OUT,WAIT_GOODS_RECEIVE_CONFIRM,PAUSE,FINISHED_L,TRADE_CANCELED,LOCKED,NOT_PAY";
req.optionalFields = "orderId,venderId,orderType,payType,orderTotalPrice,orderSellerPrice,orderPayment,freightPrice,orderState,orderStateRemark,orderRemark,orderStartTime,orderEndTime,modified,consigneeInfo,itemInfoList,couponDetailList,taxFee,venderRemark,pin,waybill,storeOrder,storeId,sellerDiscount";
req.page = "1";
req.pageSize = "100";
req.sortType = "0";
req.dateType = "1";
2 years ago
2 years ago
2 years ago
var response = client.Execute(req, token, DateTime.Now.ToLocalTime());
Console.WriteLine(response);
Console.ReadKey();
}
}
}