Commit e96b6015 authored by zhouqian's avatar zhouqian

fix a bug

parent 3294a9d0
...@@ -43,13 +43,11 @@ public class SessionServiceImpl implements ISessionService{ ...@@ -43,13 +43,11 @@ public class SessionServiceImpl implements ISessionService{
//获取sessionid //获取sessionid
String sessionId = findSessionIdByUserIdLoginProperties(user.getId(), properties); String sessionId = findSessionIdByUserIdLoginProperties(user.getId(), properties);
if (StringUtils.length(sessionId) == 36) { if (StringUtils.length(sessionId) == 36) {
sessionStruct = new SessionStruct(); sessionStruct = findSessionBySessionId(sessionId);
String sessionValue = findSessionValueBySessionId(sessionId); if (sessionStruct == null) {
if (StringUtils.isEmpty(sessionValue)) {
sessionStruct = newSession(user, properties); sessionStruct = newSession(user, properties);
persistSession(sessionStruct.getSid(), sessionStruct.getValues()); persistSession(sessionStruct.getSid(), sessionStruct.getValues());
} }
sessionStruct.setSid(sessionId);
} else { } else {
sessionStruct = newSession(user, properties); sessionStruct = newSession(user, properties);
persistSession(sessionStruct.getSid(), sessionStruct.getValues()); persistSession(sessionStruct.getSid(), sessionStruct.getValues());
......
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