using Kean.Domain.Stock.Commands; using System; using System.Threading.Tasks; namespace Kean.Domain.Stock.SharedServices { /// /// 出库 /// public sealed class Outbound { private readonly ICommandBus _commandBus; /// /// 依赖注入 /// public Outbound(ICommandBus commandBus) => _commandBus = commandBus; /// /// 处理程序 /// /// 托盘条码 /// 操作者 /// 标签 public Task Handler( string barcode, int @operator, string tag) => _commandBus.Execute(new OutboundCommand { Barcode = barcode, Operator = @operator, Tag = tag }); } }