orderOnlineService->doComplete($global_order_id, $user_id); $this->separateAccountsService->orderOnlineCompleted($global_order_id, $user_id); Db::commit(); return [ "status" => 200, "code" => 0, "result" => [], "message" => '处理成功' ]; } catch (\Exception $e) { Db::rollBack(); $this->log->event(LogLabel::ORDER_COMPLETE_LOG, ['jsonrpc_order_service_exception_onlineComplete' => $e->getMessage(), 'params' => json([$global_order_id, $user_id])]); throw new ErrorCodeException(ErrorCode::ORDER_COMPLETE_FAIL); } } /** * 线上订单退款,整个订单退 * @param $global_order_id * @param $user_id * @return array */ public function onlineRefund($global_order_id, $user_id){ Db::beginTransaction(); try { $this->orderOnlineService->doRefund($global_order_id, $user_id); Db::commit(); return [ "status" => 200, "code" => 0, "result" => [], "message" => '处理成功' ]; } catch (\Exception $e) { Db::rollBack(); $this->log->event(LogLabel::ORDER_REFUND_LOG, ['jsonrpc_order_service_exception_onlineRefund' => $e->getMessage(), 'params' => json([$global_order_id, $user_id])]); throw new ErrorCodeException(ErrorCode::ORDER_REFUND_FAIL); } } }