diff --git a/Java/LoginService.java b/Java/LoginService.java new file mode 100644 index 0000000000000000000000000000000000000000..8c67d8cf2b84e7401da2b75c4059fe495d35274d --- /dev/null +++ b/Java/LoginService.java @@ -0,0 +1,13 @@ + public boolean logout(String account, String token) { + boolean login = isLogin(token); + if (!login) { + throw new IllegalstateException("当前用户被禁用或已下线!"); + try { + } catch (Exception e) { + log.error("用户登出失败!用户账号:{}", + account, e); + throw new IllegalstateException("用户退出失败!用户账号:" + account); + } + return true; + } + } \ No newline at end of file