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.Application;
|
||||||
using Fake.DependencyInjection;
|
using Fake.DependencyInjection;
|
||||||
|
using Fake.ObjectStorage;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Oms.Application.Dtos.Orders;
|
using Oms.Application.Dtos.Orders;
|
||||||
using Oms.Application.Integrations.Itfx;
|
using Oms.Application.Integrations.Itfx;
|
||||||
@ -19,7 +20,7 @@ public sealed class OrderBatchActionExecutor(
|
|||||||
IOrderRepository orderRepository,
|
IOrderRepository orderRepository,
|
||||||
ICountryRepository countryRepository,
|
ICountryRepository countryRepository,
|
||||||
IServiceChannelRepository serviceChannelRepository,
|
IServiceChannelRepository serviceChannelRepository,
|
||||||
IFileStorage fileStorage,
|
IObjectStorage fileStorage,
|
||||||
ISmallBagTrackOrderClient smallBagTrackOrderClient,
|
ISmallBagTrackOrderClient smallBagTrackOrderClient,
|
||||||
ISmallBagTrackUpsertRequestBuilder smallBagTrackUpsertRequestBuilder,
|
ISmallBagTrackUpsertRequestBuilder smallBagTrackUpsertRequestBuilder,
|
||||||
OrderDownstreamCredentialResolver downstreamCredentialResolver,
|
OrderDownstreamCredentialResolver downstreamCredentialResolver,
|
||||||
|
|||||||
@ -7,6 +7,7 @@ using Oms.Application.Dtos.Orders;
|
|||||||
using Oms.Application.Dtos.Shared;
|
using Oms.Application.Dtos.Shared;
|
||||||
using Oms.Application.Integrations.SmallBagTrack;
|
using Oms.Application.Integrations.SmallBagTrack;
|
||||||
using Oms.Application.Messaging;
|
using Oms.Application.Messaging;
|
||||||
|
using Fake.ObjectStorage;
|
||||||
using Oms.Application.Shared;
|
using Oms.Application.Shared;
|
||||||
using Oms.Application.Storage;
|
using Oms.Application.Storage;
|
||||||
using Oms.Domain.ChannelsAggregate.Repositories;
|
using Oms.Domain.ChannelsAggregate.Repositories;
|
||||||
@ -26,7 +27,7 @@ public sealed class OrderBatchJobCoordinator(
|
|||||||
IOrderRepository orderRepository,
|
IOrderRepository orderRepository,
|
||||||
ICountryRepository countryRepository,
|
ICountryRepository countryRepository,
|
||||||
IServiceChannelRepository serviceChannelRepository,
|
IServiceChannelRepository serviceChannelRepository,
|
||||||
IFileStorage fileStorage,
|
IObjectStorage fileStorage,
|
||||||
IOrderBatchJobPublisher publisher,
|
IOrderBatchJobPublisher publisher,
|
||||||
OrderBatchJobProcessor batchJobProcessor,
|
OrderBatchJobProcessor batchJobProcessor,
|
||||||
IOptions<OrderBatchRabbitMqOptions> batchOptions,
|
IOptions<OrderBatchRabbitMqOptions> batchOptions,
|
||||||
|
|||||||
@ -5,6 +5,7 @@ using Oms.Application.Dtos.Channels;
|
|||||||
using Oms.Application.Dtos.Orders;
|
using Oms.Application.Dtos.Orders;
|
||||||
using Oms.Application.Dtos.Shared;
|
using Oms.Application.Dtos.Shared;
|
||||||
using Oms.Application.Shared;
|
using Oms.Application.Shared;
|
||||||
|
using Oms.Application.Storage;
|
||||||
using Oms.Domain.ChannelsAggregate.Consts;
|
using Oms.Domain.ChannelsAggregate.Consts;
|
||||||
using Oms.Domain.ChannelsAggregate.Entities;
|
using Oms.Domain.ChannelsAggregate.Entities;
|
||||||
using Oms.Domain.ChannelsAggregate.Repositories;
|
using Oms.Domain.ChannelsAggregate.Repositories;
|
||||||
@ -1129,7 +1130,7 @@ public partial class OrderService
|
|||||||
ImHsCode = x.ImHsCode,
|
ImHsCode = x.ImHsCode,
|
||||||
ExHsCode = x.ExHsCode ?? x.ImHsCode,
|
ExHsCode = x.ExHsCode ?? x.ImHsCode,
|
||||||
DeclareElement = x.DeclareElement,
|
DeclareElement = x.DeclareElement,
|
||||||
SkuImage = FileStorage.ToStorageKey(x.SkuImage),
|
SkuImage = OmsObjectStorageExtensions.ToStorageKey(x.SkuImage),
|
||||||
Category = x.Category,
|
Category = x.Category,
|
||||||
Brand = x.Brand,
|
Brand = x.Brand,
|
||||||
BrandType = x.BrandType,
|
BrandType = x.BrandType,
|
||||||
|
|||||||
@ -10,6 +10,7 @@ using Oms.Application.Integrations.SmallBagTrack;
|
|||||||
using Oms.Application.Labeling;
|
using Oms.Application.Labeling;
|
||||||
using Oms.Application.Messaging;
|
using Oms.Application.Messaging;
|
||||||
using Oms.Application.Shared;
|
using Oms.Application.Shared;
|
||||||
|
using Oms.Application.Storage;
|
||||||
using Oms.Application.Services.Orders.Batch;
|
using Oms.Application.Services.Orders.Batch;
|
||||||
using Oms.Application.Services.Orders.Issues;
|
using Oms.Application.Services.Orders.Issues;
|
||||||
using Oms.Domain.ChannelsAggregate.Consts;
|
using Oms.Domain.ChannelsAggregate.Consts;
|
||||||
@ -2013,7 +2014,7 @@ public partial class OrderService
|
|||||||
ImHsCode = x.ImHsCode,
|
ImHsCode = x.ImHsCode,
|
||||||
ExHsCode = x.ExHsCode,
|
ExHsCode = x.ExHsCode,
|
||||||
DeclareElement = x.DeclareElement,
|
DeclareElement = x.DeclareElement,
|
||||||
SkuImage = FileStorage.ToStorageKey(x.SkuImage),
|
SkuImage = OmsObjectStorageExtensions.ToStorageKey(x.SkuImage),
|
||||||
Category = x.Category,
|
Category = x.Category,
|
||||||
Brand = x.Brand,
|
Brand = x.Brand,
|
||||||
BrandType = x.BrandType,
|
BrandType = x.BrandType,
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
using Fake.ObjectStorage;
|
||||||
using Oms.Application.Dtos.Orders;
|
using Oms.Application.Dtos.Orders;
|
||||||
using Oms.Application.Storage;
|
using Oms.Application.Storage;
|
||||||
using Oms.Domain.ChannelsAggregate.Repositories;
|
using Oms.Domain.ChannelsAggregate.Repositories;
|
||||||
@ -20,7 +21,7 @@ public static class OrderDownstreamCreateOneBodyBuilder
|
|||||||
IReadOnlyList<OrderWeight> weights,
|
IReadOnlyList<OrderWeight> weights,
|
||||||
ICountryRepository countryRepository,
|
ICountryRepository countryRepository,
|
||||||
IServiceChannelRepository serviceChannelRepository,
|
IServiceChannelRepository serviceChannelRepository,
|
||||||
IFileStorage? fileStorage = null,
|
IObjectStorage? fileStorage = null,
|
||||||
CancellationToken cancellationToken = default)
|
CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
var countryIds = new List<int>();
|
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()
|
new()
|
||||||
{
|
{
|
||||||
CnName = x.CnName,
|
CnName = x.CnName,
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Fake.Application;
|
using Fake.Application;
|
||||||
|
using Fake.ObjectStorage;
|
||||||
using Microsoft.Extensions.Logging.Abstractions;
|
using Microsoft.Extensions.Logging.Abstractions;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Moq;
|
using Moq;
|
||||||
using Oms.Application.Dtos.Orders;
|
using Oms.Application.Dtos.Orders;
|
||||||
using Oms.Application.Messaging;
|
using Oms.Application.Messaging;
|
||||||
using Oms.Application.Services.Orders.Batch;
|
using Oms.Application.Services.Orders.Batch;
|
||||||
using Oms.Application.Storage;
|
|
||||||
using Oms.Domain.ChannelsAggregate.Repositories;
|
using Oms.Domain.ChannelsAggregate.Repositories;
|
||||||
using Oms.Domain.OrdersAggregate.Consts;
|
using Oms.Domain.OrdersAggregate.Consts;
|
||||||
using Oms.Domain.OrdersAggregate.Entities;
|
using Oms.Domain.OrdersAggregate.Entities;
|
||||||
@ -21,7 +21,7 @@ public class OrderBatchJobCoordinatorGovernanceTests
|
|||||||
private readonly Mock<IOrderRepository> _orderRepository = new(MockBehavior.Loose);
|
private readonly Mock<IOrderRepository> _orderRepository = new(MockBehavior.Loose);
|
||||||
private readonly Mock<ICountryRepository> _countryRepository = new(MockBehavior.Loose);
|
private readonly Mock<ICountryRepository> _countryRepository = new(MockBehavior.Loose);
|
||||||
private readonly Mock<IServiceChannelRepository> _serviceChannelRepository = 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 Mock<IOrderBatchJobPublisher> _publisher = new(MockBehavior.Strict);
|
||||||
private readonly OrderBatchJobCoordinator _coordinator;
|
private readonly OrderBatchJobCoordinator _coordinator;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user