只更新位置列
This commit is contained in:
parent
e72164545e
commit
c307164f31
|
|
@ -74,7 +74,7 @@ builder.Services.AddTransient<SqlSugarClient>(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();
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ namespace LY.App.Service
|
|||
await _redisService.SetAsync(key, deviceinfo);
|
||||
//更新位置
|
||||
// await _db.Updateable(deviceinfo).ExecuteCommandAsync();
|
||||
await _db.CopyNew().Updateable<DeviceEntity>(deviceinfo).ExecuteCommandAsync();
|
||||
await _db.CopyNew().Updateable<DeviceEntity>(deviceinfo).UpdateColumns(it => new { it.Lat, it.Lon }).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
private async Task<long> GetBatId(string droneId)
|
||||
|
|
|
|||
Loading…
Reference in New Issue