@Length to @Size
This commit is contained in:
@@ -7,7 +7,7 @@ import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
@@ -77,7 +77,7 @@ public class MsgInner extends DataEntity<MsgInner> {
|
||||
}
|
||||
|
||||
@NotBlank(message="消息标题不能为空")
|
||||
@Length(min=0, max=200, message="消息标题长度不能超过 200 个字符")
|
||||
@Size(min=0, max=200, message="消息标题长度不能超过 200 个字符")
|
||||
public String getMsgTitle() {
|
||||
return msgTitle;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class MsgInner extends DataEntity<MsgInner> {
|
||||
}
|
||||
|
||||
@NotBlank(message="内容级别不能为空")
|
||||
@Length(min=0, max=1, message="内容级别长度不能超过 1 个字符")
|
||||
@Size(min=0, max=1, message="内容级别长度不能超过 1 个字符")
|
||||
public String getContentLevel() {
|
||||
return contentLevel;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class MsgInner extends DataEntity<MsgInner> {
|
||||
this.contentLevel = contentLevel;
|
||||
}
|
||||
|
||||
@Length(min=0, max=1, message="内容类型长度不能超过 1 个字符")
|
||||
@Size(min=0, max=1, message="内容类型长度不能超过 1 个字符")
|
||||
public String getContentType() {
|
||||
return contentType;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public class MsgInner extends DataEntity<MsgInner> {
|
||||
}
|
||||
|
||||
@NotBlank(message="接受者类型不能为空")
|
||||
@Length(min=0, max=1, message="接受者类型长度不能超过 1 个字符")
|
||||
@Size(min=0, max=1, message="接受者类型长度不能超过 1 个字符")
|
||||
public String getReceiveType() {
|
||||
return receiveType;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class MsgInner extends DataEntity<MsgInner> {
|
||||
this.receiveNames = receiveNames;
|
||||
}
|
||||
|
||||
@Length(min=0, max=64, message="发送者用户编码长度不能超过 64 个字符")
|
||||
@Size(min=0, max=64, message="发送者用户编码长度不能超过 64 个字符")
|
||||
public String getSendUserCode() {
|
||||
return sendUserCode;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public class MsgInner extends DataEntity<MsgInner> {
|
||||
this.sendUserCode = sendUserCode;
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="发送者用户姓名长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="发送者用户姓名长度不能超过 100 个字符")
|
||||
public String getSendUserName() {
|
||||
return sendUserName;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public class MsgInner extends DataEntity<MsgInner> {
|
||||
sqlMap.getWhere().and("send_date", QueryType.LTE, sendDate);
|
||||
}
|
||||
|
||||
@Length(min=0, max=1, message="是否有附件长度不能超过 1 个字符")
|
||||
@Size(min=0, max=1, message="是否有附件长度不能超过 1 个字符")
|
||||
public String getIsAttac() {
|
||||
return isAttac;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ public class MsgInner extends DataEntity<MsgInner> {
|
||||
this.isAttac = isAttac;
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="通知类型长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="通知类型长度不能超过 100 个字符")
|
||||
public String getNotifyTypes() {
|
||||
return notifyTypes;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Date;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
@@ -53,7 +53,7 @@ public class MsgInnerRecord extends DataEntity<MsgInnerRecord> {
|
||||
}
|
||||
|
||||
@NotBlank(message="所属消息不能为空")
|
||||
@Length(min=0, max=64, message="所属消息长度不能超过 64 个字符")
|
||||
@Size(min=0, max=64, message="所属消息长度不能超过 64 个字符")
|
||||
public String getMsgInnerId() {
|
||||
return msgInnerId;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class MsgInnerRecord extends DataEntity<MsgInnerRecord> {
|
||||
this.msgInnerId = msgInnerId;
|
||||
}
|
||||
|
||||
@Length(min=0, max=64, message="接受者用户编码长度不能超过 64 个字符")
|
||||
@Size(min=0, max=64, message="接受者用户编码长度不能超过 64 个字符")
|
||||
public String getReceiveUserCode() {
|
||||
return receiveUserCode;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class MsgInnerRecord extends DataEntity<MsgInnerRecord> {
|
||||
}
|
||||
|
||||
@NotBlank(message="接受者用户姓名不能为空")
|
||||
@Length(min=0, max=100, message="接受者用户姓名长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="接受者用户姓名长度不能超过 100 个字符")
|
||||
public String getReceiveUserName() {
|
||||
return receiveUserName;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public class MsgInnerRecord extends DataEntity<MsgInnerRecord> {
|
||||
}
|
||||
|
||||
@NotBlank(message="读取状态不能为空")
|
||||
@Length(min=0, max=1, message="读取状态长度不能超过 1 个字符")
|
||||
@Size(min=0, max=1, message="读取状态长度不能超过 1 个字符")
|
||||
public String getReadStatus() {
|
||||
return readStatus;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class MsgInnerRecord extends DataEntity<MsgInnerRecord> {
|
||||
this.readDate = readDate;
|
||||
}
|
||||
|
||||
@Length(min=0, max=1, message="是否标星长度不能超过 1 个字符")
|
||||
@Size(min=0, max=1, message="是否标星长度不能超过 1 个字符")
|
||||
public String getIsStar() {
|
||||
return isStar;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
package com.jeesite.modules.sys.entity;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
@@ -59,7 +59,7 @@ public class Area extends TreeEntity<Area> {
|
||||
}
|
||||
|
||||
@NotBlank(message="名称不能为空")
|
||||
@Length(min=0, max=100, message="名称长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="名称长度不能超过 100 个字符")
|
||||
public String getAreaName() {
|
||||
return areaName;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public class Area extends TreeEntity<Area> {
|
||||
}
|
||||
|
||||
@NotBlank(message="类型不能为空")
|
||||
@Length(min=0, max=1, message="类型长度不能超过 1 个字符")
|
||||
@Size(min=0, max=1, message="类型长度不能超过 1 个字符")
|
||||
public String getAreaType() {
|
||||
return areaType;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
@@ -98,7 +98,7 @@ public class Company extends TreeEntity<Company> {
|
||||
}
|
||||
|
||||
@NotBlank(message="公司名称不能为空")
|
||||
@Length(min=0, max=200, message="公司名称长度不能超过 200 个字符")
|
||||
@Size(min=0, max=200, message="公司名称长度不能超过 200 个字符")
|
||||
public String getCompanyName() {
|
||||
return companyName;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class Company extends TreeEntity<Company> {
|
||||
}
|
||||
|
||||
@NotBlank(message="公司全称不能为空")
|
||||
@Length(min=0, max=200, message="公司全称长度不能超过 200 个字符")
|
||||
@Size(min=0, max=200, message="公司全称长度不能超过 200 个字符")
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.List;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.entity.BaseEntity;
|
||||
@@ -78,7 +78,7 @@ public class Employee extends DataEntity<Employee> {
|
||||
this.empCode = empCode;
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="工号长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="工号长度不能超过 100 个字符")
|
||||
public String getEmpNo() {
|
||||
return empNo;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ public class Employee extends DataEntity<Employee> {
|
||||
this.empNo = empNo;
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="名称长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="名称长度不能超过 100 个字符")
|
||||
public String getEmpName() {
|
||||
return empName;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class Employee extends DataEntity<Employee> {
|
||||
this.empName = empName;
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="英文名长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="英文名长度不能超过 100 个字符")
|
||||
public String getEmpNameEn() {
|
||||
return empNameEn;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
package com.jeesite.modules.sys.entity;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
@@ -75,7 +75,7 @@ public class EmployeeOffice extends DataEntity<EmployeeOffice> {
|
||||
this.officeCode = officeCode;
|
||||
}
|
||||
|
||||
@Length(min=0, max=64, message="岗位编码长度不能超过 64 个字符")
|
||||
@Size(min=0, max=64, message="岗位编码长度不能超过 64 个字符")
|
||||
public String getPostCode() {
|
||||
return postCode;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
@@ -87,7 +87,7 @@ public class Log extends DataEntity<Log> {
|
||||
}
|
||||
|
||||
@NotBlank(message="日志类型不能为空")
|
||||
@Length(min=0, max=1, message="日志类型长度不能超过 1 个字符")
|
||||
@Size(min=0, max=1, message="日志类型长度不能超过 1 个字符")
|
||||
public String getLogType() {
|
||||
return logType;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public class Log extends DataEntity<Log> {
|
||||
}
|
||||
|
||||
@NotBlank(message="日志标题不能为空")
|
||||
@Length(min=0, max=500, message="日志标题长度不能超过 500 个字符")
|
||||
@Size(min=0, max=500, message="日志标题长度不能超过 500 个字符")
|
||||
public String getLogTitle() {
|
||||
return logTitle;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class Log extends DataEntity<Log> {
|
||||
this.logTitle = logTitle;
|
||||
}
|
||||
|
||||
@Length(min=0, max=500, message="请求URI长度不能超过 500 个字符")
|
||||
@Size(min=0, max=500, message="请求URI长度不能超过 500 个字符")
|
||||
public String getRequestUri() {
|
||||
return requestUri;
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public class Log extends DataEntity<Log> {
|
||||
this.requestUri = requestUri;
|
||||
}
|
||||
|
||||
@Length(min=0, max=10, message="操作方式长度不能超过 10 个字符")
|
||||
@Size(min=0, max=10, message="操作方式长度不能超过 10 个字符")
|
||||
public String getRequestMethod() {
|
||||
return requestMethod;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class Log extends DataEntity<Log> {
|
||||
this.diffModifyData = diffModifyData;
|
||||
}
|
||||
|
||||
@Length(min=0, max=64, message="业务主键长度不能超过 64 个字符")
|
||||
@Size(min=0, max=64, message="业务主键长度不能超过 64 个字符")
|
||||
public String getBizKey() {
|
||||
return bizKey;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public class Log extends DataEntity<Log> {
|
||||
this.bizKey = bizKey;
|
||||
}
|
||||
|
||||
@Length(min=0, max=64, message="业务类型长度不能超过 64 个字符")
|
||||
@Size(min=0, max=64, message="业务类型长度不能超过 64 个字符")
|
||||
public String getBizType() {
|
||||
return bizType;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public class Log extends DataEntity<Log> {
|
||||
}
|
||||
|
||||
@NotBlank(message="操作IP地址不能为空")
|
||||
@Length(min=0, max=255, message="操作IP地址长度不能超过 255 个字符")
|
||||
@Size(min=0, max=255, message="操作IP地址长度不能超过 255 个字符")
|
||||
public String getRemoteAddr() {
|
||||
return remoteAddr;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ public class Log extends DataEntity<Log> {
|
||||
}
|
||||
|
||||
@NotBlank(message="请求服务器地址不能为空")
|
||||
@Length(min=0, max=255, message="请求服务器地址长度不能超过 255 个字符")
|
||||
@Size(min=0, max=255, message="请求服务器地址长度不能超过 255 个字符")
|
||||
public String getServerAddr() {
|
||||
return serverAddr;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ public class Log extends DataEntity<Log> {
|
||||
this.exceptionInfo = exceptionInfo;
|
||||
}
|
||||
|
||||
@Length(min=0, max=500, message="用户代理长度不能超过 500 个字符")
|
||||
@Size(min=0, max=500, message="用户代理长度不能超过 500 个字符")
|
||||
public String getUserAgent() {
|
||||
return userAgent;
|
||||
}
|
||||
@@ -203,7 +203,7 @@ public class Log extends DataEntity<Log> {
|
||||
this.userAgent = userAgent;
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="设备名称/操作系统长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="设备名称/操作系统长度不能超过 100 个字符")
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public class Log extends DataEntity<Log> {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="浏览器名称长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="浏览器名称长度不能超过 100 个字符")
|
||||
public String getBrowserName() {
|
||||
return browserName;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ package com.jeesite.modules.sys.entity;
|
||||
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
@@ -94,7 +94,7 @@ public class Office extends TreeEntity<Office> {
|
||||
}
|
||||
|
||||
@NotBlank(message="机构名称不能为空")
|
||||
@Length(min=0, max=100, message="机构名称长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="机构名称长度不能超过 100 个字符")
|
||||
public String getOfficeName() {
|
||||
return officeName;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class Office extends TreeEntity<Office> {
|
||||
}
|
||||
|
||||
@NotBlank(message="机构全称不能为空")
|
||||
@Length(min=0, max=200, message="机构全称长度不能超过 200 个字符")
|
||||
@Size(min=0, max=200, message="机构全称长度不能超过 200 个字符")
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public class Office extends TreeEntity<Office> {
|
||||
}
|
||||
|
||||
@NotBlank(message="机构类型不能为空")
|
||||
@Length(min=0, max=1, message="机构类型长度不能超过 1 个字符")
|
||||
@Size(min=0, max=1, message="机构类型长度不能超过 1 个字符")
|
||||
public String getOfficeType() {
|
||||
return officeType;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public class Office extends TreeEntity<Office> {
|
||||
sqlMap.getWhere().and("office_type", QueryType.IN, officeTypes);
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="负责人长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="负责人长度不能超过 100 个字符")
|
||||
public String getLeader() {
|
||||
return leader;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class Office extends TreeEntity<Office> {
|
||||
this.leader = leader;
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="电话长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="电话长度不能超过 100 个字符")
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public class Office extends TreeEntity<Office> {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
@Length(min=0, max=255, message="联系地址长度不能超过 255 个字符")
|
||||
@Size(min=0, max=255, message="联系地址长度不能超过 255 个字符")
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ public class Office extends TreeEntity<Office> {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="邮政编码长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="邮政编码长度不能超过 100 个字符")
|
||||
public String getZipCode() {
|
||||
return zipCode;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ public class Office extends TreeEntity<Office> {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
|
||||
@Length(min=0, max=200, message="邮箱长度不能超过 200 个字符")
|
||||
@Size(min=0, max=200, message="邮箱长度不能超过 200 个字符")
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
package com.jeesite.modules.sys.entity;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import javax.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.jeesite.common.entity.BaseEntity;
|
||||
@@ -48,7 +48,7 @@ public class Post extends DataEntity<Post> {
|
||||
}
|
||||
|
||||
@NotBlank(message="岗位名称不能为空")
|
||||
@Length(min=0, max=100, message="岗位名称长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="岗位名称长度不能超过 100 个字符")
|
||||
public String getPostName() {
|
||||
return postName;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class Post extends DataEntity<Post> {
|
||||
getSqlMap().getWhere().and("post_name", QueryType.LIKE, roleName);
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="岗位分类长度不能超过 100 个字符")
|
||||
@Size(min=0, max=100, message="岗位分类长度不能超过 100 个字符")
|
||||
public String getPostType() {
|
||||
return postType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user