|
@@ -1,26 +1,21 @@
|
|
|
using DotNetCore.CAP;
|
|
|
using Hotline.Caching.Interfaces;
|
|
|
-using Hotline.Share.Dtos;
|
|
|
+using Hotline.CallCenter.Calls;
|
|
|
+using Hotline.Configurations;
|
|
|
+using Hotline.EventBus;
|
|
|
+using Hotline.Settings;
|
|
|
using Hotline.Share.Dtos.Order;
|
|
|
using Hotline.Share.Dtos.Push;
|
|
|
using Hotline.Share.Enums.Order;
|
|
|
using Hotline.Share.Tools;
|
|
|
using Mapster;
|
|
|
+using MediatR;
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
+using Microsoft.Extensions.Options;
|
|
|
+using System.Text.RegularExpressions;
|
|
|
using XF.Domain.Dependency;
|
|
|
using XF.Domain.Exceptions;
|
|
|
using XF.Domain.Repository;
|
|
|
-using Hotline.EventBus;
|
|
|
-using Hotline.Orders.Notifications;
|
|
|
-using Hotline.Configurations;
|
|
|
-using Microsoft.Extensions.Options;
|
|
|
-using Hotline.Settings;
|
|
|
-using System.Text.RegularExpressions;
|
|
|
-using System.Threading;
|
|
|
-using Hotline.Caching.Services;
|
|
|
-using Hotline.Push.Notifies;
|
|
|
-using Hotline.Share.Enums.Push;
|
|
|
-using MediatR;
|
|
|
|
|
|
namespace Hotline.Orders;
|
|
|
public class OrderVisitDomainService : IOrderVisitDomainService, IScopeDependency
|
|
@@ -67,6 +62,30 @@ public class OrderVisitDomainService : IOrderVisitDomainService, IScopeDependenc
|
|
|
_mediator = mediator;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 语音回访处理
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task UpdateVoiceReplyAsync(VoiceEvaluationButton dto)
|
|
|
+ {
|
|
|
+ var data = await _orderVisitRepository.GetAsync(p => p.Id == dto.CustomerId);
|
|
|
+ if (data != null)
|
|
|
+ {
|
|
|
+ var replyTxt = "智能电话回访不作评价";
|
|
|
+ if (dto.Content == "1")
|
|
|
+ replyTxt = "智能电话回访满意";
|
|
|
+ else if (dto.Content == "2")
|
|
|
+ replyTxt = "智能电话回访不满意";
|
|
|
+
|
|
|
+ await UpdateSmsReplyAsync(data, replyTxt);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _logRepository.Add("语音回访-不处理", dto, "未查询到回访数据", "UpdateVoiceReplyAsync", 0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 用户回访短信回复更新回访状态
|
|
|
/// </summary>
|