Merge remote-tracking branch 'origin/dev-nx' into dev-nx

This commit is contained in:
csyue 2024-05-28 09:38:41 +08:00
commit 02e4f72d97
2 changed files with 4 additions and 4 deletions

View File

@ -57,10 +57,10 @@ public class TokenController {
//web端登录 //web端登录
@PostMapping("login") @PostMapping("login")
public R<?> login(@RequestBody LoginBody form) throws Exception { public R<?> login(@RequestBody LoginBody form) {
String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey); //String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey);
// 用户登录 // 用户登录
LoginUser userInfo = sysLoginService.login(form.getUsername(), decryptedData); LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword());
String uuid = form.getUuid(); String uuid = form.getUuid();
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString(); String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
if (StringUtils.isBlank(captcha)) { if (StringUtils.isBlank(captcha)) {

View File

@ -99,7 +99,7 @@ public class SysProfileController extends BaseController {
@Log(title = "个人信息", businessType = BusinessType.UPDATE) @Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping("/updatePwd") @PutMapping("/updatePwd")
public AjaxResult updatePwd(String oldPassword, String newPassword) { public AjaxResult updatePwd(String oldPassword, String newPassword) {
String username = SecurityUtils.getUsername(); String username = SecurityUtils.getLoginUser().getUsername();
SysUser user = userService.selectUserByUserName(username); SysUser user = userService.selectUserByUserName(username);
String password = user.getPassword(); String password = user.getPassword();
if (!SecurityUtils.matchesPassword(oldPassword, password)) { if (!SecurityUtils.matchesPassword(oldPassword, password)) {