入库替换规则
_debugProvider.DoSql<object>(pfParams, new { Sql = sql, Param = param });
var rows = 0;
foreach (var group in lstGroupV)
{
//把表表名进行重新替换
StringBuilder sbSql = new StringBuilder(sql);
foreach (var repChar in shredConfig.RepChars.OrderBy(temp=>temp.SortId))
{
sbSql.Replace(repChar.Key, repChar.Value).Replace("_@sufifx", $"_{group.Key}");
}
rows = rows + _dbInvoker.ExecuteInvoker(pfParams, connection, sbSql.ToString(), param, transaction, commandType: CommandType.Text, commandSource: CommandSource.Sql);
}
文档更新时间: 2021-09-14 22:17 作者:admin