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) {