コード例 #1
0
 /// <summary>
 /// 批量新增
 /// </summary>
 /// <param name="orderInfoBatchRequestDto"></param>
 /// <returns></returns>
 public async Task <JsonResponse> BatchCreate(OrderInfoBatchRequestDto orderInfoBatchRequestDto)
 {
     foreach (var orderInfoRequest in orderInfoBatchRequestDto.OrderInfoRequestList)
     {
         orderInfoRequest.ToLoginUser();
     }
     return(await _orderAppService.BatchCreateAsync(orderInfoBatchRequestDto.OrderInfoRequestList));
 }
コード例 #2
0
        /// <summary>
        /// 批量新增
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task <JsonResponse> BatchCreate(OrderInfoBatchRequestDto input)
        {
            foreach (var orderInfoRequestDto in input.OrderInfoRequestList)
            {
                orderInfoRequestDto.InitCreateRequest(input.Payload);
            }
            var resJson = await _applicationEnginee.TryTransactionAsync(async() =>
            {
                await _orderInfoAppService.BatchCreateAsync(input.OrderInfoRequestList);
            });

            return(resJson);
        }
コード例 #3
0
 public async Task <JsonResponse> BatchCreate(OrderInfoBatchRequestDto orderInfoBatchRequestDto)
 {
     return(await _orderAppService.BatchCreateAsync(orderInfoBatchRequestDto.OrderInfoRequestList));
 }