|
@@ -14,6 +14,7 @@ using Hotline.Share.Dtos;
|
|
using Hotline.Share.Dtos.CallCenter;
|
|
using Hotline.Share.Dtos.CallCenter;
|
|
using Hotline.Share.Dtos.TrCallCenter;
|
|
using Hotline.Share.Dtos.TrCallCenter;
|
|
using Hotline.Share.Enums.CallCenter;
|
|
using Hotline.Share.Enums.CallCenter;
|
|
|
|
+using MapsterMapper;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Http;
|
|
using XF.Domain.Authentications;
|
|
using XF.Domain.Authentications;
|
|
using XF.Domain.Exceptions;
|
|
using XF.Domain.Exceptions;
|
|
@@ -28,13 +29,15 @@ namespace Hotline.Application.CallCenter
|
|
private readonly ITrApplication _trApplication;
|
|
private readonly ITrApplication _trApplication;
|
|
private readonly ITelApplication _telApplication;
|
|
private readonly ITelApplication _telApplication;
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
|
|
+ private readonly IMapper _mapper;
|
|
|
|
|
|
public TianRunCallApplication(
|
|
public TianRunCallApplication(
|
|
ISessionContext sessionContext,
|
|
ISessionContext sessionContext,
|
|
IRepository<TrCallRecord> trCallRecordRepository,
|
|
IRepository<TrCallRecord> trCallRecordRepository,
|
|
ITrApplication trApplication,
|
|
ITrApplication trApplication,
|
|
ITelApplication telApplication,
|
|
ITelApplication telApplication,
|
|
- ISystemSettingCacheManager systemSettingCacheManager
|
|
|
|
|
|
+ ISystemSettingCacheManager systemSettingCacheManager,
|
|
|
|
+ IMapper mapper
|
|
)
|
|
)
|
|
{
|
|
{
|
|
_sessionContext = sessionContext;
|
|
_sessionContext = sessionContext;
|
|
@@ -42,6 +45,7 @@ namespace Hotline.Application.CallCenter
|
|
_trApplication = trApplication;
|
|
_trApplication = trApplication;
|
|
_telApplication = telApplication;
|
|
_telApplication = telApplication;
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
|
|
+ _mapper = mapper;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -169,5 +173,15 @@ namespace Hotline.Application.CallCenter
|
|
{
|
|
{
|
|
throw new NotImplementedException();
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 查询通话记录
|
|
|
|
+ /// </summary>
|
|
|
|
+ public override async Task<CallNative?> GetCallAsync(string callId, CancellationToken cancellationToken)
|
|
|
|
+ {
|
|
|
|
+ var call = await _trCallRecordRepository.Queryable()
|
|
|
|
+ .FirstAsync(d => d.OtherAccept == callId, cancellationToken);
|
|
|
|
+ return _mapper.Map<CallNative>(call);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|