Example #1
0
        /// <summary>
        /// 批量新增
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task <JsonResponse> BatchCreate(GoodsBatchRequestDto input)
        {
            foreach (var goodsRequestDto in input.GoodsRequestList)
            {
                goodsRequestDto.InitCreateRequest(input.Payload);
            }
            var resJson = await _applicationEnginee.TryTransactionAsync(async() =>
            {
                await _goodsAppService.BatchCreateAsync(input.GoodsRequestList);
            });

            return(resJson);
        }