diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js
index b1322edd5..cf0f007d5 100644
--- a/ruoyi-ui/src/api/system/user.js
+++ b/ruoyi-ui/src/api/system/user.js
@@ -104,9 +104,9 @@ export function updateUserPwd(oldPassword, newPassword) {
newPassword
}
return request({
- url: '/system/user/profile/updatePwd',
+ url: '/system/user/profile/update-password',
method: 'put',
- params: data
+ data: data
})
}
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index fd0f99e23..8c836c28f 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -107,8 +107,7 @@
- * 类描述:更新用户个人密码
- *
- * @author deng on 2021/3/15 22:04
- */
-@ApiModel("用户个人中心更新密码 Response VO")
+@ApiModel("用户个人中心更新密码 Request VO")
@Data
-public class SysUserProfileUpdatePasswordReqVo {
-
- @ApiModelProperty(value = "用户编号", required = true, example = "1024")
- @NotNull(message = "用户编号不能为空")
- private Long id;
+public class SysUserProfileUpdatePasswordReqVO {
@ApiModelProperty(value = "旧密码", required = true, example = "123456")
@NotEmpty(message = "旧密码不能为空")
@@ -33,4 +20,5 @@ public class SysUserProfileUpdatePasswordReqVo {
@NotEmpty(message = "新密码不能为空")
@Length(min = 4, max = 16, message = "密码长度为 4-16 位")
private String newPassword;
-}
\ No newline at end of file
+
+}
diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java b/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java
index bb8b5c4bf..1f02e553f 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/profile/SysUserProfileUpdateReqVO.java
@@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.Email;
-import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
@@ -13,17 +12,13 @@ import javax.validation.constraints.Size;
@Data
public class SysUserProfileUpdateReqVO {
- @ApiModelProperty(value = "用户编号", required = true, example = "1024")
- @NotNull(message = "用户编号不能为空")
- private Long id;
-
@ApiModelProperty(value = "用户昵称", required = true, example = "芋艿")
@Size(max = 30, message = "用户昵称长度不能超过30个字符")
private String nickname;
@ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn")
@Email(message = "邮箱格式不正确")
- @Size(max = 50, message = "邮箱长度不能超过50个字符")
+ @Size(max = 50, message = "邮箱长度不能超过 50 个字符")
private String email;
@ApiModelProperty(value = "手机号码", example = "15601691300")
@@ -33,7 +28,4 @@ public class SysUserProfileUpdateReqVO {
@ApiModelProperty(value = "用户性别", example = "1", notes = "参见 SysSexEnum 枚举类")
private Integer sex;
- @ApiModelProperty(value = "用户头像", example = "http://www.iocoder.cn/xxx.png")
- private String avatar;
-
}
diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserBaseVO.java b/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserBaseVO.java
index 619f11f31..7361bb342 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserBaseVO.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserBaseVO.java
@@ -36,7 +36,7 @@ public class SysUserBaseVO {
@ApiModelProperty(value = "用户邮箱", example = "yudao@iocoder.cn")
@Email(message = "邮箱格式不正确")
- @Size(max = 50, message = "邮箱长度不能超过50个字符")
+ @Size(max = 50, message = "邮箱长度不能超过 50 个字符")
private String email;
@ApiModelProperty(value = "手机号码", example = "15601691300")
diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java b/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java
index 9fdcf033c..dc6963c58 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/system/controller/user/vo/user/SysUserPageItemRespVO.java
@@ -1,6 +1,5 @@
package cn.iocoder.dashboard.modules.system.controller.user.vo.user;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
@@ -18,7 +17,6 @@ public class SysUserPageItemRespVO extends SysUserRespVO {
/**
* 所在部门
*/
- @JsonIgnore
private Dept dept;
@ApiModel("部门")
diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java
index 12f406604..48c909534 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/system/convert/auth/SysAuthConvert.java
@@ -3,7 +3,7 @@ package cn.iocoder.dashboard.modules.system.convert.auth;
import cn.iocoder.dashboard.framework.security.core.LoginUser;
import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthMenuRespVO;
import cn.iocoder.dashboard.modules.system.controller.auth.vo.auth.SysAuthPermissionInfoRespVO;
-import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVo;
+import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO;
import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO;
import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysMenuDO;
import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO;
@@ -42,7 +42,7 @@ public interface SysAuthConvert {
LoginUser convert(SysUserProfileUpdateReqVO reqVO);
- LoginUser convert(SysUserProfileUpdatePasswordReqVo reqVO);
+ LoginUser convert(SysUserProfileUpdatePasswordReqVO reqVO);
/**
* 将菜单列表,构建成菜单树
diff --git a/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java b/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java
index aeaec2be8..fd4a8b9d3 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/system/convert/user/SysUserConvert.java
@@ -1,19 +1,18 @@
package cn.iocoder.dashboard.modules.system.convert.user;
import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileRespVO;
-import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVo;
+import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdatePasswordReqVO;
import cn.iocoder.dashboard.modules.system.controller.user.vo.profile.SysUserProfileUpdateReqVO;
-import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserCreateReqVO;
-import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserExcelVO;
-import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserImportExcelVO;
-import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserPageItemRespVO;
-import cn.iocoder.dashboard.modules.system.controller.user.vo.user.SysUserUpdateReqVO;
+import cn.iocoder.dashboard.modules.system.controller.user.vo.user.*;
import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysDeptDO;
+import cn.iocoder.dashboard.modules.system.dal.dataobject.dept.SysPostDO;
import cn.iocoder.dashboard.modules.system.dal.dataobject.permission.SysRoleDO;
import cn.iocoder.dashboard.modules.system.dal.dataobject.user.SysUserDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
+import java.util.List;
+
@Mapper
public interface SysUserConvert {
@@ -33,11 +32,14 @@ public interface SysUserConvert {
SysUserProfileRespVO convert03(SysUserDO bean);
- SysUserProfileRespVO.Role convert(SysRoleDO bean);
+ List