Commit a27a6698 authored by Quxl's avatar Quxl

x

parent 4f19b224
...@@ -85,6 +85,8 @@ public class AdminTokenServiceImpl implements AdminTokenService { ...@@ -85,6 +85,8 @@ public class AdminTokenServiceImpl implements AdminTokenService {
@Override @Override
public void doLogout() { public void doLogout() {
String sql = "update fc_admin set token = ? where adminid = ?";
jdbcTemplate.executeUpdate(sql, null, this.getToken().getId());
HttpSession session = WebMvcConfig.getSession(); HttpSession session = WebMvcConfig.getSession();
session.removeAttribute(TOKEN_NAME); session.removeAttribute(TOKEN_NAME);
session.invalidate(); session.invalidate();
......
...@@ -84,6 +84,8 @@ public class MemberTokenServiceImpl implements MemberTokenService { ...@@ -84,6 +84,8 @@ public class MemberTokenServiceImpl implements MemberTokenService {
@Override @Override
public void doLogout() { public void doLogout() {
String sql = "update fc_member set token = ? where id = ?";
jdbcTemplate.executeUpdate(sql, null, this.getToken().getId());
HttpSession session = WebMvcConfig.getSession(); HttpSession session = WebMvcConfig.getSession();
session.removeAttribute(TOKEN_NAME); session.removeAttribute(TOKEN_NAME);
session.invalidate(); session.invalidate();
......
...@@ -81,6 +81,8 @@ public class UserTokenServiceImpl implements UserTokenService { ...@@ -81,6 +81,8 @@ public class UserTokenServiceImpl implements UserTokenService {
@Override @Override
public void doLogout() { public void doLogout() {
String sql = "update fc_user set token = ? where uid = ?";
jdbcTemplate.executeUpdate(sql, null, this.getToken().getId());
HttpSession session = WebMvcConfig.getSession(); HttpSession session = WebMvcConfig.getSession();
session.removeAttribute(TOKEN_NAME); session.removeAttribute(TOKEN_NAME);
session.invalidate(); session.invalidate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment