diff --git a/app/api/logic/LoginLogic.php b/app/api/logic/LoginLogic.php index a1dff54..c0deb44 100755 --- a/app/api/logic/LoginLogic.php +++ b/app/api/logic/LoginLogic.php @@ -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); }