user = $user; $this->chat_id = $chat_id; } /** * Execute the job. * * @return void */ public function handle() { if ($this->chat_id) { $group = Group::with('order')->where('chat_id', $this->chat_id)->first(); if (empty($group) || empty($group->order)) throw new \Exception("占位订单转虚拟订单,没有群信息或没有占位订单"); if ($group->order->type == 'TEMP') { $group->order->update([ 'user_id'=>$this->user->id, 'type'=>'SERVICE', 'type_id'=>1, 'pay_status'=>'PAID', 'name'=>$this->user->name, 'mobile'=>$this->user->mobile, 'desc'=>'福恋智能健康', 'is_hook'=>1 ]); }elseif (empty($group->order->user_id)) { $group->order->update(['user_id'=>$this->user->id]); } } //同步订单服务信息状态 // SyncOrderServiceStatus::dispatch($this->user)->onQueue('health'); } }