From 6feacf79122939d61a8dcfc83e94583d59f84716 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 26 Oct 2022 19:40:04 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=B8=AA=E4=BA=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=BF=AE=E6=94=B9=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/controller/BaseUserController.java | 10 ++++++++++ .../java/io/metersphere/controller/UserController.java | 8 -------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java index 567c2b110c..431d76e60c 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java @@ -7,6 +7,7 @@ import io.metersphere.commons.utils.SessionUtils; import io.metersphere.dto.UserDTO; import io.metersphere.log.annotation.MsAuditLog; import io.metersphere.request.AuthUserIssueRequest; +import io.metersphere.request.member.EditPassWordRequest; import io.metersphere.request.member.EditSeleniumServerRequest; import io.metersphere.request.member.QueryMemberRequest; import io.metersphere.service.BaseUserService; @@ -43,6 +44,15 @@ public class BaseUserController { return baseUserService.updateCurrentUser(user); } + /* + * 修改当前用户密码 + * */ + @PostMapping("/update/password") + @MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.UPDATE, title = "个人密码") + public int updateCurrentUserPassword(@RequestBody EditPassWordRequest request) { + return baseUserService.updateCurrentUserPassword(request); + } + @GetMapping("/project/member/list") public List getProjectMemberListAll() { diff --git a/system-setting/backend/src/main/java/io/metersphere/controller/UserController.java b/system-setting/backend/src/main/java/io/metersphere/controller/UserController.java index 05db6ba3cc..ae4b52ea53 100644 --- a/system-setting/backend/src/main/java/io/metersphere/controller/UserController.java +++ b/system-setting/backend/src/main/java/io/metersphere/controller/UserController.java @@ -190,14 +190,6 @@ public class UserController { userService.deleteProjectMember(projectId, userId); } - /* - * 修改当前用户密码 - * */ - @PostMapping("/update/password") - @MsAuditLog(module = OperLogModule.SYSTEM_USER, type = OperLogConstants.UPDATE, title = "个人密码") - public int updateCurrentUserPassword(@RequestBody EditPassWordRequest request) { - return userService.updateCurrentUserPassword(request); - } /*管理员修改用户密码*/ @PostMapping("/special/password")