From d71f65de45f98afacbefc054d3ddac3748cb3524 Mon Sep 17 00:00:00 2001 From: yanghongwei Date: Sat, 5 Apr 2025 18:34:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Service/AlarmService.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Service/AlarmService.cs b/Service/AlarmService.cs index 0a76038..fa5ca11 100644 --- a/Service/AlarmService.cs +++ b/Service/AlarmService.cs @@ -49,7 +49,7 @@ namespace LY.App.Service return new ApiResult() { code = 1, msg = "设备不存在" }; } await _redisService.SetAsync(key, deviceinfo, TimeSpan.FromDays(1)); - + var entity = input.data.Adapt>(); foreach (var item in entity) { @@ -128,11 +128,10 @@ namespace LY.App.Service deviceinfo.Lat = input.product_lat; deviceinfo.Lon = input.product_lon; await _redisService.SetAsync(key, deviceinfo); + //更新位置 + // await _db.Updateable(deviceinfo).ExecuteCommandAsync(); + await _db.Updateable(deviceinfo).ExecuteCommandAsync(); } - deviceinfo.Lat = input.product_lat; - deviceinfo.Lon = input.product_lon; - //更新位置 - await _db.Updateable(deviceinfo).ExecuteCommandAsync(); } private async Task GetBatId(string droneId) {