From c14d9e1eba68d0127d19a8bd4e0fc80be5ad3138 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期二, 11 十一月 2025 18:13:07 +0800
Subject: [PATCH] 大屏接口校验规则

---
 ruoyi-system/src/main/java/com/ruoyi/system/model/TLargeSocialWorker.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/model/TLargeSocialWorker.java b/ruoyi-system/src/main/java/com/ruoyi/system/model/TLargeSocialWorker.java
index 6220a83..531ae9f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/model/TLargeSocialWorker.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/model/TLargeSocialWorker.java
@@ -7,7 +7,9 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.hibernate.validator.constraints.Length;
 
+import javax.validation.constraints.Pattern;
 import java.io.Serializable;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -31,6 +33,7 @@
     @TableId(value = "id", type = IdType.ASSIGN_ID)
     private String id;
 
+    @Length(max = 20,message = "姓名不能超过20个字符")
     @ApiModelProperty(value = "姓名")
     @TableField("user_name")
     private String userName;
@@ -44,18 +47,22 @@
     @TableField("birth_date")
     private LocalDate birthDate;
 
+    @Length(max = 20,message = "文化程度不能超过20个字符")
     @ApiModelProperty(value = "文化程度")
     @TableField("educational_level")
     private String educationalLevel;
 
+    @Length(max = 20,message = "政治面貌不能超过20个字符")
     @ApiModelProperty(value = "政治面貌")
     @TableField("political_status")
     private String politicalStatus;
 
+    @Pattern(regexp = "^1[3-9]\\\\d{9}$",message = "手机号格式不正确")
     @ApiModelProperty(value = "联系电话")
     @TableField("contact_number")
     private String contactNumber;
 
+    @Length(max = 40,message = "工作单位及职务不能超过40个字符")
     @ApiModelProperty(value = "工作单位及职务")
     @TableField("employer_position")
     private String employerPosition;

--
Gitblit v1.7.1