1.提交缺失的东西

This commit is contained in:
2025-05-14 23:56:31 +08:00
parent e86a04ce74
commit 756deea38c

View File

@ -402,7 +402,7 @@ class LoginLogic extends LogicBase
//清除之前缓存
$token = Db::name('user_session')
->where(['user_id' => $user_id, 'client' => $client])
->where(['user_id' => $user_id, 'terminal' => $client])
->value('token');
if($token) {
$token_cache = new TokenCache($token);
@ -410,7 +410,7 @@ class LoginLogic extends LogicBase
}
$result = Db::name('user_session')
->where(['user_id' => $user_id, 'client' => $client])
->where(['user_id' => $user_id, 'terminal' => $client])
->find();
$time = time();
@ -419,7 +419,7 @@ class LoginLogic extends LogicBase
$data = [
'user_id' => $user_id,
'token' => $token,
'client' => $client,
'terminal' => $client,
'update_time' => $time,
'expire_time' => $expire_time,
];
@ -428,7 +428,7 @@ class LoginLogic extends LogicBase
Db::name('user_session')->insert($data);
} else {
Db::name('user_session')
->where(['user_id' => $user_id, 'client' => $client])
->where(['user_id' => $user_id, 'terminal' => $client])
->update($data);
}