|
@@ -7,6 +7,7 @@ using Google.Protobuf.WellKnownTypes;
|
|
|
using Hotline.Ai.Visit;
|
|
|
using Hotline.Application.ExportExcel;
|
|
|
using Hotline.CallCenter.BlackLists;
|
|
|
+using Hotline.CallCenter.Calls;
|
|
|
using Hotline.CallCenter.Devices;
|
|
|
using Hotline.CallCenter.Ivrs;
|
|
|
using Hotline.FlowEngine.WorkflowModules;
|
|
@@ -336,4 +337,21 @@ public class TestController : BaseController
|
|
|
var publicKey = keyList[1];
|
|
|
return $"{publicKey} \r\n {privateKey}";
|
|
|
}
|
|
|
+
|
|
|
+ [HttpGet("dl")]
|
|
|
+ [AllowAnonymous]
|
|
|
+ public async Task F([FromServices] IRepository<TrCallRecord> callRepository)
|
|
|
+ {
|
|
|
+ var calls = await callRepository.Queryable()
|
|
|
+ .Where(d=> !string.IsNullOrEmpty( d.RecordingFileUrl))
|
|
|
+ .ToListAsync(HttpContext.RequestAborted);
|
|
|
+ foreach (var call in calls)
|
|
|
+ {
|
|
|
+ var uri = new Uri(call.RecordingFileUrl);
|
|
|
+ call.RecordingBaseAddress = $"{uri.Scheme}://{uri.Host}:{uri.Port}";
|
|
|
+ call.RecordingAbsolutePath = uri.AbsolutePath;
|
|
|
+ }
|
|
|
+
|
|
|
+ await callRepository.UpdateRangeAsync(calls, HttpContext.RequestAborted);
|
|
|
+ }
|
|
|
}
|