Skip to content

Commit

Permalink
修复isLogin均返回true的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
bz51 committed Dec 5, 2017
1 parent 7e8c8df commit 5849899
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import javax.servlet.http.HttpServletResponse;
import java.util.List;

import static com.gaoxi.rsp.Result.newFailureResult;
import static com.gaoxi.rsp.Result.newSuccessResult;

/**
Expand Down Expand Up @@ -74,6 +75,9 @@ public Result register(RegisterReq registerReq, HttpServletResponse httpRsp) {
public Result isLogin(HttpServletRequest request) {
String sessionId = getSessionID(request);
UserEntity userEntity = getUserEntity(sessionId);
if (userEntity==null) {
return newFailureResult();
}
return newSuccessResult(userEntity);
}

Expand Down

0 comments on commit 5849899

Please sign in to comment.