fix: 禁止账单跨租户查询

This commit is contained in:
root
2026-01-29 14:51:56 +00:00
parent 1622c38043
commit a0b77d4847
11 changed files with 61 additions and 27 deletions

View File

@@ -151,7 +151,7 @@ public sealed class TenantBillingRepository(TakeoutAppDbContext context) : ITena
return Array.Empty<TenantBillingStatement>();
}
// 1. 忽略全局过滤器以支持管理员端跨租户导出/批量操作
// 1. 忽略全局过滤器以支持系统任务跨租户导出/批量操作
return await context.TenantBillingStatements
.IgnoreQueryFilters()
.AsNoTracking()
@@ -192,7 +192,7 @@ public sealed class TenantBillingRepository(TakeoutAppDbContext context) : ITena
int pageSize,
CancellationToken cancellationToken = default)
{
// 1. 构建基础查询(管理员端跨租户查询,忽略过滤器)
// 1. 构建基础查询(系统任务跨租户查询,忽略过滤器)
var query = context.TenantBillingStatements
.IgnoreQueryFilters()
.AsNoTracking()