Browse Source
Merge pull request #195 from EasyAbp/fix-default-inventory-provider
Use configured default inventory provider
pull/197/head
Super
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
3 deletions
-
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductInventoryProviderResolver.cs
|
|
|
@ -1,13 +1,11 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Concurrent; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using EasyAbp.EShop.Products.Options; |
|
|
|
using EasyAbp.EShop.Products.ProductInventories; |
|
|
|
using JetBrains.Annotations; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.DependencyInjection; |
|
|
|
|
|
|
|
namespace EasyAbp.EShop.Products.Products; |
|
|
|
@ -57,7 +55,8 @@ public class ProductInventoryProviderResolver : IProductInventoryProviderResolve |
|
|
|
{ |
|
|
|
if (providerName.IsNullOrEmpty()) |
|
|
|
{ |
|
|
|
providerName = DefaultProductInventoryProvider.DefaultProductInventoryProviderName; |
|
|
|
var options = ServiceProvider.GetRequiredService<IOptions<EShopProductsOptions>>(); |
|
|
|
providerName = options.Value.DefaultInventoryProviderName; |
|
|
|
} |
|
|
|
|
|
|
|
TryBuildNameToProviderTypeMapping(); |
|
|
|
|