fix 结果过滤
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user