修改 自動更新指定table

This commit is contained in:
Kai 2021-06-17 23:03:01 +08:00
parent b88e3a6f34
commit 098614c3a1
2 changed files with 3 additions and 4 deletions

View File

@ -37,7 +37,7 @@ namespace SolarPower.Helper
var passwordStr = ed.DESDecrypt(dbConfig.Password);
//var connStr = $"server={serverStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;";
var connStr = @"server=127.0.0.1;port=3308;database=solar_power;user=root;password=00000000;charset=utf8;";
var connStr = @"server=127.0.0.1;database=solar_power;user=root;password=000000;charset=utf8;";
this._connectionString = connStr;
}

View File

@ -406,8 +406,7 @@ namespace SolarPower.Repository.Implement
}
}
}
}
}
public async Task<int> AddOperation(OperationInfo operation, List<string> properties)
{
@ -602,7 +601,7 @@ namespace SolarPower.Repository.Implement
var trans = conn.BeginTransaction();
try
{
var updateQuery = GenerateUpdateQueryOtherTable(properties, "device");
var updateQuery = GenerateUpdateQueryWithCustomTable(properties, "device");
await conn.ExecuteAsync(updateQuery.ToString(), DeviceInfo, trans);
trans.Commit();
}