This commit is contained in:
2025-08-13 20:28:23 +08:00
parent 537426593a
commit 7f48675193
9 changed files with 92 additions and 29 deletions

View File

@@ -2,9 +2,9 @@
namespace app\common\library;
use app\api\model\TbUser;
use app\czg\app\model\TbUser;
use app\api\model\TbUserBlacklist;
use app\api\model\UserInfo;
use app\czg\app\model\UserInfo;
use app\common\model\Common;
use app\common\model\SysUser;
use app\utils\JwtUtils;
@@ -160,6 +160,7 @@ class Auth
$where = $sale = ['user_id' => $userId];
$user_id_db_name = DatabaseRoute::getConnection('tb_user', $sale);
$this->model = Db::connect($user_id_db_name)->name('tb_user')->where($where)->find();
if (!$this->model) {
$this->setError('Account not exist');
return false;
@@ -355,13 +356,10 @@ class Auth
// 验证密码
if(TbUser::CheckPassword($this->model['password'], $password)) {
// 实名认证信息
$userInfo = new UserInfo();
$where = ['user_id' => $this->model['user_id']];
$userInfo->setConnection($userInfo::findbefore($userInfo, $where));
$userInfo = $userInfo->where($where)->find();
if($userInfo && $userInfo->cert_no) {
$userInfo = DatabaseRoute::getDb('user_info', $this->model['user_id'])->find();
if($userInfo && $userInfo['cert_no']) {
// 继续查黑名单表
$userBlack = TbUserBlacklist::where(['id_card_no' => $userInfo->cert_no])->find();
$userBlack = \app\czg\app\model\TbUserBlacklist::where(['id_card_no' => $userInfo['cert_no']])->find();
if($userBlack) {
$this->setError('系统正在维护中,请稍后再试!');
return false;