refactor 优化代码
This commit is contained in:
@@ -246,8 +246,8 @@ public class DeviceService : IDeviceService
|
||||
var factory = device.TenantId;
|
||||
try
|
||||
{
|
||||
var tenantResult = await _tenantApi.GetTenantByCodeAsync(device.TenantId);
|
||||
factory = tenantResult?.Data?.Name ?? string.Empty;
|
||||
var tenant = await _tenantApi.GetTenantByCodeAsync(device.TenantId);
|
||||
factory = tenant?.Name ?? string.Empty;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user