Commit 7d0caf50 by qwmqiuwenmin

fix

parent 4e11bfc0
......@@ -171,8 +171,19 @@ public class LoginController extends WebBaseController{
@RequestMapping("login-out")
public HaobanResponse loginOut() {
String token = AuthRequestUtil.getRequest().getHeader("token");
RedisUtil.delCache(token);
String token = "";
Cookie[] cookies = AuthRequestUtil.getRequest().getCookies();
if(cookies != null){
for (Cookie cookie : cookies) {
if(cookie.getName().equals("token")){
token = cookie.getValue();
break;
}
}
}
if(StringUtils.isNotBlank(token)){
RedisUtil.delCache(token);
}
return resultResponse(HaoBanErrCode.ERR_1);
}
......
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