From cbccc558b50020901b586d82d94a76be07c48c38 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期二, 11 二月 2025 15:34:11 +0800
Subject: [PATCH] #
---
/dev/null | 17 -----------------
rsf-server/src/main/java/com/vincent/rsf/server/system/controller/UserController.java | 22 ----------------------
2 files changed, 0 insertions(+), 39 deletions(-)
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/UserController.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/UserController.java
index a1a0724..c9a21fd 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/UserController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/UserController.java
@@ -11,7 +11,6 @@
import com.vincent.rsf.server.common.domain.PageParam;
import com.vincent.rsf.server.common.domain.PageResult;
import com.vincent.rsf.server.common.utils.ExcelUtil;
-import com.vincent.rsf.server.system.controller.param.ResetPwdParam;
import com.vincent.rsf.server.system.entity.User;
import com.vincent.rsf.server.system.entity.UserRole;
import com.vincent.rsf.server.system.enums.StatusType;
@@ -197,27 +196,6 @@
@PostMapping("/user/export")
public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
ExcelUtil.build(ExcelUtil.create(userService.list(), User.class), response);
- }
-
- @PreAuthorize("hasAuthority('system:user:update')")
- @OperationLog("Reset Password")
- @PostMapping("/user/reset/pwd")
- public R resetPwd(@RequestBody ResetPwdParam param) {
- User user = userService.getById(param.getId());
- if (!Cools.isEmpty(param.getOldPwd())) {
- if (!userService.comparePassword(user.getPassword(), param.getOldPwd())) {
- return R.error("The old password is incorrect");
- }
- }
- if (!Cools.isEmpty(param.getPassword())) {
- user.setPassword(userService.encodePassword(param.getPassword()));
- }
- user.setUpdateBy(getLoginUserId());
- user.setUpdateTime(new Date());
- if (!userService.updateById(user)) {
- return R.error("Reset Fail");
- }
- return R.ok("Reset Success");
}
}
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/param/ResetPwdParam.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/param/ResetPwdParam.java
deleted file mode 100644
index 7b14298..0000000
--- a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/param/ResetPwdParam.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.vincent.rsf.server.system.controller.param;
-
-import lombok.Data;
-
-/**
- * Created by vincent on 2/28/2024
- */
-@Data
-public class ResetPwdParam {
-
- private Long id;
-
- private String oldPwd;
-
- private String password;
-
-}
--
Gitblit v1.9.1