add 企业端修改密码加密

This commit is contained in:
lijiarao
2021-10-11 11:48:52 +08:00
parent b027f488f8
commit d8af121403
@@ -118,6 +118,14 @@ public class PayContactsManagementServiceImpl extends ServiceImpl<PayContactsMan
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String newPassword = companyLoginVO.getNewPassword();
String verifyPassword = companyLoginVO.getVerifyPassword();
String RSAPublicKey = companyLoginVO.getRsaPublicKey();
String RSAPrivateKey = String.valueOf(redisUtil.get(RSAPublicKey));
try {
newPassword = CommonUtils.decryptBtRsaPriKey(newPassword, RSAPrivateKey);
verifyPassword = CommonUtils.decryptBtRsaPriKey(verifyPassword, RSAPrivateKey);
}catch (Exception e){
e.printStackTrace();
}
String phone = loginUser.getPhone();
LambdaQueryWrapper<PayContactsManagement> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayContactsManagement::getPhone, PasswordUtil.encrypt(phone));