Преглед изворни кода

Merge branch 'test' of http://110.188.24.182:10023/Fengwo/hotline into test
合并冲突

guqiang пре 2 недеља
родитељ
комит
fd71d3efcf

+ 20 - 1
src/Hotline.Api/Controllers/IPPbxController.cs

@@ -73,6 +73,7 @@ namespace Hotline.Api.Controllers
         private readonly ICallTelClient _callTelClient;
         private readonly IRepository<TelOperation> _telOperationRepository;
         private readonly IOptionsSnapshot<AppConfiguration> _appOptions;
+        private readonly IRepository<VoiceEvaluationButton> _voiceEvaluationButtonRepository;
 
         public IPPbxController(IMapper mapper, IUserDomainService userDomainService,
             ISessionContext sessionContext, IRepository<TrCallRecord> trCallRecordRepository,
@@ -92,7 +93,8 @@ namespace Hotline.Api.Controllers
             IIPPbxApplication iPPbxApplication,
             ICallTelClient callTelClient,
             IRepository<TelOperation> telOperationRepository,
-           IOptionsSnapshot<AppConfiguration> appOptions)
+           IOptionsSnapshot<AppConfiguration> appOptions,
+           IRepository<VoiceEvaluationButton> voiceEvaluationButtonRepository)
         {
             _mapper = mapper;
             _userDomainService = userDomainService;
@@ -122,6 +124,7 @@ namespace Hotline.Api.Controllers
             _callTelClient = callTelClient;
             _telOperationRepository = telOperationRepository;
             _appOptions = appOptions;
+            _voiceEvaluationButtonRepository = voiceEvaluationButtonRepository;
         }
 
         #region 添添呼
@@ -692,6 +695,22 @@ namespace Hotline.Api.Controllers
 
         }
 
+        /// <summary>
+        /// 兴唐语音评价接口
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [AllowAnonymous]
+        [StaffNoSessionContextFilter()]
+        [HttpPost("voiceevaluation/button")]
+        [LogFilterAlpha("兴唐语音评价通知")]
+        public async Task VoiceEvaluationButton(VoiceEvaluationButtonDto dto)
+        {
+            var data = _mapper.Map<VoiceEvaluationButton>(dto);
+            await _voiceEvaluationButtonRepository.AddAsync(data, HttpContext.RequestAborted);
+
+        }
+
         #endregion
 
         #region 通话记录(对内)

+ 36 - 0
src/Hotline.Share/Dtos/CallCenter/VoiceEvaluationButtonDto.cs

@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Hotline.Share.Dtos.CallCenter
+{
+    public class VoiceEvaluationButtonDto
+    {
+        /// <summary>
+        /// 应用ID
+        /// </summary>
+        public string? AppId { get; set; }
+
+        /// <summary>
+        /// 应用密钥
+        /// </summary>
+        public string? AppSecret { get; set; }
+
+        /// <summary>
+        /// 用户标识,我们传过去的
+        /// </summary>
+        public string? CustomerId { get; set; }
+
+        /// <summary>
+        /// 用户电话号码
+        /// </summary>
+        public string? Called { get; set; }
+
+        /// <summary>
+        /// 按键内容
+        /// </summary>
+        public string? Content { get; set; }
+    }
+}

+ 23 - 0
src/Hotline/CallCenter/Calls/VoiceEvaluationButton.cs

@@ -0,0 +1,23 @@
+using XF.Domain.Repository;
+
+namespace Hotline.CallCenter.Calls
+{
+    public class VoiceEvaluationButton : CreationEntity
+    {
+        /// <summary>
+        /// 用户标识,我们传过去的
+        /// </summary>
+        public string? CustomerId { get; set; }
+
+        /// <summary>
+        /// 用户电话号码
+        /// </summary>
+        public string? Called { get; set; }
+
+        /// <summary>
+        /// 按键内容
+        /// </summary>
+        public string? Content { get; set; }
+
+    }
+}