From 8da41acfb76a069b340fac279467d85fcf2956d4 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Tue, 8 Aug 2023 16:56:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E8=BF=94=E5=9B=9E=E7=9C=9F=E5=AE=9E=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.Server.Business/PlatformSDK/JDBusiness.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 5fe28c16..ff43d3d6 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -1483,6 +1483,8 @@ namespace BBWY.Server.Business var req = new EclpPoQueryPoOrderRequest(); req.poOrderNo = request.PoOrderNo; var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); + if (!string.IsNullOrEmpty(res.ErrorMsg) || !string.IsNullOrEmpty(res.ErrMsg)) + throw new BusinessException(!string.IsNullOrEmpty(res.ErrMsg) ? res.ErrMsg : res.ErrorMsg); if (res.Json == null) res.Json = JObject.Parse(res.Body); return res.Json; From 1cc2921dcfce194fbc24d858a9fd9df4aa860070 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Tue, 8 Aug 2023 17:06:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E9=94=99=E8=AF=AF=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BBWY.Server.Business/PlatformSDK/JDBusiness.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index ff43d3d6..73a69859 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -1484,7 +1484,12 @@ namespace BBWY.Server.Business req.poOrderNo = request.PoOrderNo; var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime()); if (!string.IsNullOrEmpty(res.ErrorMsg) || !string.IsNullOrEmpty(res.ErrMsg)) - throw new BusinessException(!string.IsNullOrEmpty(res.ErrMsg) ? res.ErrMsg : res.ErrorMsg); + { + var errormsg = !string.IsNullOrEmpty(res.ErrMsg) ? res.ErrMsg : res.ErrorMsg; + if (errormsg.Contains("非法用户")) + errormsg = $"{errormsg}\r\n请联系京东物流负责人,开通对应事业部ISV的授权操作"; + throw new BusinessException(errormsg); + } if (res.Json == null) res.Json = JObject.Parse(res.Body); return res.Json; @@ -1510,7 +1515,13 @@ namespace BBWY.Server.Business if (res.Json == null) res.Json = JObject.Parse(res.Body); if (!string.IsNullOrEmpty(res.ErrorMsg) || !string.IsNullOrEmpty(res.ErrMsg)) - throw new BusinessException(!string.IsNullOrEmpty(res.ErrMsg) ? res.ErrMsg : res.ErrorMsg); + { + var errormsg = !string.IsNullOrEmpty(res.ErrMsg) ? res.ErrMsg : res.ErrorMsg; + if (errormsg.Contains("非法用户")) + errormsg = $"{errormsg}\r\n请联系京东物流负责人,开通对应事业部ISV的授权操作"; + throw new BusinessException(errormsg); + } + return res.Json["jingdong_eclp_po_queryPoOrder_responce"]["queryPoModelList"].Children().Select(x => new JDInStoreOrderDetail() { deptNo = x.Value("deptNo"),