public async Task <CoreResult> Create([FromBody] CreateShopRequestDto dto) { CoreResult result = new CoreResult(); CreateShopCommand command = new CreateShopCommand(dto); var res = await _bus.SendCommandAsync(command); if (res) { result.Success("添加成功"); } else { result.Failed("添加失败"); } return(result); }
public CreateShopCommand(CreateShopRequestDto dto) { createShopRequestDto = dto; }