huliguo
2025-05-30 ac89371643d184cae09b2f93af2e1fce401dc92f
pt-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -131,7 +131,7 @@
     */
    @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);
@@ -162,7 +162,7 @@
     */
    @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())) {
@@ -176,7 +176,7 @@
     */
    @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);
@@ -188,11 +188,11 @@
     */
    @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();