目标数据库增加配置
This commit is contained in:
@@ -204,6 +204,14 @@ async Task RunProgram()
|
||||
//数据修改
|
||||
options.RecordModify = (record) =>
|
||||
{
|
||||
if (record.TableName == "order_block_plan")
|
||||
{
|
||||
if (record.TryGetField("OrderNos", out var nos))
|
||||
{
|
||||
if (nos.Length <= 2) record.SetField("OrderNos", "\"[]\"");
|
||||
}
|
||||
|
||||
}
|
||||
if (record.TableName == "order_process")//修改order_process.NextStepID的默认值为0
|
||||
{
|
||||
|
||||
@@ -453,14 +461,22 @@ async Task RunProgram()
|
||||
});
|
||||
host.Services.Configure<DatabaseOutputOptions>(options =>
|
||||
{
|
||||
options.ConnectionString = new MySqlConnectionStringBuilder
|
||||
//options.ConnectionString = new MySqlConnectionStringBuilder
|
||||
//{
|
||||
// Server = "127.0.0.1",
|
||||
// Port = 33309,
|
||||
// Database = "cferp_test",
|
||||
// UserID = "root",
|
||||
// Password = "123456",
|
||||
// MaximumPoolSize = 50, // 这个值应当小于 max_connections
|
||||
//}.ConnectionString;
|
||||
options.ConnectionString = new MySqlConnectionStringBuilder(host.Configuration.GetConnectionString("MySqlMaster"))
|
||||
{
|
||||
Server = "127.0.0.1",
|
||||
Port = 33309,
|
||||
Database = "cferp_test",
|
||||
UserID = "root",
|
||||
Password = "123456",
|
||||
MaximumPoolSize = 50, // 这个值应当小于 max_connections
|
||||
CharacterSet = "utf8",
|
||||
AllowUserVariables = true,
|
||||
IgnoreCommandTransaction = true,
|
||||
TreatTinyAsBoolean = false,
|
||||
MaximumPoolSize = 50
|
||||
}.ConnectionString;
|
||||
options.TaskCount = commandOptions.TaskCount;
|
||||
options.FlushCount = commandOptions.FlushCount;
|
||||
|
Reference in New Issue
Block a user