From 0c377ed8f278adafcb84d6e91c021ae36f40b279 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Wed, 8 Feb 2023 21:11:56 +0800 Subject: [PATCH 1/4] 1 --- .../EvaluationAssistant/EvaluationAssistantBusiness.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs index 9714d26a..edbadf93 100644 --- a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs +++ b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs @@ -620,11 +620,11 @@ namespace BBWY.Server.Business }, GetYunDingRequestHeader(), HttpMethod.Post); - if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) - throw new BusinessException(httpResult.Content); - var response = JsonConvert.DeserializeObject(httpResult.Content); - if (!response.Success) - throw new BusinessException(response.Msg); + //if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) + // throw new BusinessException(httpResult.Content); + //var response = JsonConvert.DeserializeObject(httpResult.Content); + //if (!response.Success) + // throw new BusinessException(response.Msg); } fsql.Transaction(() => From 7917b3f3f07185dd31a3596d947668ba4b6ba574 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Wed, 8 Feb 2023 21:45:29 +0800 Subject: [PATCH 2/4] 1 --- .../EvaluationAssistant/EvaluationAssistantBusiness.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs index edbadf93..9861d297 100644 --- a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs +++ b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs @@ -665,11 +665,11 @@ namespace BBWY.Server.Business }, GetYunDingRequestHeader(), HttpMethod.Post); - if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) - throw new BusinessException(httpResult.Content); - var response = JsonConvert.DeserializeObject(httpResult.Content); - if (!response.Success) - throw new BusinessException(response.Msg); + //if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) + // throw new BusinessException(httpResult.Content); + //var response = JsonConvert.DeserializeObject(httpResult.Content); + //if (!response.Success) + // throw new BusinessException(response.Msg); } fsql.Transaction(() => From b3dfea721fab7eba55ba6beb4e4d0c5b0085683c Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Thu, 9 Feb 2023 12:15:27 +0800 Subject: [PATCH 3/4] 1 --- .../EvaluationAssistantBusiness.cs | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs index 9861d297..abb7fd32 100644 --- a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs +++ b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs @@ -620,11 +620,11 @@ namespace BBWY.Server.Business }, GetYunDingRequestHeader(), HttpMethod.Post); - //if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) - // throw new BusinessException(httpResult.Content); - //var response = JsonConvert.DeserializeObject(httpResult.Content); - //if (!response.Success) - // throw new BusinessException(response.Msg); + if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) + throw new BusinessException(httpResult.Content); + var response = JsonConvert.DeserializeObject(httpResult.Content); + if (!response.Success) + throw new BusinessException(response.Msg); } fsql.Transaction(() => @@ -665,11 +665,11 @@ namespace BBWY.Server.Business }, GetYunDingRequestHeader(), HttpMethod.Post); - //if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) - // throw new BusinessException(httpResult.Content); - //var response = JsonConvert.DeserializeObject(httpResult.Content); - //if (!response.Success) - // throw new BusinessException(response.Msg); + if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) + throw new BusinessException(httpResult.Content); + var response = JsonConvert.DeserializeObject(httpResult.Content); + if (!response.Success) + throw new BusinessException(response.Msg); } fsql.Transaction(() => @@ -709,7 +709,10 @@ namespace BBWY.Server.Business throw new BusinessException(httpResult.Content); var response = JsonConvert.DeserializeObject(httpResult.Content); if (!response.Success) - throw new BusinessException(response.Msg); + { + if (!response.Msg.Contains("促销已删除")) + throw new BusinessException(response.Msg); + } fsql.Update(request.Id).Set(pt => pt.Status, Enums.PromitionTaskStatus.已停止).ExecuteAffrows(); } From 789a123d33eff59e8f30a9bef2151ab13392b395 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Thu, 9 Feb 2023 13:12:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=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/_1688Business.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/BBWY.Server.Business/PlatformSDK/_1688Business.cs b/BBWY.Server.Business/PlatformSDK/_1688Business.cs index 1ac4e600..def4baea 100644 --- a/BBWY.Server.Business/PlatformSDK/_1688Business.cs +++ b/BBWY.Server.Business/PlatformSDK/_1688Business.cs @@ -126,9 +126,17 @@ namespace BBWY.Server.Business request.RequestEntity = param; if (!string.IsNullOrEmpty(previewOrderReuqest.AppToken)) request.AccessToken = previewOrderReuqest.AppToken; - var result = client.NewRequest(request, reqPolicy); - if (result.Value("success") != true) - throw new BusinessException(result.Value("errorMsg")) { Code = 0 }; + JObject result = null; + try + { + result = client.NewRequest(request, reqPolicy); + if (result.Value("success") != true) + throw new BusinessException(result.Value("errorMsg")) { Code = 0 }; + } + catch (Exception ex) + { + throw new BusinessException(ex.Message); + } nLogManager.Default().Info($"PreviewOrder Request:{JsonConvert.SerializeObject(previewOrderReuqest)} Response:{result}");