Commit f2578808 authored by Quxl's avatar Quxl

优化会员登陆

parent 4a832442
...@@ -32,7 +32,7 @@ public class MemberServiceImpl implements MemberService { ...@@ -32,7 +32,7 @@ public class MemberServiceImpl implements MemberService {
@Override @Override
public String encodePassword(String salt, String password) { public String encodePassword(String salt, String password) {
return StringUtil.toMD5HexString(StringUtil.toMD5HexString(password + salt).toLowerCase().substring(4, 20)).toLowerCase(); return StringUtil.toMD5HexString(StringUtil.toMD5HexString(password + salt).toLowerCase().substring(4, 24)).toLowerCase();
} }
@Override @Override
......
...@@ -36,7 +36,7 @@ public class MemberLoginController { ...@@ -36,7 +36,7 @@ public class MemberLoginController {
} else { } else {
LoginToken token = tokenService.doLogin(username, password); LoginToken token = tokenService.doLogin(username, password);
if(token != null) { if(token != null) {
return Rjx.jsonOk().setData(token); return Rjx.jsonOk();
} else { } else {
throw new XException(messages.get("sys.err.user_or_pwd")); throw new XException(messages.get("sys.err.user_or_pwd"));
} }
......
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