Commit cc610555 authored by 33's avatar 33

登录时长调整

parent f1f8a848
......@@ -52,7 +52,7 @@ public class AdminController {
}
String token = JwtUtil.generateToken(admin);
redisUtil.setEx(RedisConstant.ADMIN_USER_TOKEN_PREFIX + admin.getId(), token, 2L, TimeUnit.HOURS);
redisUtil.setEx(RedisConstant.ADMIN_USER_TOKEN_PREFIX + admin.getId(), token, 24L, TimeUnit.HOURS);
HashMap<String, Object> result = new HashMap<>();
result.put("user", admin);
result.put(TokenConstant.TOKEN_HEADER, token);
......
......@@ -60,7 +60,7 @@ public class UserController {
}
User user = userService.login(param);
String token = JwtUtil.generateToken(user);
redisUtil.setEx(RedisConstant.PORTAL_USER_TOKEN_PREFIX + user.getId(), token, 24L, TimeUnit.HOURS);
redisUtil.setEx(RedisConstant.PORTAL_USER_TOKEN_PREFIX + user.getId(), token, 24 * 7, TimeUnit.HOURS);
HashMap<String, Object> result = new HashMap<>();
result.put("user", user);
result.put(TokenConstant.TOKEN_HEADER, token);
......
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