1.修复 Bug
This commit is contained in:
@@ -333,9 +333,8 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserModel> implements
|
||||
throw new BusinessException(ErrorCode.USER_DOES_NOT_EXIST);
|
||||
}
|
||||
if (userModelDTO.getPassword().equals(userModelDTO.getConfirmPassword())) {
|
||||
UserModel updateEntity = BeanUtil.copyProperties(userModelDTO, UserModel.class);
|
||||
updateEntity.setPassword(BcryptUtils.encryptPassword(updateEntity.getPassword()));
|
||||
return userDao.updateById(updateEntity) == 1;
|
||||
userModel.setPassword(BcryptUtils.encryptPassword(userModelDTO.getPassword()));
|
||||
return userDao.updateById(userModel) == 1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
||||
"/user/checkUserName",
|
||||
"/user/verification",
|
||||
"/user/forgetMail",
|
||||
"/user/resetPassword/"
|
||||
"/user/resetPassword"
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ public class UserController {
|
||||
}
|
||||
|
||||
// 用户通过邮件验证链接重设密码接口
|
||||
@PostMapping("/resetPassword/")
|
||||
@PostMapping("/resetPassword")
|
||||
public ResponseData<Object>resetPassWord(@RequestBody UserModelDTO userModelDTO){
|
||||
return ResponseData.success(userService.resetPassWord(userModelDTO));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user