修正SysProfileController中的方法签名,明确请求参数。
在`updatePwd`方法中使用@RequestParam明确指定旧密码和新密码,确保请求参数的清晰定义与正确解析。此变更强化了方法参数的明确性,优化了代码的可读性与健壮性。master
parent
e5740f38cf
commit
ea1184dcea
|
@ -85,7 +85,7 @@ public class SysProfileController extends BaseController {
|
|||
*/
|
||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updatePwd")
|
||||
public Result updatePwd (String oldPassword, String newPassword) {
|
||||
public Result updatePwd (@RequestParam(value = "oldPassword") String oldPassword, @RequestParam(value = "newPassword") String newPassword) {
|
||||
String username = SecurityUtils.getUsername();
|
||||
SysUser user = userService.selectUserByUserName(username);
|
||||
String password = user.getPassword();
|
||||
|
|
Loading…
Reference in New Issue