重置,修改加解密

This commit is contained in:
mashuai 2024-06-05 17:40:33 +08:00
parent a5e306a0f9
commit 37e8761508
1 changed files with 3 additions and 3 deletions

View File

@ -90,10 +90,10 @@ public class SysProfileController extends BaseController {
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping("/updatePwd")
public AjaxResult updatePwd(String oldPassword, String newPassword) throws Exception {
public AjaxResult updatePwd(String actionCode, String handleCode) throws Exception {
//对新老密码进行解密
String oldDecrypt = RsaUtil.decryptByPrivateKey(oldPassword, Constants.privateKey);
String newDecrypt = RsaUtil.decryptByPrivateKey(newPassword, Constants.privateKey);
String oldDecrypt = RsaUtil.decryptByPrivateKey(actionCode, Constants.privateKey);
String newDecrypt = RsaUtil.decryptByPrivateKey(handleCode, Constants.privateKey);
String username = SecurityUtils.getUsername();
SysUser user = userService.selectUserByUserName(username);
String password = user.getPassword();