orders = $orders; } /** * * @param OrderService $service * @return void * @throws */ public function handle(OrderService $service) { if ($this->orders){ foreach ($this->orders as $order){ try{ if (!$service->createInstantBill($order)) LogService::log(__METHOD__,"ERROR-订单生成即时账单",$this->order->toJson()); }catch (\Exception $e){ LogService::log(__METHOD__,"ERROR-订单生成即时账单",$this->order->toJson()." | ".$e->getMessage()); throw new \Exception($e->getMessage()); } } } } }