From a7a80ff06a5d5dca9ba0394c6f268043a0b89c7c Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Tue, 10 Jan 2023 00:05:24 +0800 Subject: [PATCH] 1 --- BBWY.Server.Business/PlatformSDK/JDBusiness.cs | 1 + BBWY.Test/JDProductAPITest.cs | 18 +++++++++++++++++- BBWY.Test/Program.cs | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 9dd4db67..8718795f 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -709,6 +709,7 @@ namespace BBWY.Server.Business req.jdPrices = $"{req.jdPrices}{sku.Price},"; req.bindType = $"{req.bindType}{(isGift ? 2 : 1)},"; req.num = $"{req.num}1,"; + req.promoPrices = $"{req.promoPrices}{(isGift ? 0 : sku.Price)},"; } req.skuIds = req.skuIds.Substring(0, req.skuIds.Length - 1); diff --git a/BBWY.Test/JDProductAPITest.cs b/BBWY.Test/JDProductAPITest.cs index 165ee97b..90654335 100644 --- a/BBWY.Test/JDProductAPITest.cs +++ b/BBWY.Test/JDProductAPITest.cs @@ -57,6 +57,22 @@ namespace BBWY.Test Console.WriteLine(JsonConvert.SerializeObject(skuList)); } + public void GetSkusByWareId(IJdClient client, string token) + { + var req_skuList = new SkuReadSearchSkuListRequest() + { + pageSize = 50,//50 + field = "logo,saleAttrs,status,created,barCode,categoryId,multiCateProps" + }; + + req_skuList.wareId = "10023496890322"; + + var rep_skuList = client.Execute(req_skuList, token, DateTime.Now.ToLocalTime()); + + Console.WriteLine(JsonConvert.SerializeObject(rep_skuList)); + + } + public void GetSpu(IJdClient client, string token, string spu) { var req_productList = new WareReadSearchWare4ValidRequest() @@ -74,7 +90,7 @@ namespace BBWY.Test Console.WriteLine(JsonConvert.SerializeObject(res)); } - + public void ShangJiaTest(IJdClient client, string token) { diff --git a/BBWY.Test/Program.cs b/BBWY.Test/Program.cs index 8eea53ec..8a42f4d0 100644 --- a/BBWY.Test/Program.cs +++ b/BBWY.Test/Program.cs @@ -39,7 +39,7 @@ namespace BBWY.Test IJdClient client = GetJdClient(appkey, appSecret); var test1 = new JDProductAPITest(); - test1.GetSkus(client, token); + test1.GetSkusByWareId(client, token); Console.ReadKey();