From 54e97a331e13adf4f31a4033954eca60187d5abf Mon Sep 17 00:00:00 2001 From: ChenYi <296215406@outlook.com> Date: Fri, 31 Oct 2025 14:58:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=AA=8C=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BusinessSystemAggregationService.cs | 4 ++-- src/JiShe.IoT.Application/IoTAppService.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs b/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs index df6a59e..b60b008 100644 --- a/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs +++ b/src/JiShe.IoT.Application/BusinessSystemAggregation/BusinessSystemAggregationService.cs @@ -250,11 +250,11 @@ namespace JiShe.IoT.BusinessSystemAggregation { try { - return HandleOpenApiRequest(null, null); + return HandleOpenApiRequest(input, new ServerApplicationOptions()); } catch (Exception ex) { - return HandleOpenApiRequest(null, null); + return HttpDataResultExtensions.Failed($"业务系统批量新增设备数据,发送异常:{ex.Message}", -106); } } } diff --git a/src/JiShe.IoT.Application/IoTAppService.cs b/src/JiShe.IoT.Application/IoTAppService.cs index f0784bc..01a3285 100644 --- a/src/JiShe.IoT.Application/IoTAppService.cs +++ b/src/JiShe.IoT.Application/IoTAppService.cs @@ -84,7 +84,7 @@ namespace JiShe.IoT /// protected HttpDataResult HandleOpenApiRequest(OpenApiRequest input, ServerApplicationOptions serverOptions) where T : class { - if (string.IsNullOrWhiteSpace(input.Message) || string.IsNullOrWhiteSpace(input.Nonce) || string.IsNullOrWhiteSpace(input.Signature)) + if (input == null || serverOptions == null || string.IsNullOrWhiteSpace(input.Message) || string.IsNullOrWhiteSpace(input.Nonce) || string.IsNullOrWhiteSpace(input.Signature)) { return HttpDataResultExtensions.Failed(null, "Ϊ", -1101); }