diff --git a/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs b/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs index 5c2561c4..14d4faa5 100644 --- a/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs +++ b/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/DaprActorsProductInventoryProvider.cs @@ -17,8 +17,6 @@ public class DaprActorsProductInventoryProvider : IProductInventoryProvider, ITr public string InventoryProviderName { get; } = DaprActorsProductInventoryProviderName; - public static string ActorType { get; set; } = "InventoryActor"; - private readonly ILogger _logger; protected IInventoryActorProvider InventoryActorProvider { get; } @@ -102,7 +100,7 @@ public class DaprActorsProductInventoryProvider : IProductInventoryProvider, ITr protected virtual async Task GetActorAsync(InventoryQueryModel model) { - return await InventoryActorProvider.GetAsync(GetActorId(model), ActorType); + return await InventoryActorProvider.GetAsync(GetActorId(model)); } protected virtual ActorId GetActorId(InventoryQueryModel model) diff --git a/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/IInventoryActorProvider.cs b/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/IInventoryActorProvider.cs index 8c0791fd..fc1dc827 100644 --- a/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/IInventoryActorProvider.cs +++ b/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/IInventoryActorProvider.cs @@ -1,11 +1,10 @@ using System.Threading.Tasks; using Dapr.Actors; using EasyAbp.EShop.Plugins.Inventories.DaprActors; -using JetBrains.Annotations; namespace EasyAbp.EShop.Products.DaprActorsInventory; public interface IInventoryActorProvider { - Task GetAsync(ActorId actorId, [NotNull] string actorType); + Task GetAsync(ActorId actorId); } \ No newline at end of file diff --git a/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/InventoryActorProvider.cs b/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/InventoryActorProvider.cs index 11d016ae..16dd18f1 100644 --- a/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/InventoryActorProvider.cs +++ b/plugins/Inventories/DaprActors/src/EasyAbp.EShop.Products.DaprActorsInventory.Domain/EasyAbp/EShop/Products/DaprActorsInventory/InventoryActorProvider.cs @@ -8,8 +8,10 @@ namespace EasyAbp.EShop.Products.DaprActorsInventory; public class InventoryActorProvider : IInventoryActorProvider, ITransientDependency { - public virtual Task GetAsync(ActorId actorId, string actorType) + public static string ActorType { get; set; } = "InventoryActor"; + + public virtual Task GetAsync(ActorId actorId) { - return Task.FromResult(ActorProxy.Create(actorId, actorType)); + return Task.FromResult(ActorProxy.Create(actorId, ActorType)); } } \ No newline at end of file diff --git a/plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/TestInventoryActorProvider.cs b/plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/TestInventoryActorProvider.cs index db26bdad..1b889758 100644 --- a/plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/TestInventoryActorProvider.cs +++ b/plugins/Inventories/DaprActors/test/EasyAbp.EShop.Products.DaprActorsInventory.Domain.Tests/TestInventoryActorProvider.cs @@ -19,7 +19,7 @@ public class TestInventoryActorProvider : IInventoryActorProvider, ITransientDep _serviceProvider = serviceProvider; } - public Task GetAsync(ActorId actorId, string actorType) + public Task GetAsync(ActorId actorId) { return Task.FromResult(Actor ??= _serviceProvider.GetRequiredService()); }