fix 结果过滤

This commit is contained in:
2024-03-24 21:48:20 +08:00
parent f76d9212bc
commit 9cd35d4277
2 changed files with 2 additions and 4 deletions

View File

@@ -37,7 +37,8 @@ public class TenantsController : ControllerBase
[HttpGet("list")]
public async Task<List<TenantResponse>> GetListAsync()
{
return await _tenantService.GetListAsync();
var tenants = await _tenantService.GetListAsync();
return tenants.Where(x => x.Code == "2401").ToList();
}
/// <summary>

View File

@@ -30,10 +30,7 @@ public class TenantService : ITenantService
public async Task<List<TenantResponse>> GetListAsync()
{
//todo 临时写死
return await _dbContext.Queryable<TenantEntity>()
.Where(x => !string.IsNullOrEmpty(x.PCode))
.Where(x => x.Code == "2401")
.Select<TenantResponse>()
.ToListAsync();
}