wwh 1 неделя назад
Родитель
Сommit
07ec3f710c

+ 1 - 1
baqing-admin/src/main/java/com/ruoyi/web/modules/prosperity/domain/BizCommonProsperityProject.java

@@ -19,7 +19,7 @@ public class BizCommonProsperityProject extends BaseEntity
19 19
     private Long id;
20 20
 
21 21
     @NotBlank(message = "项目名称不能为空")
22
-    @Size(min = 1, max = 20, message = "项目名称长度为1到20个字符")
22
+    @Size(min = 1, max = 64, message = "项目名称长度为1到64个字符")
23 23
     private String projectName;
24 24
 
25 25
     @NotNull(message = "项目类型不能为空")

+ 2 - 2
baqing-admin/src/main/java/com/ruoyi/web/modules/prosperity/support/CommonProsperityProjectValidation.java

@@ -83,9 +83,9 @@ public final class CommonProsperityProjectValidation
83 83
 
84 84
     public static void validateProjectName(String projectName)
85 85
     {
86
-        if (StringUtils.isEmpty(projectName) || projectName.length() < 1 || projectName.length() > 20)
86
+        if (StringUtils.isEmpty(projectName) || projectName.length() < 1 || projectName.length() > 64)
87 87
         {
88
-            throw new ServiceException("项目名称须为1~20个字符");
88
+            throw new ServiceException("项目名称须为1~64个字符");
89 89
         }
90 90
     }
91 91
 

+ 1 - 1
baqing-admin/src/test/java/com/ruoyi/web/modules/prosperity/controller/BizCommonProsperityProjectControllerApiTest.java

@@ -177,7 +177,7 @@ class BizCommonProsperityProjectControllerApiTest
177 177
     void api009_addBadName() throws Exception
178 178
     {
179 179
         when(bizCommonProsperityProjectService.insertBizCommonProsperityProject(any()))
180
-                .thenThrow(new ServiceException("项目名称须为1~20个字符"));
180
+                .thenThrow(new ServiceException("项目名称须为1~64个字符"));
181 181
         BizCommonProsperityProject body = sample(null);
182 182
         body.setProjectName("");
183 183
         mockMvc.perform(post("/commonProsperity/project")

+ 2 - 2
baqing-admin/src/test/java/com/ruoyi/web/modules/prosperity/support/CommonProsperityProjectValidationTest.java

@@ -27,9 +27,9 @@ class CommonProsperityProjectValidationTest
27 27
     void ut005_projectName()
28 28
     {
29 29
         assertThrows(ServiceException.class, () -> CommonProsperityProjectValidation.validateProjectName(""));
30
-        assertThrows(ServiceException.class, () -> CommonProsperityProjectValidation.validateProjectName(longStr(21)));
30
+        assertThrows(ServiceException.class, () -> CommonProsperityProjectValidation.validateProjectName(longStr(65)));
31 31
         assertDoesNotThrow(() -> CommonProsperityProjectValidation.validateProjectName("项"));
32
-        assertDoesNotThrow(() -> CommonProsperityProjectValidation.validateProjectName(longStr(20)));
32
+        assertDoesNotThrow(() -> CommonProsperityProjectValidation.validateProjectName(longStr(64)));
33 33
     }
34 34
 
35 35
     @Test

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
doc/共同富裕/共同富裕项目/共同富裕项目-草稿.md


+ 2 - 1
doc/共同富裕/共同富裕项目/共同富裕项目前端技术方案.md

@@ -8,10 +8,11 @@
8 8
 
9 9
 ## 表单
10 10
 
11
-- 必填:名称、类型、实施年限、运营图片 1~3
11
+- 必填:名称(1~64 字)、类型、实施年限、运营图片 1~3
12 12
 - 选填:简介、建设规模及内容、投资金额、实施情况、视频、封面
13 13
 - 新增默认 `implYear = 当前年`
14 14
 - 年份下拉:当前年及向前共 5 年(`[当前年-4, 当前年]`,不含未来年)
15
+- 表单 `projectName`:`maxlength=64`,校验 `min:1,max:64`
15 16
 
16 17
 ## 筛选 / 列表
17 18
 

+ 1 - 1
doc/共同富裕/共同富裕项目/共同富裕项目功能需求.md

@@ -26,7 +26,7 @@
26 26
 
27 27
 | 字段 | 规则 |
28 28
 | --- | --- |
29
-| 项目名称 | 必填;1~20 字 |
29
+| 项目名称 | 必填;1~64 字 |
30 30
 | 项目类型 | 必填;上表三类 |
31 31
 | 项目简介 | **选填**;≤50 字 |
32 32
 | 建设规模及内容 | **选填**;≤500 字(原「项目内容」更名) |

+ 1 - 0
doc/共同富裕/共同富裕项目/共同富裕项目技术方案.md

@@ -8,6 +8,7 @@
8 8
 
9 9
 | 列 | 说明 |
10 10
 | --- | --- |
11
+| `project_name` | 项目名称(**1~64** 字,`varchar(64)`) |
11 12
 | `project_type` | 1 和美乡村建设 / 2 人居环境整治提升 / 3 其他项目投入 |
12 13
 | `introduction` | 选填 |
13 14
 | `project_content` | 建设规模及内容(选填) |

+ 1 - 1
doc/共同富裕/共同富裕项目/共同富裕项目管理测试用例.md

@@ -4,7 +4,7 @@
4 4
 
5 5
 | 编号 | 场景 | 期望 |
6 6
 | --- | --- | --- |
7
-| UT-005 | 项目名称长度 | 空/超 20 失败;1~20 通过 |
7
+| UT-005 | 项目名称长度 | 空/超 64 失败;1~64 通过 |
8 8
 | UT-006 | 项目类型 | 仅 1~3 |
9 9
 | UT-007 | 简介选填 / 内容必填 | 简介可空;内容 1~500 |
10 10
 | UT-008 | 实施年限 | 必填;`<当前年-4` 或 `>当前年` 失败;边界通过 |