Commit a68ed777 authored by 李德才's avatar 李德才

退出系统清空Redis 中的用户信息缓存

parent 67328186
......@@ -450,6 +450,19 @@ public class IndexController extends Controller {
this.renderJson(Ret.fail("msg", "生成登录票据失败"));
logService.saveAsLog("login", userName, JwtInterceptor.getIpAddr(getRequest()), "生成登录票据失败", app);
}
}
/**
* 退出系统,清空Redis 中的用户信息
* @Time:2020年7月6日 - 下午5:19:58
* @author:李德才
* @param:
* @return: void
* @throws
*/
public void loginOut() {
String userName = getAttrForStr("username");
Redis.use().del(userName + "_INFO");
renderJson(Ret.ok());
}
}
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