|
@@ -647,7 +647,7 @@ public class UserController {
|
|
|
long loginIdAsLong = StpUtil.getLoginIdAsLong();
|
|
|
User user = userService.getById(loginIdAsLong);
|
|
|
user.setSignFolderId(dto.getFolderId());
|
|
|
- user.setSignPassword(BCrypt.hashpw(dto.getSignPassword(), BCrypt.gensalt()));
|
|
|
+ user.setSignPassword(BCrypt.hashpw(dto.getPassword(), BCrypt.gensalt()));
|
|
|
|
|
|
return RT.ok(userService.updateById(user));
|
|
|
}
|
|
@@ -667,15 +667,12 @@ public class UserController {
|
|
|
return RT.ok(list.get(0).getFileUrl());
|
|
|
}
|
|
|
|
|
|
- @GetMapping("/check-signpassword")
|
|
|
- @ApiOperation(value = "验证登录者的签名密码")
|
|
|
+ @GetMapping("/check-password")
|
|
|
+ @ApiOperation(value = "验证登录者的密码")
|
|
|
public RT<Boolean> checkSignpassword(@Valid @RequestBody UploadSignDto dto) {
|
|
|
long loginIdAsLong = StpUtil.getLoginIdAsLong();
|
|
|
User user = userService.getById(loginIdAsLong);
|
|
|
- if(user.getSignFolderId() != null && user.getSignFolderId() != dto.getFolderId()){
|
|
|
- return RT.error("未上传签名");
|
|
|
- }
|
|
|
- if (!BCrypt.checkpw(dto.getSignPassword(), user.getSignPassword())) {
|
|
|
+ if (!BCrypt.checkpw(dto.getPassword(), user.getSignPassword())) {
|
|
|
return RT.error("密码填写错误!");
|
|
|
}
|
|
|
return RT.ok(true);
|