|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
+using DotNetCore.CAP;
|
|
|
using Hotline.Application.CallCenter.Calls;
|
|
|
using Hotline.Application.Tels;
|
|
|
using Hotline.Caching.Interfaces;
|
|
@@ -14,6 +15,7 @@ using Hotline.Share.Dtos;
|
|
|
using Hotline.Share.Dtos.CallCenter;
|
|
|
using Hotline.Share.Dtos.TrCallCenter;
|
|
|
using Hotline.Share.Enums.CallCenter;
|
|
|
+using Hotline.Share.Mq;
|
|
|
using MapsterMapper;
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
using XF.Domain.Authentications;
|
|
@@ -30,6 +32,8 @@ namespace Hotline.Application.CallCenter
|
|
|
private readonly ITelApplication _telApplication;
|
|
|
private readonly ISystemSettingCacheManager _systemSettingCacheManager;
|
|
|
private readonly IMapper _mapper;
|
|
|
+ private readonly ICapPublisher _capPublisher;
|
|
|
+
|
|
|
|
|
|
public TianRunCallApplication(
|
|
|
ISessionContext sessionContext,
|
|
@@ -38,7 +42,8 @@ namespace Hotline.Application.CallCenter
|
|
|
ITelApplication telApplication,
|
|
|
ISystemSettingCacheManager systemSettingCacheManager,
|
|
|
IMapper mapper
|
|
|
- )
|
|
|
+,
|
|
|
+ ICapPublisher capPublisher)
|
|
|
{
|
|
|
_sessionContext = sessionContext;
|
|
|
_trCallRecordRepository = trCallRecordRepository;
|
|
@@ -46,6 +51,7 @@ namespace Hotline.Application.CallCenter
|
|
|
_telApplication = telApplication;
|
|
|
_systemSettingCacheManager = systemSettingCacheManager;
|
|
|
_mapper = mapper;
|
|
|
+ _capPublisher = capPublisher;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -154,7 +160,8 @@ namespace Hotline.Application.CallCenter
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
-
|
|
|
+ //如果没查到通话记录就在2分钟后处理
|
|
|
+ _capPublisher.PublishDelay(DateTime.Now.AddMinutes(2)-DateTime.Now,EventNames.OrderRelateCall, orderId);
|
|
|
}
|
|
|
}
|
|
|
|