Kaynağa Gözat

增加对 CallId 为空的判断以优化 CallCenterType 检查

在 QualityApplication.cs 中,修改了 Hotline.Application.Quality 命名空间下的逻辑:
- 在检查 CallCenterType 是否为 TianRun 时,增加了对 order.CallId 是否为空的判断。
- 在检查 CallCenterType 是否为 XingTang 时,增加了对 order.CallId 是否为空的判断。
确保只有在 order.CallId 不为空时才会执行相应的逻辑。
田爽 2 hafta önce
ebeveyn
işleme
20fe7036a9

+ 2 - 2
src/Hotline.Application/Quality/QualityApplication.cs

@@ -193,14 +193,14 @@ namespace Hotline.Application.Quality
                     var audioFile = string.Empty;
                     var fromNo = string.Empty;
                     DateTime? callStartTime = null;
-                    if (_appOptions.Value.GetDefaultAppScopeConfiguration().CallCenterType == AppDefaults.CallCenterType.TianRun)
+                    if (_appOptions.Value.GetDefaultAppScopeConfiguration().CallCenterType == AppDefaults.CallCenterType.TianRun && !string.IsNullOrEmpty(order.CallId))
                     {
                         var call = await _callApplication.GetTianrunCallAsync(order.CallId, cancellationToken);
                         audioFile = call.RecordingAbsolutePath;
                         fromNo = call.CPN;
                         callStartTime = call.CreatedTime;
                     }
-                    else if (_appOptions.Value.GetDefaultAppScopeConfiguration().CallCenterType == AppDefaults.CallCenterType.XingTang)
+                    else if (_appOptions.Value.GetDefaultAppScopeConfiguration().CallCenterType == AppDefaults.CallCenterType.XingTang && !string.IsNullOrEmpty(order.CallId))
                     {
                         var call = await _callApplication.GetCallAsync(order.CallId, cancellationToken);
                         audioFile = call.AudioFile;