objTable->getOne(compact('account', 'type'), ['_field' => 'user_id']); return $userId; } /** * 通过用户id获取第三方账号 * @param int $user_id * @param string $type * * @return string */ public function getAccountByUserId($user_id, $type = 'eos') { $account = $this->objTable->getOne(compact('user_id', 'type'), ['_field' => 'account']); return $account; } public function getUserIdByTgId($TgId) { $userId = $this->objTable->getOne(['account' => $TgId, 'type' => Account::TYPE_TG], ['_field' => 'user_id']); return intval($userId); } }