Commit 51d4d191 authored by Quxl's avatar Quxl

x

parent 122b61c7
...@@ -99,7 +99,7 @@ public class MemberServiceImpl implements MemberService { ...@@ -99,7 +99,7 @@ public class MemberServiceImpl implements MemberService {
@Override @Override
public Fc_member getMemberByToken(String token) { public Fc_member getMemberByToken(String token) {
String sql = "select * from fc_member where token = ?"; String sql = "select * from fc_member where token = ? and state = 1";
return jdbcTemplate.queryForBean(sql, Fc_member.class, token); return jdbcTemplate.queryForBean(sql, Fc_member.class, token);
} }
......
...@@ -95,7 +95,7 @@ public class UserTokenServiceImpl implements UserTokenService { ...@@ -95,7 +95,7 @@ public class UserTokenServiceImpl implements UserTokenService {
public boolean isLoginByToken(String token_string) { public boolean isLoginByToken(String token_string) {
HttpSession session = WebMvcConfig.getSession(); HttpSession session = WebMvcConfig.getSession();
try { try {
String sql = "select uid from fc_user where token = ?"; String sql = "select uid from fc_user where token = ? and state = 1";
Integer uid = jdbcTemplate.queryForInt(sql, token_string); Integer uid = jdbcTemplate.queryForInt(sql, token_string);
LoginToken token = new LoginToken(uid); LoginToken token = new LoginToken(uid);
session.setAttribute(TOKEN_NAME, token); session.setAttribute(TOKEN_NAME, 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