|
|
@ -171,8 +171,7 @@ public class HighUserController { |
|
|
|
// 用户
|
|
|
|
// 用户
|
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); |
|
|
|
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); |
|
|
|
if (StringUtils.isBlank(body.getString("password")) |
|
|
|
if ( StringUtils.isBlank(body.getString("newPassword")) || StringUtils.isBlank(body.getString("code"))) { |
|
|
|
|| StringUtils.isBlank(body.getString("newPassword"))) { |
|
|
|
|
|
|
|
log.error("HighUserController --> setUserPayPwd() error!", ""); |
|
|
|
log.error("HighUserController --> setUserPayPwd() error!", ""); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
} |
|
|
|
} |
|
|
@ -184,14 +183,18 @@ public class HighUserController { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_SET_USER_PAY_PWD, ""); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_SET_USER_PAY_PWD, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!AESEncodeUtil.aesEncrypt(body.getString("password")).equals(userPayPassword.getPassword())) { |
|
|
|
|
|
|
|
log.error("HighUserController --> setUserPayPwd() error!", "修改失败,旧密码不一致"); |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "修改失败,旧密码不一致"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userPayPassword.setPassword(AESEncodeUtil.aesEncrypt(body.getString("newPassword"))); |
|
|
|
VerifyCode verifyCode = VerifyCodeStorage.getDate(userInfoModel.getHighUser().getPhone()); |
|
|
|
highUserPayPasswordService.editUserPayPwd(userPayPassword); |
|
|
|
if (verifyCode != null && verifyCode.getObject().equals(body.getString("code"))) { |
|
|
|
return ResponseMsgUtil.success("操作成功"); |
|
|
|
// 清除记录,验证码只能验证一次
|
|
|
|
|
|
|
|
VerifyCodeStorage.remove(userInfoModel.getHighUser().getPhone()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userPayPassword.setPassword(AESEncodeUtil.aesEncrypt(body.getString("newPassword"))); |
|
|
|
|
|
|
|
highUserPayPasswordService.editUserPayPwd(userPayPassword); |
|
|
|
|
|
|
|
return ResponseMsgUtil.success("操作成功"); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "操作失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("HighUserController --> updateUserPayPwd() error!", e); |
|
|
|
log.error("HighUserController --> updateUserPayPwd() error!", e); |
|
|
|