修改 自動更新指定table
This commit is contained in:
parent
b88e3a6f34
commit
098614c3a1
@ -37,7 +37,7 @@ namespace SolarPower.Helper
|
|||||||
var passwordStr = ed.DESDecrypt(dbConfig.Password);
|
var passwordStr = ed.DESDecrypt(dbConfig.Password);
|
||||||
|
|
||||||
//var connStr = $"server={serverStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;";
|
//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;
|
this._connectionString = connStr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -406,8 +406,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<int> AddOperation(OperationInfo operation, List<string> properties)
|
public async Task<int> AddOperation(OperationInfo operation, List<string> properties)
|
||||||
{
|
{
|
||||||
@ -602,7 +601,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
var trans = conn.BeginTransaction();
|
var trans = conn.BeginTransaction();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var updateQuery = GenerateUpdateQueryOtherTable(properties, "device");
|
var updateQuery = GenerateUpdateQueryWithCustomTable(properties, "device");
|
||||||
await conn.ExecuteAsync(updateQuery.ToString(), DeviceInfo, trans);
|
await conn.ExecuteAsync(updateQuery.ToString(), DeviceInfo, trans);
|
||||||
trans.Commit();
|
trans.Commit();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user