diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java index 75f7f0cf9..0453fa4b3 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserBaseVO.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.member.controller.admin.user.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import org.hibernate.validator.constraints.URL; import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotNull; @@ -28,6 +29,10 @@ public class MemberUserBaseVO { @NotNull(message = "用户昵称不能为空") private String nickname; + @Schema(description = "头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/x.png") + @URL(message = "头像必须是 URL 格式") + private String avatar; + @Schema(description = "用户昵称", example = "李四") private String name; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserRespVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserRespVO.java index f7dcf7497..1f624af54 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserRespVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/MemberUserRespVO.java @@ -1,9 +1,10 @@ package cn.iocoder.yudao.module.member.controller.admin.user.vo; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; -import javax.validation.constraints.NotNull; import java.time.LocalDateTime; @Schema(description = "管理后台 - 会员用户 Response VO") @@ -24,10 +25,6 @@ public class MemberUserRespVO extends MemberUserBaseVO { @Schema(description = "最后登录时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime loginDate; - @Schema(description = "头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/x.png") - @NotNull(message = "头像不能为空") - private String avatar; - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime;