From 94b38ad63d37dc3a807472387bd457d7cee00609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <421281095@qq.com> Date: Tue, 1 Apr 2025 10:14:19 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=B7=BB=E5=8A=A0ws=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FireManagement/FireManagementApp.cs | 19 ++++++++++--------- OpenAuth.WebApi/appsettings.json | 3 ++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/OpenAuth.App/ServiceApp/FireManagement/FireManagementApp.cs b/OpenAuth.App/ServiceApp/FireManagement/FireManagementApp.cs index c98ab21..9024a18 100644 --- a/OpenAuth.App/ServiceApp/FireManagement/FireManagementApp.cs +++ b/OpenAuth.App/ServiceApp/FireManagement/FireManagementApp.cs @@ -552,11 +552,12 @@ namespace OpenAuth.App.ServiceApp.FireManagement userPoint.CreateTime = DateTime.Now; var userPointHistory = userPoint.MapTo(); - var oldinfo = await db.Queryable().Where(r => r.CreateId == userPoint.CreateId) + var oldInfo = await db.Queryable() + .Where(r => r.CreateId == userPoint.CreateId) .FirstAsync(); - //上线弹窗 - if (oldinfo == null || (oldinfo != null && oldinfo.CreateTime.AddMinutes(2) < DateTime.Now)) + //上线弹窗 第一次上报或者上线时间不超过2分钟 + if (oldInfo == null || (oldInfo != null && oldInfo.CreateTime.AddMinutes(2) < DateTime.Now)) { var user = await db.Queryable().Where(r => r.Id == userPoint.CreateId) .FirstAsync(); @@ -581,13 +582,13 @@ namespace OpenAuth.App.ServiceApp.FireManagement } - if (oldinfo != null) + if (oldInfo != null) { - oldinfo.Lat = userPoint.Lat; - oldinfo.Lng = userPoint.Lng; - oldinfo.CreateTime = userPoint.CreateTime; - oldinfo.Intype = userPoint.Intype; - await db.Updateable(oldinfo).ExecuteCommandAsync(); + oldInfo.Lat = userPoint.Lat; + oldInfo.Lng = userPoint.Lng; + oldInfo.CreateTime = userPoint.CreateTime; + oldInfo.Intype = userPoint.Intype; + await db.Updateable(oldInfo).ExecuteCommandAsync(); } else { diff --git a/OpenAuth.WebApi/appsettings.json b/OpenAuth.WebApi/appsettings.json index 2946832..3438301 100644 --- a/OpenAuth.WebApi/appsettings.json +++ b/OpenAuth.WebApi/appsettings.json @@ -67,5 +67,6 @@ "TiffStoreNamePrefix": "tiff_store", "TiffDir": "E:/tiff" }, - "FlyImageDir": "e:/fly" + "FlyImageDir": "e:/fly", + "WebSocket": "ws://192.168.10.106:5698/ws" }