From a887c364f97b1f8a4efca116045d05e62c6fc62b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 27 Oct 2024 16:22:58 +0800 Subject: [PATCH] =?UTF-8?q?146=20=E3=80=90=E5=8A=9F=E8=83=BD=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E3=80=91=E4=BC=9A=E5=91=98=EF=BC=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=B3=A8=E5=86=8C=E6=97=B6=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=20username=20=E4=B8=BA=E7=A9=BA=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/api/logger/dto/LoginLogCreateReqDTO.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java index 795c80702..7a83c0965 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/logger/dto/LoginLogCreateReqDTO.java @@ -1,12 +1,10 @@ package cn.iocoder.yudao.module.system.api.logger.dto; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; +import lombok.Data; @Schema(description = "RPC 服务 - 登录日志创建 Request DTO") @Data @@ -24,10 +22,9 @@ public class LoginLogCreateReqDTO { @Schema(description = "用户类型,参见 UserTypeEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "2" ) @NotNull(message = "用户类型不能为空") private Integer userType; - @Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao") - @NotBlank(message = "用户账号不能为空") + @Schema(description = "用户账号", example = "yudao") @Size(max = 30, message = "用户账号长度不能超过30个字符") - private String username; + private String username; // 不再强制校验 username 非空,因为 Member 社交登录时,此时暂时没有 username(mobile)! @Schema(description = "登录结果,参见 LoginResultEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "登录结果不能为空")