From 977e9a119cc9cfb071b28a781f795c50b37c9bb5 Mon Sep 17 00:00:00 2001 From: bleachtred Date: Tue, 26 Sep 2023 11:10:46 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8E=BB=E9=99=A4groups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/system/SysProfileController.java | 3 +-- .../java/org/dromara/system/domain/bo/SysUserPasswordBo.java | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysProfileController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysProfileController.java index 36411b7b..c9be0da0 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysProfileController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysProfileController.java @@ -6,7 +6,6 @@ import cn.hutool.core.io.FileUtil; import org.dromara.common.core.domain.R; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.core.utils.file.MimeTypeUtils; -import org.dromara.common.core.validate.auth.PasswordGroup; import org.dromara.common.log.annotation.Log; import org.dromara.common.log.enums.BusinessType; import org.dromara.common.satoken.utils.LoginHelper; @@ -82,7 +81,7 @@ public class SysProfileController extends BaseController { */ @Log(title = "个人信息", businessType = BusinessType.UPDATE) @PutMapping("/updatePwd") - public R updatePwd(@Validated(PasswordGroup.class) @RequestBody SysUserPasswordBo bo) { + public R updatePwd(@Validated @RequestBody SysUserPasswordBo bo) { SysUserVo user = userService.selectUserById(LoginHelper.getUserId()); String password = user.getPassword(); if (!BCrypt.checkpw(bo.getOldPassword(), password)) { diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysUserPasswordBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysUserPasswordBo.java index 298ea3a3..8615fcda 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysUserPasswordBo.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysUserPasswordBo.java @@ -2,7 +2,6 @@ package org.dromara.system.domain.bo; import jakarta.validation.constraints.NotBlank; import lombok.Data; -import org.dromara.common.core.validate.auth.PasswordGroup; import java.io.Serial; import java.io.Serializable; @@ -19,12 +18,12 @@ public class SysUserPasswordBo implements Serializable { /** * 旧密码 */ - @NotBlank(message = "旧密码不能为空", groups = { PasswordGroup.class }) + @NotBlank(message = "旧密码不能为空") private String oldPassword; /** * 新密码 */ - @NotBlank(message = "新密码不能为空", groups = { PasswordGroup.class }) + @NotBlank(message = "新密码不能为空") private String newPassword; }