fix 移除tenantId筛选

This commit is contained in:
2024-04-11 13:17:02 +08:00
parent 03c49b5e9f
commit 1d1a241ad4
2 changed files with 10 additions and 3 deletions

View File

@@ -62,6 +62,7 @@ public class GainfosController : ControllerBase
/// </summary>
/// <returns></returns>
[HttpGet("current")]
[IgnoreTenant]
public async Task<GainfoCurrentResponse> CurrentUserInfoAsync()
{
return await _gainfoService.CurrentUserInfoAsync();

View File

@@ -212,10 +212,16 @@ public class GainfoService : IGainfoService
if (info != null)
{
var tenantResult = await _tenantApi.GetTenantByCodeAsync(info.Factory);
if (tenantResult != null && tenantResult.Data != null)
try
{
var tenantResult = await _tenantApi.GetTenantByCodeAsync(info.Factory);
if (tenantResult != null && tenantResult.Data != null)
{
info.Factory = tenantResult.Data.Name;
}
}
catch (Exception)
{
info.Factory = tenantResult.Data.Name;
}
}