首页 > 其他分享 >abp remote

abp remote

时间:2022-09-23 09:35:54浏览次数:45  
标签:nodeAction remote 项目 tenantId abp LogInformation logger hospitalPushSetting

最近有个项目在跨项目使用接口调用的时候,一直尝试都不通,整合了之前的方法

A项目调用方

var template = await _hospitalPushSettingAppService.GetHospitalPushSettingByActionAsync(eventData.TenantId, "4").ConfigureAwait(false);

B项目远程项目

public async Task<HospitalPushSettingDto> GetHospitalPushSettingByActionAsync(Guid tenantId, string nodeAction)
        {
            using (_dataFilter.Disable<IMultiTenant>())
            {
                _logger.LogInformation("tenantId:" + tenantId);
                _logger.LogInformation("nodeAction:" + nodeAction);

                var hospitalPushSetting = await _hospitalPushSettings.Where(x => x.TenantId == tenantId && x.Action.Equals(nodeAction)).FirstOrDefaultAsync();
                _logger.LogInformation("hospitalPushSetting:" + hospitalPushSetting);
                return ObjectMapper.Map<HospitalPushSettings, HospitalPushSettingDto>(hospitalPushSetting);
            }
}

起初上面的方式一直返回的结果都是null;

标签:nodeAction,remote,项目,tenantId,abp,LogInformation,logger,hospitalPushSetting
From: https://www.cnblogs.com/drivertobolin/p/16721580.html

相关文章