add 企业端修改密码加密

This commit is contained in:
lijiarao
2021-10-11 11:57:54 +08:00
parent d8af121403
commit 0f96ad32e4
@@ -128,7 +128,7 @@ public class PayContactsManagementServiceImpl extends ServiceImpl<PayContactsMan
}
String phone = loginUser.getPhone();
LambdaQueryWrapper<PayContactsManagement> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(PayContactsManagement::getPhone, PasswordUtil.encrypt(phone));
queryWrapper.eq(PayContactsManagement::getPhone, phone);
PayContactsManagement contactsManagement = this.getOne(queryWrapper);
if (oConvertUtils.isEmpty(newPassword)) {
@@ -137,7 +137,7 @@ public class PayContactsManagementServiceImpl extends ServiceImpl<PayContactsMan
if (!newPassword.equals(verifyPassword)) {
throw new JeroBootException("两次输入密码不一致!");
}
String password = PasswordUtil.encrypt(phone, newPassword, contactsManagement.getSalt());
String password = PasswordUtil.encrypt(PasswordUtil.decrypt(phone), newPassword, contactsManagement.getSalt());
this.update(new PayContactsManagement().setPassword(password), new LambdaQueryWrapper<PayContactsManagement>().eq(PayContactsManagement::getPhone, phone));
}
}