From b471a051816c42c3ac5b05a1b2ab1a6fb3de8c14 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Thu, 24 Apr 2025 11:39:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/njcn/gather/pojo/constant/DetectionValidMessage.java | 2 +- .../njcn/gather/system/dictionary/pojo/param/DictTreeParam.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/detection/src/main/java/com/njcn/gather/pojo/constant/DetectionValidMessage.java b/detection/src/main/java/com/njcn/gather/pojo/constant/DetectionValidMessage.java index 40feb562..b5fc68e5 100644 --- a/detection/src/main/java/com/njcn/gather/pojo/constant/DetectionValidMessage.java +++ b/detection/src/main/java/com/njcn/gather/pojo/constant/DetectionValidMessage.java @@ -10,7 +10,7 @@ public interface DetectionValidMessage { String ID_NOT_BLANK = "id不能为空,请检查id参数"; String ID_FORMAT_ERROR = "id格式错误,请检查id参数"; String NAME_NOT_BLANK = "名称不能为空"; - String ICD_NAME_FORMAT_ERROR = "名称格式错误,只能包含字母、数字、中文、下划线、中划线、点号、空格,长度为1-32个字符"; + String ICD_NAME_FORMAT_ERROR = "名称格式错误,只能包含字母、数字、中文、下划线、中划线、点号、空格、英文括号,长度为1-32个字符"; String ICD_PATH_NOT_BLANK = "icd存储路径不能为空"; String ICD_PATH_FORMAT_ERROR = "ICD路径格式错误,只能包含字母、数字、下划线、中划线、空格,长度为1-50个字符"; String ICD_NOT_BLANK = "ICD不能为空"; diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTreeParam.java b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTreeParam.java index 25d8c515..d502b2f5 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTreeParam.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/param/DictTreeParam.java @@ -28,6 +28,7 @@ public class DictTreeParam { */ @ApiModelProperty(value = "名称") @NotBlank(message = SystemValidMessage.NAME_NOT_BLANK) + @Pattern(regexp = PatternRegex.DICT_NAME_REGEX, message = SystemValidMessage.DICT_TYPE_NAME_FORMAT_ERROR) private String name; /** @@ -35,6 +36,7 @@ public class DictTreeParam { */ @TableField(value = "编码") @NotBlank(message = SystemValidMessage.CODE_NOT_BLANK) + @Pattern(regexp = PatternRegex.DICT_CODE_REGEX, message = SystemValidMessage.DICT_TYPE_CODE_FORMAT_ERROR) private String code; /**