|
@@ -615,21 +615,19 @@ namespace Hotline.Api.Controllers
|
|
}
|
|
}
|
|
await _trCallRecordRepository.AddAsync(model, HttpContext.RequestAborted);
|
|
await _trCallRecordRepository.AddAsync(model, HttpContext.RequestAborted);
|
|
|
|
|
|
- if (model.CallDirection == ECallDirection.In)
|
|
|
|
|
|
+
|
|
|
|
+ var publishCallRecordDto = new PublishCallRecrodDto() { };
|
|
|
|
+ if (order != null)
|
|
{
|
|
{
|
|
- var publishCallRecordDto = new PublishCallRecrodDto() { };
|
|
|
|
- if (order != null)
|
|
|
|
- {
|
|
|
|
- var orderDto = _mapper.Map<OrderDto>(order);
|
|
|
|
- publishCallRecordDto.Order = orderDto;
|
|
|
|
- }
|
|
|
|
- var trCallDto = _mapper.Map<TrCallDto>(model);
|
|
|
|
- publishCallRecordDto.TrCallRecordDto = trCallDto;
|
|
|
|
- if (string.IsNullOrEmpty(model.AgentTransferNumber))
|
|
|
|
- {
|
|
|
|
- //推省上
|
|
|
|
- await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineCallBye, publishCallRecordDto);
|
|
|
|
- }
|
|
|
|
|
|
+ var orderDto = _mapper.Map<OrderDto>(order);
|
|
|
|
+ publishCallRecordDto.Order = orderDto;
|
|
|
|
+ }
|
|
|
|
+ var trCallDto = _mapper.Map<TrCallDto>(model);
|
|
|
|
+ publishCallRecordDto.TrCallRecordDto = trCallDto;
|
|
|
|
+ if (string.IsNullOrEmpty(model.AgentTransferNumber))
|
|
|
|
+ {
|
|
|
|
+ //推省上
|
|
|
|
+ await _capPublisher.PublishAsync(Hotline.Share.Mq.EventNames.HotlineCallBye, publishCallRecordDto);
|
|
}
|
|
}
|
|
|
|
|
|
return OpenResponse.Ok("success");
|
|
return OpenResponse.Ok("success");
|