初步完成单个变量的历史记录查询

This commit is contained in:
2025-09-17 13:32:29 +08:00
parent 74fde6bd8b
commit 82c355a392
14 changed files with 212 additions and 239 deletions

View File

@@ -85,7 +85,7 @@ public class VariableTableRepository : BaseRepository<DbVariableTable>, IVariabl
{
var stopwatch = new Stopwatch();
stopwatch.Start();
var result = await Db.Deleteable(new DbVariableTable() { Id = id })
var result = await _dbContext.GetInstance().Deleteable(new DbVariableTable() { Id = id })
.ExecuteCommandAsync();
stopwatch.Stop();
_logger.LogInformation($"Delete {typeof(DbVariableTable)},ID={id},耗时:{stopwatch.ElapsedMilliseconds}ms");
@@ -120,7 +120,7 @@ public class VariableTableRepository : BaseRepository<DbVariableTable>, IVariabl
{
var stopwatch = new Stopwatch();
stopwatch.Start();
var result = await Db.Deleteable<DbVariableTable>()
var result = await _dbContext.GetInstance().Deleteable<DbVariableTable>()
.Where(it => it.DeviceId == deviceId)
.ExecuteCommandAsync();
stopwatch.Stop();