admin 2 年之前
父節點
當前提交
3b98de8c32
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      src/CallCenter.Api/Controllers/TestController.cs

+ 6 - 3
src/CallCenter.Api/Controllers/TestController.cs

@@ -1,5 +1,6 @@
 using CallCenter.Api.Realtimes;
 using CallCenter.BlackLists;
+using CallCenter.Caches;
 using CallCenter.Devices;
 using CallCenter.Ivrs;
 using CallCenter.Realtimes;
@@ -25,7 +26,7 @@ namespace CallCenter.Api.Controllers
         private readonly IRealtimeService _realtimeService;
         private readonly IBlacklistDomainService _blacklistDomainService;
         private readonly IIvrDomainService _ivrDomainService;
-
+        private readonly ICallCacheManager _callCacheManager;
         //private readonly ITypedCache<List<User>> _cache;
         //private readonly ICacheManager<User> _cache;
 
@@ -41,7 +42,8 @@ namespace CallCenter.Api.Controllers
             ITypedCache<User> cache,
             IRealtimeService realtimeService,
             IBlacklistDomainService blacklistDomainService,
-            IIvrDomainService ivrDomainService
+            IIvrDomainService ivrDomainService,
+            ICallCacheManager callCacheManager
             )
         {
             _logger = logger;
@@ -53,6 +55,7 @@ namespace CallCenter.Api.Controllers
             _realtimeService = realtimeService;
             _blacklistDomainService = blacklistDomainService;
             _ivrDomainService = ivrDomainService;
+            _callCacheManager = callCacheManager;
         }
 
         [HttpGet]
@@ -137,7 +140,7 @@ namespace CallCenter.Api.Controllers
         [HttpGet("callqueue")]
         public async Task CallQueueTest()
         {
-            await _realtimeService.CallQueueAsync(new List<string>(),HttpContext.RequestAborted);
+            await _realtimeService.CallQueueAsync(_callCacheManager.GetCallQueueList(),HttpContext.RequestAborted);
         }