@Override public String getTenantCode() { return original.getTenantCode(); }
@Override public void updatePassword(String userId, String oldPassword, String newPassword) throws ServiceException { String msg = "Failed to update password. "; if (VerifyTools.isBlank(userId)) { log.error(msg + "params is null: userId"); throw new ServiceException(ResultCode.PARAMETER_IS_REQUIRED); } if (VerifyTools.isBlank(oldPassword)) { log.error(msg + "params is null: oldPassword"); throw new ServiceException(ResultCode.PARAMETER_IS_REQUIRED); } if (VerifyTools.isBlank(newPassword)) { log.error(msg + "params is null: newPassword"); throw new ServiceException(ResultCode.PARAMETER_IS_REQUIRED); } UserCoreBean user = userCoreBasic.findById(userId); if (user == null) { log.error(msg + "user info not found. id:{}", userId); throw new ServiceException(UserErrorCode.USER_NOT_EXIST); } // 验证旧密码是否正确 if (!passwordService.validate(userId, oldPassword, user.getPassword())) { log.error(msg + "old password error. id:{}", userId); throw new ServiceException(UserErrorCode.OLD_PASSWORD_ERROR); } doUpdatePassword(user.getTenantCode(), user.getUserType(), userId, newPassword); }
AccountBean bean = new AccountBean(user.getTenantCode(), user.getUserType(), newPhone); userCoreExecutor.checkPhoneThrowOnAlreadyExists(bean, userId);
AccountBean bean = new AccountBean(user.getTenantCode(), user.getUserType(), newPhone); userCoreExecutor.checkPhoneThrowOnAlreadyExists(bean, userId);
String tenantCode = model.getTenantCode(); IAccountType userType = model.getUserType(); String password = model.getPassword();
String tenantCode = older.getTenantCode(); IAccountType userType = older.getUserType(); UserCoreUpdate newer = createChangedModel(model, older);
String tenantCode = model.getTenantCode(); IAccountType userType = model.getUserType();