You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
731 B
27 lines
731 B
using Kean.Domain.Stock.Repositories;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Kean.Domain.Stock.SharedServices
|
|
{
|
|
/// <summary>
|
|
/// 获取库存规格
|
|
/// </summary>
|
|
public sealed class GetSpec
|
|
{
|
|
private readonly IStockRepository _stockRepository;
|
|
|
|
/// <summary>
|
|
/// 依赖注入
|
|
/// </summary>
|
|
public GetSpec(IStockRepository stockRepository) =>
|
|
_stockRepository = stockRepository;
|
|
|
|
/// <summary>
|
|
/// 处理程序
|
|
/// </summary>
|
|
/// <param name="barcode">条码</param>
|
|
/// <returns>库存规格</returns>
|
|
public Task<int?> Handler(string barcode) =>
|
|
_stockRepository.GetSpec(barcode);
|
|
}
|
|
}
|