细节调整

This commit is contained in:
yanghongwei 2025-04-05 18:34:21 +08:00
parent 7bd3c25f31
commit d71f65de45
1 changed files with 4 additions and 5 deletions

View File

@ -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<List<Alarm>>();
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<DeviceEntity>(deviceinfo).ExecuteCommandAsync();
}
deviceinfo.Lat = input.product_lat;
deviceinfo.Lon = input.product_lon;
//更新位置
await _db.Updateable(deviceinfo).ExecuteCommandAsync();
}
private async Task<long> GetBatId(string droneId)
{