From 693a33f660891c98b8b95490d020c428c5da9871 Mon Sep 17 00:00:00 2001 From: 抓蛙师 <770492966@qq.com> Date: 星期一, 19 九月 2022 21:46:32 +0800 Subject: [PATCH] 完善功能:前端可以配置多排序参数支持依次排序 如:{isAsc:"asc",orderByColumn:"id"} {isAsc:"asc",orderByColumn:"id,createTime"} {isAsc:"asc,desc",orderByColumn:"id,createTime"} 共三种配置方式 --- ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java | 111 +++++++++++++++++++++---------------------------------- 1 files changed, 42 insertions(+), 69 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java index 583b7a6..4a4cfb5 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java @@ -1,69 +1,42 @@ -package com.ruoyi.common.core.domain.model; - -/** - * 鐢ㄦ埛鐧诲綍瀵硅薄 - * - * @author ruoyi - */ -public class LoginBody -{ - /** - * 鐢ㄦ埛鍚� - */ - private String username; - - /** - * 鐢ㄦ埛瀵嗙爜 - */ - private String password; - - /** - * 楠岃瘉鐮� - */ - private String code; - - /** - * 鍞竴鏍囪瘑 - */ - private String uuid; - - public String getUsername() - { - return username; - } - - public void setUsername(String username) - { - this.username = username; - } - - public String getPassword() - { - return password; - } - - public void setPassword(String password) - { - this.password = password; - } - - public String getCode() - { - return code; - } - - public void setCode(String code) - { - this.code = code; - } - - public String getUuid() - { - return uuid; - } - - public void setUuid(String uuid) - { - this.uuid = uuid; - } -} +package com.ruoyi.common.core.domain.model; + +import com.ruoyi.common.constant.UserConstants; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; + +/** + * 鐢ㄦ埛鐧诲綍瀵硅薄 + * + * @author Lion Li + */ + +@Data +public class LoginBody { + + /** + * 鐢ㄦ埛鍚� + */ + @NotBlank(message = "{user.username.not.blank}") + @Length(min = UserConstants.USERNAME_MIN_LENGTH, max = UserConstants.USERNAME_MAX_LENGTH, message = "{user.username.length.valid}") + private String username; + + /** + * 鐢ㄦ埛瀵嗙爜 + */ + @NotBlank(message = "{user.password.not.blank}") + @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "{user.password.length.valid}") + private String password; + + /** + * 楠岃瘉鐮� + */ + private String code; + + /** + * 鍞竴鏍囪瘑 + */ + private String uuid; + +} -- Gitblit v1.9.3