|
@@ -7,7 +7,6 @@ using Sharing.Application;
|
|
|
using Sharing.Notifications;
|
|
|
using Sharing.Orders;
|
|
|
using Sharing.Province.Dtos.XieTong.Send;
|
|
|
-using Sharing.Province.XieTong.Receive;
|
|
|
using Sharing.Province.XieTong.Send;
|
|
|
using Sharing.WebCore;
|
|
|
using System.Threading;
|
|
@@ -24,7 +23,6 @@ namespace Sharing.Api.Controllers
|
|
|
private readonly ILogger<HotlineMsgReceiver> _logger;
|
|
|
private readonly IMapper _mapper;
|
|
|
private readonly IGetCaseResultReceiveRepository _getCaseResultReceiveRepository;
|
|
|
- private readonly ISendCaseEvlResultRepository _sendCaseEvlResultRepository;
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
@@ -35,14 +33,13 @@ namespace Sharing.Api.Controllers
|
|
|
/// <param name="mapper"></param>
|
|
|
/// <param name="getCaseResultReceiveRepository"></param>
|
|
|
public HotlineMessageReceiveController(IDataOrderRepository dataOrderRepository, IMediator mediator, ILogger<HotlineMsgReceiver> logger, IMapper mapper
|
|
|
- , IGetCaseResultReceiveRepository getCaseResultReceiveRepository, ISendCaseEvlResultRepository sendCaseEvlResultRepository)
|
|
|
+ , IGetCaseResultReceiveRepository getCaseResultReceiveRepository)
|
|
|
{
|
|
|
_dataOrderRepository = dataOrderRepository;
|
|
|
_mediator = mediator;
|
|
|
_logger = logger;
|
|
|
_mapper = mapper;
|
|
|
_getCaseResultReceiveRepository = getCaseResultReceiveRepository;
|
|
|
- _sendCaseEvlResultRepository = sendCaseEvlResultRepository;
|
|
|
}
|
|
|
|
|
|
[NonAction]
|
|
@@ -53,7 +50,7 @@ namespace Sharing.Api.Controllers
|
|
|
// _logger.LogInformation("rec order");
|
|
|
// await _dataOrderRepository.AddAsync(new DataOrder(), HttpContext.RequestAborted);
|
|
|
|
|
|
- // await _mediator.Publish(new OrderCreatedNotification(new DataOrder()), HttpContext.RequestAborted);
|
|
|
+ await _mediator.Publish(new OrderCreatedNotification(new DataOrder()));
|
|
|
// _logger.LogInformation("publish order success!");
|
|
|
}
|
|
|
|
|
@@ -65,15 +62,15 @@ namespace Sharing.Api.Controllers
|
|
|
[NonAction]
|
|
|
//[CapSubscribe(Hotline.Share.Mq.EventNames.HotlineOrderCreated)]
|
|
|
[CapSubscribe("GetCaseResultReceive")]
|
|
|
- public async Task GetCaseResultReceive(SendCaseEvlResult dto)
|
|
|
+ public async Task GetCaseResultReceive(GetCaseResultReceiveInfo dto)
|
|
|
{
|
|
|
- // var data = _mapper.Map<GetCaseResultReceive>(dto);
|
|
|
+ var data = _mapper.Map<GetCaseResultReceive>(dto);
|
|
|
|
|
|
- ////将上报信息写入本地库
|
|
|
- await _sendCaseEvlResultRepository.AddAsync(dto, HttpContext.RequestAborted);
|
|
|
+ //将上报信息写入本地库
|
|
|
+ await _getCaseResultReceiveRepository.AddAsync(data);
|
|
|
|
|
|
- ////信息上报
|
|
|
- // await _mediator.Publish(new GetCaseResultReceiveNotification(dto), HttpContext.RequestAborted);
|
|
|
+ //信息上报
|
|
|
+ await _mediator.Publish(new GetCaseResultReceiveNotification(data));
|
|
|
|
|
|
}
|
|
|
}
|