platform = $platform; $this->uid = $uid; $this->user = $user; $this->type = $type; $this->amount = $amount; $this->date = $date; } public function handle() { $configRepo = make(ConfigRepoistory::class); $tgMsgServer = $configRepo->get('tg_msg_server', 'sys', ''); $tgApiToken = $configRepo->get('tg_api_token', 'sys', ''); if ($tgMsgServer && $tgApiToken) { $type = '未知'; if ($this->type == 1) { $type = 'USDT'; } elseif ($this->type == 2) { $type = '银行卡'; } elseif ($this->type == 3) { $type = '支付宝'; } make(CommonService::class)->httpPostJson( $tgMsgServer . 'api/tg/send/user/withdraw/message', [ 'platform' => $this->platform, 'uid' => $this->uid, 'user' => $this->user, 'type_name' => $type, 'amount' => $this->amount, 'date' => $this->date, ], ['AUTH-TOKEN' => $tgApiToken]); } } }