fix: 合并 master 后改用 IObjectStorage,对齐 fake oss
All checks were successful
Build and Deploy / deploy (push) Successful in 1m3s
All checks were successful
Build and Deploy / deploy (push) Successful in 1m3s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
5648163958
commit
c9084ee5ca
@ -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,
|
||||
|
||||
@ -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<OrderBatchRabbitMqOptions> batchOptions,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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<OrderWeight> weights,
|
||||
ICountryRepository countryRepository,
|
||||
IServiceChannelRepository serviceChannelRepository,
|
||||
IFileStorage? fileStorage = null,
|
||||
IObjectStorage? fileStorage = null,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
var countryIds = new List<int>();
|
||||
@ -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,
|
||||
|
||||
@ -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<IOrderRepository> _orderRepository = new(MockBehavior.Loose);
|
||||
private readonly Mock<ICountryRepository> _countryRepository = new(MockBehavior.Loose);
|
||||
private readonly Mock<IServiceChannelRepository> _serviceChannelRepository = new(MockBehavior.Loose);
|
||||
private readonly Mock<IFileStorage> _fileStorage = new(MockBehavior.Loose);
|
||||
private readonly Mock<IObjectStorage> _fileStorage = new(MockBehavior.Loose);
|
||||
private readonly Mock<IOrderBatchJobPublisher> _publisher = new(MockBehavior.Strict);
|
||||
private readonly OrderBatchJobCoordinator _coordinator;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user