From 08c2cf8b29dafe9ff4664630b281677eff7bf8b5 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Sun, 15 Oct 2023 12:06:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E9=BC=8E=E6=96=B0=E5=A2=9E=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.Server.Business/PlatformSDK/JDBusiness.cs | 14 ++++++++++++++ .../PlatformSDK/PlatformSDKBusiness.cs | 11 +++++++++++ .../Request/JD/QueryOrderCouponDetailRequest.cs | 7 +++++++ JD.API/Controllers/PlatformSDKController.cs | 11 +++++++++++ 4 files changed, 43 insertions(+) create mode 100644 BBWY.Server.Model/Dto/Request/JD/QueryOrderCouponDetailRequest.cs diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 0601bb99..fe3c8d02 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -1661,5 +1661,19 @@ namespace BBWY.Server.Business whNo = x.Value("whNo") }).ToList(); } + + public override JToken GetOrderCouponDetail(QueryOrderCouponDetailRequest request) + { + var jdClient = GetJdClient(request.AppKey, request.AppSecret); + var req = new PopOrderCoupondetailRequest(); + + req.orderId = Convert.ToInt64(request.OrderId); + + + var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); + if (res.Json == null) + res.Json = JObject.Parse(res.Body); + return res.Json; + } } } diff --git a/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs b/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs index 3cf2d1f6..8728dfcb 100644 --- a/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs @@ -255,5 +255,16 @@ namespace BBWY.Server.Business { throw new NotImplementedException(); } + + /// + /// 获取订单优惠明细 + /// + /// + /// + /// + public virtual JToken GetOrderCouponDetail(QueryOrderCouponDetailRequest request) + { + throw new NotImplementedException(); + } } } diff --git a/BBWY.Server.Model/Dto/Request/JD/QueryOrderCouponDetailRequest.cs b/BBWY.Server.Model/Dto/Request/JD/QueryOrderCouponDetailRequest.cs new file mode 100644 index 00000000..acf8e328 --- /dev/null +++ b/BBWY.Server.Model/Dto/Request/JD/QueryOrderCouponDetailRequest.cs @@ -0,0 +1,7 @@ +namespace BBWY.Server.Model.Dto +{ + public class QueryOrderCouponDetailRequest : PlatformRequest + { + public string OrderId { get; set; } + } +} diff --git a/JD.API/Controllers/PlatformSDKController.cs b/JD.API/Controllers/PlatformSDKController.cs index 797b044f..a635a9ac 100644 --- a/JD.API/Controllers/PlatformSDKController.cs +++ b/JD.API/Controllers/PlatformSDKController.cs @@ -422,5 +422,16 @@ namespace JD.API.API.Controllers { return platformSDKBusinessList.FirstOrDefault(p => p.Platform == request.Platform).GetJDSupplierDetail(request); } + + /// + /// 获取优惠数据明细 + /// + /// + /// + [HttpPost] + public virtual JToken GetOrderCouponDetail([FromBody] QueryOrderCouponDetailRequest request) + { + return platformSDKBusinessList.FirstOrDefault(p => p.Platform == request.Platform).GetOrderCouponDetail(request); + } } }