From 50290b82d7c0e930c9b1ce1218c833fab4921b79 Mon Sep 17 00:00:00 2001 From: lxw Date: Wed, 12 Jun 2024 21:42:39 +0800 Subject: [PATCH] =?UTF-8?q?6.12=E7=8E=B0=E5=9C=BA=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/Execute/Api/CloudApi.cs | 2 +- Service/Mgr/SwapOrderMgr.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Service/Execute/Api/CloudApi.cs b/Service/Execute/Api/CloudApi.cs index 78b995b..b95194a 100644 --- a/Service/Execute/Api/CloudApi.cs +++ b/Service/Execute/Api/CloudApi.cs @@ -13,7 +13,7 @@ namespace Service.Execute.Api; public abstract class CloudApi { - private const int TimeSpan = 60; + private const int TimeSpan = 10; private static readonly ILog Log = LogManager.GetLogger("CloudApi"); diff --git a/Service/Mgr/SwapOrderMgr.cs b/Service/Mgr/SwapOrderMgr.cs index 969220d..3558589 100644 --- a/Service/Mgr/SwapOrderMgr.cs +++ b/Service/Mgr/SwapOrderMgr.cs @@ -64,8 +64,14 @@ public class SwapOrderMgr continue; } + if (string.IsNullOrEmpty(swapOrder.CloudSn)) + { + continue; + } + var count = _swapOrderRepository.GetCount(i => i.SwapResult == 1 && i.SwapEndTime >= DateTime.Today && i.SwapEndTime < swapOrder.SwapEndTime); + var uploadSwapOrder = CloudApi.UploadSwapOrder(swapOrder, count++, swapOrderBattery, uploadType); if (uploadSwapOrder == 0) {