* [ * 'uid' => '1', * 'orderId' => 1 * 'ranseId' => 1, * ] * */ private $info; /** * Create a new job instance. */ public function __construct($info) { $this->info = $info; } /** * Execute the job. */ public function handle(): void { $traceContext = TraceContext::newFromParent($this->info['traceInfo']); myLog('reportCharge')->info('开始处理订单回传', [ 'orderInfo' => $this->info, 'traceInfo' => $traceContext->getTraceInfo() ]); $order = DB::table('orders')->where('id', $this->info['orderId'])->first(); if($order && $order->promotion_id) { $promotion = DB::table('promotions')->where('id', $order->promotion_id)->first(); switch ($promotion->callback_type ?? 0) { case 0: myLog('reportCharge')->error('end:订单染色配置有问题', [ 'traceInfo' => $traceContext->getTraceInfo() ]); break; case 1: $reportService = new JuliangAccountReportChargeService($this->info['uid'], $order, $this->info['traceInfo']); $reportService->report(); break; } } } }