diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java index cce21d6cd3..bf69f43a9c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java @@ -79,6 +79,7 @@ public class UserProfileController { return success(true); } + @Deprecated // TODO @芋艿:逐步替换到 updateUserProfile 接口 @RequestMapping(value = "/update-avatar", method = {RequestMethod.POST, RequestMethod.PUT}) // 解决 uni-app 不支持 Put 上传文件的问题 @Operation(summary = "上传用户个人头像") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java index 6282d539c8..150fbb9338 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/profile/UserProfileUpdateReqVO.java @@ -6,13 +6,14 @@ import org.hibernate.validator.constraints.Length; import jakarta.validation.constraints.Email; import jakarta.validation.constraints.Size; +import org.hibernate.validator.constraints.URL; @Schema(description = "管理后台 - 用户个人信息更新 Request VO") @Data public class UserProfileUpdateReqVO { - @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @Schema(description = "用户昵称", example = "芋艿") @Size(max = 30, message = "用户昵称长度不能超过 30 个字符") private String nickname; @@ -28,4 +29,8 @@ public class UserProfileUpdateReqVO { @Schema(description = "用户性别,参见 SexEnum 枚举类", example = "1") private Integer sex; + @Schema(description = "角色头像", example = "https://www.iocoder.cn/1.png") + @URL(message = "头像地址格式不正确") + private String avatar; + }