Merge branch 'abp-dev' of https://gitee.com/ccnetcore/Yi into abp-dev

This commit is contained in:
陈淳
2024-03-08 11:00:17 +08:00
3 changed files with 4 additions and 4 deletions

View File

@@ -102,7 +102,7 @@ namespace Yi.Framework.SqlSugarCore
}
if (IsMultiTenantFilterEnabled)
{
sqlSugarClient.QueryFilter.AddTableFilter<IMultiTenant>(u => u.TenantId == GuidGenerator.Create());
sqlSugarClient.QueryFilter.AddTableFilter<IMultiTenant>(u => u.TenantId == CurrentTenant.Id);
}
CustomDataFilter(sqlSugarClient);
}

View File

@@ -20,7 +20,7 @@ namespace Yi.Framework.SqlSugarCore.Uow
public async Task CommitAsync(CancellationToken cancellationToken = default)
{
// await _sqlsugarDbContext.SqlSugarClient.Ado.CommitTranAsync();
await _sqlsugarDbContext.SqlSugarClient.Ado.CommitTranAsync();
}
public void Dispose()
@@ -29,7 +29,7 @@ namespace Yi.Framework.SqlSugarCore.Uow
public async Task RollbackAsync(CancellationToken cancellationToken = default)
{
// await _sqlsugarDbContext.SqlSugarClient.Ado.RollbackTranAsync();
await _sqlsugarDbContext.SqlSugarClient.Ado.RollbackTranAsync();
}
}
}

View File

@@ -127,7 +127,7 @@ namespace Yi.Framework.SqlSugarCore.Uow
);
unitOfWork.AddTransactionApi(transactionApiKey, transaction);
// await dbContext.SqlSugarClient.Ado.BeginTranAsync();
await dbContext.SqlSugarClient.Ado.BeginTranAsync();
return dbContext;
}
else