| | |
| | | userService.removeById(tUser); |
| | | return R.ok("注销成功"); |
| | | } |
| | | |
| | | @PostMapping("/deleteUserStudy") |
| | | @ApiOperation(value = "注销当前帐号", tags = {"学习端-个人中心"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header"), |
| | | }) |
| | | public R<String> deleteUserStudy() { |
| | | if (tokenService.getLoginUserStudy() == null) { |
| | | return R.tokenError("登录失效"); |
| | | } |
| | | Integer userid = tokenService.getLoginUserStudy().getUserid(); |
| | | TUser tUser = userService.getById(userid); |
| | | tUser.setState(3); |
| | | userService.updateById(tUser); |
| | | userService.removeById(tUser); |
| | | return R.ok("注销成功"); |
| | | } |
| | | @PostMapping("/logout") |
| | | @ApiOperation(value = "退出登录", tags = {"家长端-个人中心"}) |
| | | @ApiImplicitParams({ |