/// <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)); }
/// <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); }
public async Task <JsonResponse> BatchCreate(OrderInfoBatchRequestDto orderInfoBatchRequestDto) { return(await _orderAppService.BatchCreateAsync(orderInfoBatchRequestDto.OrderInfoRequestList)); }