Commit 6870651d authored by renjie's avatar renjie

子用户密码加密

parent c4729da9
...@@ -737,7 +737,7 @@ public class AccountServiceImpl implements AccountService { ...@@ -737,7 +737,7 @@ public class AccountServiceImpl implements AccountService {
if (org.apache.commons.lang3.StringUtils.isNotBlank(subUsersRequestDto.getPassword())) if (org.apache.commons.lang3.StringUtils.isNotBlank(subUsersRequestDto.getPassword()))
password = subUsersRequestDto.getPassword(); password = subUsersRequestDto.getPassword();
else else
password = makeRandomPassword(8); password = Aes.aesEncrypt(makeRandomPassword(8));
authUser.setPassword(password); authUser.setPassword(password);
authUser.setPhone(existing.getPhoneNumber()); authUser.setPhone(existing.getPhoneNumber());
...@@ -762,7 +762,7 @@ public class AccountServiceImpl implements AccountService { ...@@ -762,7 +762,7 @@ public class AccountServiceImpl implements AccountService {
if (user.getWhiteList() != null && user.getWhiteList().size() > 0) if (user.getWhiteList() != null && user.getWhiteList().size() > 0)
whiteList.addAll(user.getWhiteList()); whiteList.addAll(user.getWhiteList());
account.setWhiteList(whiteList); account.setWhiteList(whiteList);
account.setPassword(Aes.aesEncrypt(password)); account.setPassword(password);
repository.save(account); repository.save(account);
// emailService.sendEmailVerification(user.getUsername(), user.getEmail(), user.getVerificationCode()); // emailService.sendEmailVerification(user.getUsername(), user.getEmail(), user.getVerificationCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment