|
@@ -62,7 +62,13 @@ public class LoginHelper { |
|
|
|
|
|
|
|
|
return new UserSession(user.getId()); |
|
|
return new UserSession(user.getId()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static UserSession simpleLogin(long useId){ |
|
|
|
|
|
User user = UserCache.getInstance().get(useId); |
|
|
|
|
|
if (user == null) { |
|
|
|
|
|
throw new BizException("账号或者密码出错"); |
|
|
|
|
|
} |
|
|
|
|
|
return new UserSession(user.getId()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//密码加密(登录时以密文比较) |
|
|
//密码加密(登录时以密文比较) |
|
|
public static String encodePwd(long user_id, String pwd) { |
|
|
public static String encodePwd(long user_id, String pwd) { |
|
|