From c0d430f4e5adf08129c2610d9d2b5446bb19c0d6 Mon Sep 17 00:00:00 2001 From: XCSDN Date: Thu, 7 Apr 2022 04:57:56 +0000 Subject: [PATCH] =?UTF-8?q?update=20ruoyi-common/src/main/java/com/ruoyi/c?= =?UTF-8?q?ommon/core/domain/entity/SysDictType.java.=20=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=BF=85=E9=A1=BB=E4=BB=A5=E5=AD=97=E6=AF=8D?= =?UTF-8?q?=E5=BC=80=E5=A4=B4,=E4=B8=94=E5=AD=97=E5=85=B8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=8F=AA=E8=83=BD=E7=94=B1=E5=B0=8F=E5=86=99=E5=AD=97?= =?UTF-8?q?=E6=AF=8D=E6=88=96=E5=8A=A0=E4=B8=8B=E5=88=92=E7=BA=BF=E8=BF=98?= =?UTF-8?q?=E6=9C=89=E6=95=B0=E5=AD=97=E7=BB=84=E6=88=90=20=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E7=94=B1=E4=BA=8E=E5=AD=97=E5=85=B8=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=8D=E7=AC=A6=E5=90=88=E5=89=8D=E7=AB=AF=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E8=80=8C=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/core/domain/entity/SysDictType.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java index 6683c9194..027c6e956 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java @@ -1,5 +1,6 @@ package com.ruoyi.common.core.domain.entity; +import javax.validation.constraints.Pattern; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -26,6 +27,9 @@ public class SysDictType extends BaseEntity private String dictName; /** 字典类型 */ + @NotBlank(message = "字典类型不能为空") + @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且字典类型只能由小写字母或加下划线还有数字组成") + @Size(min = 2, max = 200, message = "字典类型长度必须在2-200个字符之间") @Excel(name = "字典类型") private String dictType;