|
@@ -300,7 +300,7 @@ public static class SqlSugarSetup
|
|
|
Parameters = JSON.Serialize(u.Parameters),
|
|
Parameters = JSON.Serialize(u.Parameters),
|
|
|
Elapsed = u.Time == null ? 0 : (long)u.Time.Value.TotalMilliseconds
|
|
Elapsed = u.Time == null ? 0 : (long)u.Time.Value.TotalMilliseconds
|
|
|
};
|
|
};
|
|
|
- var logDb = ITenant.IsAnyConnection(SqlSugarConst.LogConfigId) ? ITenant.GetConnectionScope(SqlSugarConst.LogConfigId) : db;
|
|
|
|
|
|
|
+ var logDb = ITenant.IsAnyConnection(SqlSugarConst.LogConfigId) ? ITenant.GetConnectionScope(SqlSugarConst.LogConfigId) : ITenant.GetConnectionScope(SqlSugarConst.MainConfigId);
|
|
|
await logDb.CopyNew().Insertable(logDiff).ExecuteCommandAsync();
|
|
await logDb.CopyNew().Insertable(logDiff).ExecuteCommandAsync();
|
|
|
Console.ForegroundColor = ConsoleColor.Red;
|
|
Console.ForegroundColor = ConsoleColor.Red;
|
|
|
Console.WriteLine(DateTime.Now + $"\r\n*****开始差异日志*****\r\n{Environment.NewLine}{JSON.Serialize(logDiff)}{Environment.NewLine}*****结束差异日志*****\r\n");
|
|
Console.WriteLine(DateTime.Now + $"\r\n*****开始差异日志*****\r\n{Environment.NewLine}{JSON.Serialize(logDiff)}{Environment.NewLine}*****结束差异日志*****\r\n");
|