diff --git a/src/Oms.Application/Services/Orders/Batch/OrderBatchActionExecutor.cs b/src/Oms.Application/Services/Orders/Batch/OrderBatchActionExecutor.cs index a88f537..913cd7a 100644 --- a/src/Oms.Application/Services/Orders/Batch/OrderBatchActionExecutor.cs +++ b/src/Oms.Application/Services/Orders/Batch/OrderBatchActionExecutor.cs @@ -1,5 +1,6 @@ using Fake.Application; using Fake.DependencyInjection; +using Fake.ObjectStorage; using Newtonsoft.Json; using Oms.Application.Dtos.Orders; using Oms.Application.Integrations.Itfx; @@ -19,7 +20,7 @@ public sealed class OrderBatchActionExecutor( IOrderRepository orderRepository, ICountryRepository countryRepository, IServiceChannelRepository serviceChannelRepository, - IFileStorage fileStorage, + IObjectStorage fileStorage, ISmallBagTrackOrderClient smallBagTrackOrderClient, ISmallBagTrackUpsertRequestBuilder smallBagTrackUpsertRequestBuilder, OrderDownstreamCredentialResolver downstreamCredentialResolver, diff --git a/src/Oms.Application/Services/Orders/Batch/OrderBatchJobCoordinator.cs b/src/Oms.Application/Services/Orders/Batch/OrderBatchJobCoordinator.cs index fed05fe..b73fa91 100644 --- a/src/Oms.Application/Services/Orders/Batch/OrderBatchJobCoordinator.cs +++ b/src/Oms.Application/Services/Orders/Batch/OrderBatchJobCoordinator.cs @@ -7,6 +7,7 @@ using Oms.Application.Dtos.Orders; using Oms.Application.Dtos.Shared; using Oms.Application.Integrations.SmallBagTrack; using Oms.Application.Messaging; +using Fake.ObjectStorage; using Oms.Application.Shared; using Oms.Application.Storage; using Oms.Domain.ChannelsAggregate.Repositories; @@ -26,7 +27,7 @@ public sealed class OrderBatchJobCoordinator( IOrderRepository orderRepository, ICountryRepository countryRepository, IServiceChannelRepository serviceChannelRepository, - IFileStorage fileStorage, + IObjectStorage fileStorage, IOrderBatchJobPublisher publisher, OrderBatchJobProcessor batchJobProcessor, IOptions batchOptions, diff --git a/src/Oms.Application/Services/Orders/OrderService.OrderEdit.cs b/src/Oms.Application/Services/Orders/OrderService.OrderEdit.cs index 57aec08..616c9f0 100644 --- a/src/Oms.Application/Services/Orders/OrderService.OrderEdit.cs +++ b/src/Oms.Application/Services/Orders/OrderService.OrderEdit.cs @@ -5,6 +5,7 @@ using Oms.Application.Dtos.Channels; using Oms.Application.Dtos.Orders; using Oms.Application.Dtos.Shared; using Oms.Application.Shared; +using Oms.Application.Storage; using Oms.Domain.ChannelsAggregate.Consts; using Oms.Domain.ChannelsAggregate.Entities; using Oms.Domain.ChannelsAggregate.Repositories; @@ -1129,7 +1130,7 @@ public partial class OrderService ImHsCode = x.ImHsCode, ExHsCode = x.ExHsCode ?? x.ImHsCode, DeclareElement = x.DeclareElement, - SkuImage = FileStorage.ToStorageKey(x.SkuImage), + SkuImage = OmsObjectStorageExtensions.ToStorageKey(x.SkuImage), Category = x.Category, Brand = x.Brand, BrandType = x.BrandType, diff --git a/src/Oms.Application/Services/Orders/OrderService.ParcelBilling.cs b/src/Oms.Application/Services/Orders/OrderService.ParcelBilling.cs index 0ef8833..1217f92 100644 --- a/src/Oms.Application/Services/Orders/OrderService.ParcelBilling.cs +++ b/src/Oms.Application/Services/Orders/OrderService.ParcelBilling.cs @@ -10,6 +10,7 @@ using Oms.Application.Integrations.SmallBagTrack; using Oms.Application.Labeling; using Oms.Application.Messaging; using Oms.Application.Shared; +using Oms.Application.Storage; using Oms.Application.Services.Orders.Batch; using Oms.Application.Services.Orders.Issues; using Oms.Domain.ChannelsAggregate.Consts; @@ -2013,7 +2014,7 @@ public partial class OrderService ImHsCode = x.ImHsCode, ExHsCode = x.ExHsCode, DeclareElement = x.DeclareElement, - SkuImage = FileStorage.ToStorageKey(x.SkuImage), + SkuImage = OmsObjectStorageExtensions.ToStorageKey(x.SkuImage), Category = x.Category, Brand = x.Brand, BrandType = x.BrandType, diff --git a/src/Oms.Application/Shared/OrderDownstreamCreateOneBodyBuilder.cs b/src/Oms.Application/Shared/OrderDownstreamCreateOneBodyBuilder.cs index 22bdf36..9908371 100644 --- a/src/Oms.Application/Shared/OrderDownstreamCreateOneBodyBuilder.cs +++ b/src/Oms.Application/Shared/OrderDownstreamCreateOneBodyBuilder.cs @@ -1,3 +1,4 @@ +using Fake.ObjectStorage; using Oms.Application.Dtos.Orders; using Oms.Application.Storage; using Oms.Domain.ChannelsAggregate.Repositories; @@ -20,7 +21,7 @@ public static class OrderDownstreamCreateOneBodyBuilder IReadOnlyList weights, ICountryRepository countryRepository, IServiceChannelRepository serviceChannelRepository, - IFileStorage? fileStorage = null, + IObjectStorage? fileStorage = null, CancellationToken cancellationToken = default) { var countryIds = new List(); @@ -185,7 +186,7 @@ public static class OrderDownstreamCreateOneBodyBuilder }; } - private static OrderParcelItemInput MapItem(OrderDeclaration x, IFileStorage? fileStorage) => + private static OrderParcelItemInput MapItem(OrderDeclaration x, IObjectStorage? fileStorage) => new() { CnName = x.CnName, diff --git a/src/Oms.Tests/OrderBatchJobCoordinatorGovernanceTests.cs b/src/Oms.Tests/OrderBatchJobCoordinatorGovernanceTests.cs index 444ade9..37ecb2f 100644 --- a/src/Oms.Tests/OrderBatchJobCoordinatorGovernanceTests.cs +++ b/src/Oms.Tests/OrderBatchJobCoordinatorGovernanceTests.cs @@ -1,12 +1,12 @@ using FluentAssertions; using Fake.Application; +using Fake.ObjectStorage; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Moq; using Oms.Application.Dtos.Orders; using Oms.Application.Messaging; using Oms.Application.Services.Orders.Batch; -using Oms.Application.Storage; using Oms.Domain.ChannelsAggregate.Repositories; using Oms.Domain.OrdersAggregate.Consts; using Oms.Domain.OrdersAggregate.Entities; @@ -21,7 +21,7 @@ public class OrderBatchJobCoordinatorGovernanceTests private readonly Mock _orderRepository = new(MockBehavior.Loose); private readonly Mock _countryRepository = new(MockBehavior.Loose); private readonly Mock _serviceChannelRepository = new(MockBehavior.Loose); - private readonly Mock _fileStorage = new(MockBehavior.Loose); + private readonly Mock _fileStorage = new(MockBehavior.Loose); private readonly Mock _publisher = new(MockBehavior.Strict); private readonly OrderBatchJobCoordinator _coordinator;