From f65035be507df06bc77331f77c24376c678cd0bc Mon Sep 17 00:00:00 2001 From: FLYPHT <1035748121@qq.com> Date: Tue, 6 Sep 2022 17:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E6=A8=A1=E5=9E=8B=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cc/smtweb/system/bpm/web/login/LoginHelper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginHelper.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginHelper.java index c3bdf0c..ad9eddc 100644 --- a/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginHelper.java +++ b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/login/LoginHelper.java @@ -62,7 +62,13 @@ public class LoginHelper { 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) {