From a5b9bb2c9c88204f1afaff4d94695f43545cc47c Mon Sep 17 00:00:00 2001 From: zhangbin <460190368@qq.com> Date: Mon, 16 Mar 2026 15:06:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9redis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenAuth.App/ServiceApp/ManageApp.cs | 9 ++++++++- OpenAuth.WebApi/Model/mqtt/ChannelDB/LogBatchWriter.cs | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/OpenAuth.App/ServiceApp/ManageApp.cs b/OpenAuth.App/ServiceApp/ManageApp.cs index fdf5fd0..4aa35d5 100644 --- a/OpenAuth.App/ServiceApp/ManageApp.cs +++ b/OpenAuth.App/ServiceApp/ManageApp.cs @@ -43,6 +43,7 @@ using static ICSharpCode.SharpZipLib.Zip.ExtendedUnixData; using static Org.BouncyCastle.Math.EC.ECCurve; using Directory = System.IO.Directory; using RangeHeaderValue = System.Net.Http.Headers.RangeHeaderValue; +using SqlSugar.SplitTableExtensions; namespace OpenAuth.App.ServiceApp { @@ -3451,7 +3452,13 @@ WHERE }).ToListAsync(); foreach (var uav in list) { - var droneredis = _redisCacheContext.Get(uav.Sn); + var sn = await db.LasaDronePort.AsQueryable().Where(r => r.Id == uav.PId).FirstAsync(); + string droneredis = string.Empty; + if (sn != null) + { + droneredis = _redisCacheContext.Get(sn.Sn); + } + //var droneredis = _redisCacheContext.Get(sn.Sn); if (!string.IsNullOrEmpty(droneredis)) { //判断是大疆还是固定翼 diff --git a/OpenAuth.WebApi/Model/mqtt/ChannelDB/LogBatchWriter.cs b/OpenAuth.WebApi/Model/mqtt/ChannelDB/LogBatchWriter.cs index e72db29..128272d 100644 --- a/OpenAuth.WebApi/Model/mqtt/ChannelDB/LogBatchWriter.cs +++ b/OpenAuth.WebApi/Model/mqtt/ChannelDB/LogBatchWriter.cs @@ -13,7 +13,7 @@ namespace OpenAuth.WebApi.Model.mqtt.ChannelDB private readonly ILogger _logger; private const int BatchSize = 100; - private const int FlushIntervalMs = 10000; + private const int FlushIntervalMs = 5000; public LogBatchWriter(LogQueueService queue, IServiceScopeFactory scopeFactory, ILogger logger) {