add 企业端修改密码加密
This commit is contained in:
+2
-2
@@ -128,7 +128,7 @@ public class PayContactsManagementServiceImpl extends ServiceImpl<PayContactsMan
|
|||||||
}
|
}
|
||||||
String phone = loginUser.getPhone();
|
String phone = loginUser.getPhone();
|
||||||
LambdaQueryWrapper<PayContactsManagement> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PayContactsManagement> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(PayContactsManagement::getPhone, PasswordUtil.encrypt(phone));
|
queryWrapper.eq(PayContactsManagement::getPhone, phone);
|
||||||
PayContactsManagement contactsManagement = this.getOne(queryWrapper);
|
PayContactsManagement contactsManagement = this.getOne(queryWrapper);
|
||||||
|
|
||||||
if (oConvertUtils.isEmpty(newPassword)) {
|
if (oConvertUtils.isEmpty(newPassword)) {
|
||||||
@@ -137,7 +137,7 @@ public class PayContactsManagementServiceImpl extends ServiceImpl<PayContactsMan
|
|||||||
if (!newPassword.equals(verifyPassword)) {
|
if (!newPassword.equals(verifyPassword)) {
|
||||||
throw new JeroBootException("两次输入密码不一致!");
|
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));
|
this.update(new PayContactsManagement().setPassword(password), new LambdaQueryWrapper<PayContactsManagement>().eq(PayContactsManagement::getPhone, phone));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user