Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public CreateShopCommand(CreateShopRequestDto dto)
 {
     createShopRequestDto = dto;
 }