From c307164f31d15a21c5ae45d5297f951b08390684 Mon Sep 17 00:00:00 2001 From: yanghongwei Date: Mon, 7 Apr 2025 22:38:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E6=9B=B4=E6=96=B0=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Program.cs | 2 +- Service/AlarmService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Program.cs b/Program.cs index 85066d1..c3dc5ab 100644 --- a/Program.cs +++ b/Program.cs @@ -74,7 +74,7 @@ builder.Services.AddTransient(sp => #if DEBUG db.Aop.OnLogExecuting = (sql, pars) => { - Console.WriteLine(sql + "参数值:" + db.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value))); + // Console.WriteLine(sql + "参数值:" + db.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value))); }; //创建数据库和表的语句仅执行一次 //db.DbMaintenance.CreateDatabase(); diff --git a/Service/AlarmService.cs b/Service/AlarmService.cs index f32f14b..dfdfa19 100644 --- a/Service/AlarmService.cs +++ b/Service/AlarmService.cs @@ -132,7 +132,7 @@ namespace LY.App.Service await _redisService.SetAsync(key, deviceinfo); //鏇存柊浣嶇疆 // await _db.Updateable(deviceinfo).ExecuteCommandAsync(); - await _db.CopyNew().Updateable(deviceinfo).ExecuteCommandAsync(); + await _db.CopyNew().Updateable(deviceinfo).UpdateColumns(it => new { it.Lat, it.Lon }).ExecuteCommandAsync(); } } private async Task GetBatId(string droneId)