|
|
@@ -199,7 +199,7 @@ public class UserController {
|
|
|
|
|
|
@ApiOperation("修改密码")
|
|
|
@PostMapping(value = "/updatePass")
|
|
|
- public ResponseEntity<Object> updateUserPass(@RequestBody UserPassVo passVo) throws Exception {
|
|
|
+ public AppBaseResponse<?> updateUserPass(@RequestBody UserPassVo passVo) throws Exception {
|
|
|
String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getOldPass());
|
|
|
String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getNewPass());
|
|
|
UserDto user = userService.findByName(contextUtil.getCurrentUsername());
|
|
|
@@ -210,7 +210,7 @@ public class UserController {
|
|
|
throw new BadRequestException("新密码不能与旧密码相同");
|
|
|
}
|
|
|
userService.updatePass(user.getUsername(),passwordEncoder.encode(newPass));
|
|
|
- return new ResponseEntity<>(HttpStatus.OK);
|
|
|
+ return AppBaseResponse.success();
|
|
|
}
|
|
|
|
|
|
@ApiOperation("修改头像")
|