Commit 0f94c0c5 authored by Quxl's avatar Quxl

x

parent 8f036688
......@@ -43,7 +43,7 @@ public class AdminTokenServiceImpl implements AdminTokenService {
Integer adminid = admin.getAdminid();
LoginToken token = new LoginToken(adminid);
session.setAttribute(TOKEN_NAME, token);
Cookie cookie = WebMvcConfig.getOrCreateUUIDCookie(LOGINID_COOKIE_NAME, "/", 60*60*24, true);
Cookie cookie = WebMvcConfig.getOrCreateUUIDCookie(LOGINID_COOKIE_NAME, "/", 60*60*24*5, true);
if(cookie != null) {
String sql = "update fc_admin set token = ?, login_ip = ?, login_time = ? where adminid = ?";
String loginIp = ServletUtil.remoteIp(WebMvcConfig.getRequest());
......
......@@ -51,7 +51,7 @@ public class MemberTokenServiceImpl implements MemberTokenService {
Integer id = member.getId();
LoginToken token = new LoginToken(id);
session.setAttribute(TOKEN_NAME, token);
Cookie cookie = WebMvcConfig.getOrCreateUUIDCookie(LOGINID_COOKIE_NAME, "/", 60*60, true);
Cookie cookie = WebMvcConfig.getOrCreateUUIDCookie(LOGINID_COOKIE_NAME, "/", 60*60*24*5, true);
if(cookie != null) {
String loginIp = ServletUtil.remoteIp(WebMvcConfig.getRequest());
memberService.updateLoginInfo(id, loginIp, cookie.getValue());
......
......@@ -47,7 +47,7 @@ public class UserTokenServiceImpl implements UserTokenService {
Integer uid = user.getUid();
LoginToken token = new LoginToken(uid);
session.setAttribute(TOKEN_NAME, token);
Cookie cookie = WebMvcConfig.getOrCreateUUIDCookie(LOGINID_COOKIE_NAME, "/", 60*60*24, true);
Cookie cookie = WebMvcConfig.getOrCreateUUIDCookie(LOGINID_COOKIE_NAME, "/", 60*60*24*5, true);
if(cookie != null) {
String sql = "update fc_user set token = ?, last_login_ip = ?, last_login_time = ? where uid = ?";
String loginIp = ServletUtil.remoteIp(WebMvcConfig.getRequest());
......
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