| | |
| | | */ |
| | | @ApiOperation(value = "账号管理-修改用户", tags = "系统后台-权限管理") |
| | | @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @Log(title = "账号管理", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public R<Void> edit(@Valid @RequestBody EditSysUserDTO dto) { |
| | | userService.edit(dto); |
| | |
| | | */ |
| | | @ApiOperation(value = "账号管理-删除用户", tags = "系统后台-权限管理") |
| | | @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @Log(title = "用户管理", businessType = BusinessType.DELETE) |
| | | @Log(title = "账号管理", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{userId}") |
| | | public R remove(@PathVariable("userId") Long userId) { |
| | | if (Objects.equals(userId, getUserId())) { |
| | |
| | | */ |
| | | @ApiOperation(value = "账号管理-重置密码", tags = "系统后台-权限管理") |
| | | @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @Log(title = "账号管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/resetPassword/{userId}") |
| | | public R<Void> resetPassword(@PathVariable("userId") Long userId) { |
| | | userService.resetPassword(userId); |
| | |
| | | */ |
| | | @ApiOperation(value = "账号管理-状态修改", tags = "系统后台-权限管理") |
| | | @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @Log(title = "账号管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/changeStatus/{userId}") |
| | | public R<Void> changeStatus(@PathVariable("userId") Long userId) { |
| | | if (Objects.equals(userId, getUserId())) { |
| | | return R.fail("当前用户不能删除"); |
| | | return R.fail("当前用户不能操作"); |
| | | } |
| | | userService.changeStatus(userId); |
| | | return R.ok(); |