using Furion;
using Furion.EventBus;
using Furion.Logging;
using Myshipping.Application.Service.BookingOrder.Dto;
using Myshipping.Core;
namespace Myshipping.Application.Helper
{
public static class CustomerBookingSyncHelper
{
///
/// 推送订舱数据到客户订舱系统
///
///
///
public async static void SendCustomerBookingSync(long id, string syncType = null)
{
Log.Information($"发送推送订舱数据到客户订舱系统事件:{id}");
var evtPub = App.GetService();
var param = new
{
Id = id,
SyncType = syncType
};
await evtPub.PublishAsync(new ChannelEventSource("SendToCustomer:Book", param));
}
///
/// 推送货物状态到客户订舱系统
///
public async static void SyncBookingGoodsStatus(GoodsStatusSyncDto dto)
{
Log.Information($"推送货物状态到客户订舱系统:{dto.ToJsonString()}");
var evtPub = App.GetService();
await evtPub.PublishAsync(new ChannelEventSource("SyncGoodStatus:Book", dto));
}
}
}