diff --git a/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/constant/RegexConsts.java b/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/constant/RegexConsts.java
index 6cbf5827..c43b2ada 100644
--- a/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/constant/RegexConsts.java
+++ b/continew-admin-common/src/main/java/top/charles7c/cnadmin/common/constant/RegexConsts.java
@@ -31,9 +31,9 @@ import cn.hutool.core.lang.RegexPool;
public class RegexConsts implements RegexPool {
/**
- * 用户名正则(长度为 4 到 16 位,可以包含字母、数字,下划线,以字母开头)
+ * 用户名正则(长度为 4 到 64 位,可以包含字母、数字,下划线,以字母开头)
*/
- public static final String USERNAME = "^[a-zA-Z][a-zA-Z0-9_]{3,15}$";
+ public static final String USERNAME = "^[a-zA-Z][a-zA-Z0-9_]{3,64}$";
/**
* 密码正则(长度为 6 到 32 位,可以包含字母、数字、下划线,特殊字符,同时包含字母和数字)
@@ -41,14 +41,14 @@ public class RegexConsts implements RegexPool {
public static final String PASSWORD = "^(?=.*\\d)(?=.*[a-z]).{6,32}$";
/**
- * 通用编码正则(长度为 2 到 16 位,可以包含字母、数字,下划线,以字母开头)
+ * 通用编码正则(长度为 2 到 30 位,可以包含字母、数字,下划线,以字母开头)
*/
- public static final String GENERAL_CODE = "^[a-zA-Z][a-zA-Z0-9_]{1,15}$";
+ public static final String GENERAL_CODE = "^[a-zA-Z][a-zA-Z0-9_]{1,29}$";
/**
- * 通用名称正则(长度为 1 到 20 位,可以包含中文、字母、数字、下划线,短横线)
+ * 通用名称正则(长度为 2 到 30 位,可以包含中文、字母、数字、下划线,短横线)
*/
- public static final String GENERAL_NAME = "^[\\u4e00-\\u9fa5a-zA-Z0-9_-]{1,20}$";
+ public static final String GENERAL_NAME = "^[\\u4e00-\\u9fa5a-zA-Z0-9_-]{2,30}$";
/**
* 包名正则(可以包含大小写字母、数字、下划线,每一级包名不能以数字开头)
diff --git a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/AnnouncementRequest.java b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/AnnouncementRequest.java
index 5834f329..449cbd68 100644
--- a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/AnnouncementRequest.java
+++ b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/AnnouncementRequest.java
@@ -45,7 +45,7 @@ public class AnnouncementRequest extends BaseRequest {
*/
@Schema(description = "标题", example = "这是公告标题")
@NotBlank(message = "标题不能为空")
- @Length(max = 255, message = "标题长度不能超过 {max} 个字符")
+ @Length(max = 150, message = "标题长度不能超过 {max} 个字符")
private String title;
/**
@@ -60,6 +60,7 @@ public class AnnouncementRequest extends BaseRequest {
*/
@Schema(description = "类型(取值于字典 announcement_type)", example = "1")
@NotBlank(message = "类型不能为空")
+ @Length(max = 30, message = "类型长度不能超过 {max} 个字符")
private String type;
/**
diff --git a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DeptRequest.java b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DeptRequest.java
index e6666213..d1b448d9 100644
--- a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DeptRequest.java
+++ b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DeptRequest.java
@@ -16,6 +16,7 @@
package top.charles7c.cnadmin.system.model.request;
+import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
@@ -55,14 +56,14 @@ public class DeptRequest extends BaseRequest {
*/
@Schema(description = "部门名称", example = "测试部")
@NotBlank(message = "部门名称不能为空")
- @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "部门名称长度为 1 到 20 位,可以包含中文、字母、数字、下划线,短横线")
+ @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "部门名称长度为 2 到 30 位,可以包含中文、字母、数字、下划线,短横线")
private String name;
/**
* 部门排序
*/
@Schema(description = "部门排序", example = "1")
- @NotNull(message = "部门排序不能为空")
+ @Min(value = 1, message = "部门排序最小值为 {value}")
private Integer sort;
/**
diff --git a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DictItemRequest.java b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DictItemRequest.java
index 6154f914..cae108c9 100644
--- a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DictItemRequest.java
+++ b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DictItemRequest.java
@@ -43,6 +43,7 @@ public class DictItemRequest extends BaseRequest {
*/
@Schema(description = "字典标签", example = "通知")
@NotBlank(message = "字典标签不能为空")
+ @Length(max = 30, message = "字典标签长度不能超过 {max} 个字符")
private String label;
/**
@@ -50,18 +51,21 @@ public class DictItemRequest extends BaseRequest {
*/
@Schema(description = "字典值", example = "1")
@NotBlank(message = "字典值不能为空")
+ @Length(max = 30, message = "字典值长度不能超过 {max} 个字符")
private String value;
/**
* 背景颜色
*/
@Schema(description = "背景颜色", example = "blue")
+ @Length(max = 30, message = "背景颜色长度不能超过 {max} 个字符")
private String color;
/**
* 排序
*/
@Schema(description = "排序", example = "1")
+ @Min(value = 1, message = "排序最小值为 {value}")
private Integer sort;
/**
diff --git a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DictRequest.java b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DictRequest.java
index 7403235d..a5882a97 100644
--- a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DictRequest.java
+++ b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/DictRequest.java
@@ -25,6 +25,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import org.hibernate.validator.constraints.Length;
import top.charles7c.cnadmin.common.base.BaseRequest;
+import top.charles7c.cnadmin.common.constant.RegexConsts;
/**
* 创建或修改字典信息
@@ -43,6 +44,7 @@ public class DictRequest extends BaseRequest {
*/
@Schema(description = "字典名称", example = "公告类型")
@NotBlank(message = "字典名称不能为空")
+ @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "字典名称长度为 2 到 30 位,可以包含中文、字母、数字、下划线,短横线")
private String name;
/**
@@ -50,6 +52,7 @@ public class DictRequest extends BaseRequest {
*/
@Schema(description = "字典编码", example = "announcement_type")
@NotBlank(message = "字典编码不能为空")
+ @Pattern(regexp = RegexConsts.GENERAL_CODE, message = "字典编码长度为 2 到 30 位,可以包含字母、数字,下划线,以字母开头")
private String code;
/**
diff --git a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/MenuRequest.java b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/MenuRequest.java
index 595ae258..832e78ca 100644
--- a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/MenuRequest.java
+++ b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/MenuRequest.java
@@ -16,6 +16,7 @@
package top.charles7c.cnadmin.system.model.request;
+import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
@@ -24,6 +25,8 @@ import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
+import org.hibernate.validator.constraints.Length;
+
import top.charles7c.cnadmin.common.base.BaseRequest;
import top.charles7c.cnadmin.common.constant.RegexConsts;
import top.charles7c.cnadmin.common.enums.DisEnableStatusEnum;
@@ -52,6 +55,7 @@ public class MenuRequest extends BaseRequest {
* 菜单图标
*/
@Schema(description = "菜单图标", example = "user")
+ @Length(max = 50, message = "菜单图标长度不能超过 {max} 个字符")
private String icon;
/**
@@ -59,7 +63,7 @@ public class MenuRequest extends BaseRequest {
*/
@Schema(description = "菜单标题", example = "用户管理")
@NotBlank(message = "菜单标题不能为空")
- @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "菜单标题长度为 1 到 20 位,可以包含中文、字母、数字、下划线,短横线")
+ @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "菜单标题长度为 2 到 30 位,可以包含中文、字母、数字、下划线,短横线")
private String title;
/**
@@ -67,30 +71,35 @@ public class MenuRequest extends BaseRequest {
*/
@Schema(description = "菜单排序", example = "1")
@NotNull(message = "菜单排序不能为空")
+ @Min(value = 1, message = "菜单排序最小值为 {value}")
private Integer sort;
/**
* 权限标识
*/
@Schema(description = "权限标识", example = "system:user:list")
+ @Length(max = 100, message = "权限标识长度不能超过 {max} 个字符")
private String permission;
/**
* 路由地址
*/
@Schema(description = "路由地址", example = "/system/user")
+ @Length(max = 255, message = "路由地址长度不能超过 {max} 个字符")
private String path;
/**
* 组件名称
*/
@Schema(description = "组件名称", example = "User")
+ @Length(max = 50, message = "组件名称长度不能超过 {max} 个字符")
private String name;
/**
* 组件路径
*/
@Schema(description = "组件路径", example = "/system/user/index")
+ @Length(max = 255, message = "组件路径长度不能超过 {max} 个字符")
private String component;
/**
diff --git a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/RoleRequest.java b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/RoleRequest.java
index 8b210efb..6e885cc1 100644
--- a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/RoleRequest.java
+++ b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/RoleRequest.java
@@ -19,8 +19,8 @@ package top.charles7c.cnadmin.system.model.request;
import java.util.ArrayList;
import java.util.List;
+import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import lombok.Data;
@@ -51,7 +51,7 @@ public class RoleRequest extends BaseRequest {
*/
@Schema(description = "角色名称", example = "测试人员")
@NotBlank(message = "角色名称不能为空")
- @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "角色名称长度为 1 到 20 位,可以包含中文、字母、数字、下划线,短横线")
+ @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "角色名称长度为 2 到 30 位,可以包含中文、字母、数字、下划线,短横线")
private String name;
/**
@@ -59,14 +59,14 @@ public class RoleRequest extends BaseRequest {
*/
@Schema(description = "角色编码", example = "test")
@NotBlank(message = "角色编码不能为空")
- @Pattern(regexp = RegexConsts.GENERAL_CODE, message = "角色编码长度为 2 到 16 位,可以包含字母、数字,下划线,以字母开头")
+ @Pattern(regexp = RegexConsts.GENERAL_CODE, message = "角色编码长度为 2 到 30 位,可以包含字母、数字,下划线,以字母开头")
private String code;
/**
* 角色排序
*/
@Schema(description = "角色排序", example = "1")
- @NotNull(message = "角色排序不能为空")
+ @Min(value = 1, message = "角色排序最小值为 {value}")
private Integer sort;
/**
diff --git a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/UpdateBasicInfoRequest.java b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/UpdateBasicInfoRequest.java
index 4b09f2ee..1d01cef8 100644
--- a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/UpdateBasicInfoRequest.java
+++ b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/UpdateBasicInfoRequest.java
@@ -46,7 +46,7 @@ public class UpdateBasicInfoRequest implements Serializable {
*/
@Schema(description = "昵称", example = "张三")
@NotBlank(message = "昵称不能为空")
- @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "昵称长度为 1 到 20 位,可以包含中文、字母、数字、下划线,短横线")
+ @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "昵称长度为 2 到 30 位,可以包含中文、字母、数字、下划线,短横线")
private String nickname;
/**
diff --git a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/UserRequest.java b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/UserRequest.java
index f3728ff0..5a254b7f 100644
--- a/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/UserRequest.java
+++ b/continew-admin-system/src/main/java/top/charles7c/cnadmin/system/model/request/UserRequest.java
@@ -51,7 +51,7 @@ public class UserRequest extends BaseRequest {
*/
@Schema(description = "用户名", example = "zhangsan")
@NotBlank(message = "用户名不能为空")
- @Pattern(regexp = RegexConsts.USERNAME, message = "用户名长度为 4 到 16 位,可以包含字母、数字,下划线,以字母开头")
+ @Pattern(regexp = RegexConsts.USERNAME, message = "用户名长度为 4 到 64 位,可以包含字母、数字,下划线,以字母开头")
private String username;
/**
@@ -59,7 +59,7 @@ public class UserRequest extends BaseRequest {
*/
@Schema(description = "昵称", example = "张三")
@NotBlank(message = "昵称不能为空")
- @Pattern(regexp = RegexConsts.GENERAL_NAME, message = "昵称长度为 1 到 20 位,可以包含中文、字母、数字、下划线,短横线")
+ @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_-]{4,30}$", message = "昵称长度为 4 到 30 位,可以包含中文、字母、数字、下划线,短横线")
private String nickname;
/**
@@ -67,6 +67,7 @@ public class UserRequest extends BaseRequest {
*/
@Schema(description = "邮箱", example = "123456789@qq.com")
@Pattern(regexp = RegexConsts.EMAIL, message = "邮箱格式错误")
+ @Length(max = 255, message = "邮箱长度不能超过 {max} 个字符")
private String email;
/**
diff --git a/continew-admin-ui/src/views/login/components/login-form.vue b/continew-admin-ui/src/views/login/components/login-form.vue
index 98567ffe..a104bdf0 100644
--- a/continew-admin-ui/src/views/login/components/login-form.vue
+++ b/continew-admin-ui/src/views/login/components/login-form.vue
@@ -15,7 +15,7 @@
@@ -24,7 +24,7 @@
@@ -34,6 +34,7 @@
diff --git a/continew-admin-ui/src/views/system/announcement/index.vue b/continew-admin-ui/src/views/system/announcement/index.vue
index 13059657..968a851f 100644
--- a/continew-admin-ui/src/views/system/announcement/index.vue
+++ b/continew-admin-ui/src/views/system/announcement/index.vue
@@ -217,7 +217,7 @@
diff --git a/continew-admin-ui/src/views/system/dept/index.vue b/continew-admin-ui/src/views/system/dept/index.vue
index 9698fac1..c4b41926 100644
--- a/continew-admin-ui/src/views/system/dept/index.vue
+++ b/continew-admin-ui/src/views/system/dept/index.vue
@@ -356,8 +356,14 @@
// 表单验证规则
rules: {
parentId: [{ required: true, message: '请选择上级部门' }],
- name: [{ required: true, message: '请输入部门名称' }],
- sort: [{ required: true, message: '请输入部门排序' }],
+ name: [
+ { required: true, message: '请输入部门名称' },
+ {
+ match: /^[\u4e00-\u9fa5a-zA-Z0-9_-]{2,30}$/,
+ message:
+ '长度为 2 到 30 位,可以包含中文、字母、数字、下划线,短横线',
+ },
+ ],
},
});
const { queryParams, form, rules } = toRefs(data);
diff --git a/continew-admin-ui/src/views/system/dict/index.vue b/continew-admin-ui/src/views/system/dict/index.vue
index c75931ce..edc16c26 100644
--- a/continew-admin-ui/src/views/system/dict/index.vue
+++ b/continew-admin-ui/src/views/system/dict/index.vue
@@ -271,8 +271,21 @@
form: {} as DataRecord,
// 表单验证规则
rules: {
- name: [{ required: true, message: '字典名称不能为空' }],
- code: [{ required: true, message: '字典编码不能为空' }],
+ name: [
+ { required: true, message: '请输入字典名称' },
+ {
+ match: /^[\\u4e00-\\u9fa5a-zA-Z0-9_-]{2,30}$/,
+ message:
+ '长度为 2 到 30 位,可以包含中文、字母、数字、下划线,短横线',
+ },
+ ],
+ code: [
+ { required: true, message: '请输入字典编码' },
+ {
+ match: /^[a-zA-Z][a-zA-Z0-9_]{1,29}$/,
+ message: '长度为 2 到 30 位,可以包含字母、数字,下划线,以字母开头',
+ },
+ ],
},
});
const { queryParams, form, rules } = toRefs(data);
@@ -298,6 +311,7 @@
* @param params 查询参数
*/
const getList = (params: ListParam = { ...queryParams.value }) => {
+ dictId.value = null;
loading.value = true;
list(params)
.then((res) => {
diff --git a/continew-admin-ui/src/views/system/dict/item.vue b/continew-admin-ui/src/views/system/dict/item.vue
index ea74f64d..19cf059c 100644
--- a/continew-admin-ui/src/views/system/dict/item.vue
+++ b/continew-admin-ui/src/views/system/dict/item.vue
@@ -103,16 +103,25 @@
>
-
+
-
+
@@ -198,8 +207,8 @@
form: {} as DataRecord,
// 表单验证规则
rules: {
- label: [{ required: true, message: '字典标签不能为空' }],
- value: [{ required: true, message: '字典值不能为空' }],
+ label: [{ required: true, message: '请输入字典标签' }],
+ value: [{ required: true, message: '请输入字典值' }],
},
});
const { queryParams, form, rules } = toRefs(data);
diff --git a/continew-admin-ui/src/views/system/menu/index.vue b/continew-admin-ui/src/views/system/menu/index.vue
index 22b60c5c..952402ce 100644
--- a/continew-admin-ui/src/views/system/menu/index.vue
+++ b/continew-admin-ui/src/views/system/menu/index.vue
@@ -246,6 +246,7 @@
@@ -266,6 +267,7 @@
@@ -273,6 +275,7 @@
@@ -284,6 +287,7 @@
@@ -295,6 +299,7 @@
diff --git a/continew-admin-ui/src/views/system/role/index.vue b/continew-admin-ui/src/views/system/role/index.vue
index 9e7a08b9..027ed95d 100644
--- a/continew-admin-ui/src/views/system/role/index.vue
+++ b/continew-admin-ui/src/views/system/role/index.vue
@@ -494,20 +494,19 @@
name: [
{ required: true, message: '请输入角色名称' },
{
- match: /^[\u4e00-\u9fa5a-zA-Z0-9_-]{1,20}$/,
+ match: /^[\u4e00-\u9fa5a-zA-Z0-9_-]{2,30}$/,
message:
- '长度为 1 到 20 位,可以包含中文、字母、数字、下划线,短横线',
+ '长度为 2 到 30 位,可以包含中文、字母、数字、下划线,短横线',
},
],
code: [
{ required: true, message: '请输入角色编码' },
{
- match: /^[a-zA-Z][a-zA-Z0-9_]{1,15}$/,
- message: '长度为 2 到 16 位,可以包含字母、数字,下划线,以字母开头',
+ match: /^[a-zA-Z][a-zA-Z0-9_]{1,29}$/,
+ message: '长度为 2 到 30 位,可以包含字母、数字,下划线,以字母开头',
},
],
dataScope: [{ required: true, message: '请选择数据权限' }],
- sort: [{ required: true, message: '请输入角色排序' }],
},
});
const { queryParams, form, rules } = toRefs(data);
diff --git a/continew-admin-ui/src/views/system/user/center/components/basic-info.vue b/continew-admin-ui/src/views/system/user/center/components/basic-info.vue
index 433a2782..7ff5f93f 100644
--- a/continew-admin-ui/src/views/system/user/center/components/basic-info.vue
+++ b/continew-admin-ui/src/views/system/user/center/components/basic-info.vue
@@ -15,7 +15,7 @@
@@ -100,7 +100,7 @@
'userCenter.securitySettings.updateEmail.form.placeholder.currentPassword'
)
"
- max-length="32"
+ :max-length="32"
allow-clear
/>
diff --git a/continew-admin-ui/src/views/system/user/center/components/security-settings/update-pwd.vue b/continew-admin-ui/src/views/system/user/center/components/security-settings/update-pwd.vue
index 0bc6b292..ca03fca5 100644
--- a/continew-admin-ui/src/views/system/user/center/components/security-settings/update-pwd.vue
+++ b/continew-admin-ui/src/views/system/user/center/components/security-settings/update-pwd.vue
@@ -55,7 +55,7 @@
'userCenter.securitySettings.updatePwd.form.placeholder.oldPassword'
)
"
- max-length="32"
+ :max-length="32"
allow-clear
/>
@@ -72,7 +72,7 @@
'userCenter.securitySettings.updatePwd.form.placeholder.newPassword'
)
"
- max-length="32"
+ :max-length="32"
allow-clear
/>
@@ -89,7 +89,7 @@
'userCenter.securitySettings.updatePwd.form.placeholder.rePassword'
)
"
- max-length="32"
+ :max-length="32"
allow-clear
/>
diff --git a/continew-admin-ui/src/views/system/user/index.vue b/continew-admin-ui/src/views/system/user/index.vue
index 197626c2..5fd82c28 100644
--- a/continew-admin-ui/src/views/system/user/index.vue
+++ b/continew-admin-ui/src/views/system/user/index.vue
@@ -303,12 +303,14 @@
v-model="form.username"
placeholder="请输入用户名"
style="width: 162px"
+ :max-length="64"
/>
@@ -316,6 +318,7 @@
@@ -323,6 +326,7 @@
diff --git a/continew-admin-webapi/src/main/resources/db/changelog/v1.0.0/continew-admin_table.sql b/continew-admin-webapi/src/main/resources/db/changelog/v1.0.0/continew-admin_table.sql
index 5e2fb3e4..abe7013c 100644
--- a/continew-admin-webapi/src/main/resources/db/changelog/v1.0.0/continew-admin_table.sql
+++ b/continew-admin-webapi/src/main/resources/db/changelog/v1.0.0/continew-admin_table.sql
@@ -3,17 +3,17 @@
-- changeset Charles7c:1
CREATE TABLE IF NOT EXISTS `sys_menu` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
- `title` varchar(50) NOT NULL COMMENT '菜单标题',
+ `title` varchar(30) NOT NULL COMMENT '菜单标题',
`parent_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上级菜单ID',
`type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '菜单类型(1:目录,2:菜单,3:按钮)',
- `path` varchar(512) DEFAULT NULL COMMENT '路由地址',
+ `path` varchar(255) DEFAULT NULL COMMENT '路由地址',
`name` varchar(50) DEFAULT NULL COMMENT '组件名称',
`component` varchar(255) DEFAULT NULL COMMENT '组件路径',
- `icon` varchar(255) DEFAULT NULL COMMENT '菜单图标',
+ `icon` varchar(50) DEFAULT NULL COMMENT '菜单图标',
`is_external` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否外链',
`is_cache` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否缓存',
`is_hidden` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否隐藏',
- `permission` varchar(255) DEFAULT NULL COMMENT '权限标识',
+ `permission` varchar(100) DEFAULT NULL COMMENT '权限标识',
`sort` int UNSIGNED NOT NULL DEFAULT 999 COMMENT '菜单排序',
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(1:启用,2:禁用)',
`create_user` bigint(20) UNSIGNED NOT NULL COMMENT '创建人',
@@ -29,10 +29,10 @@ CREATE TABLE IF NOT EXISTS `sys_menu` (
CREATE TABLE IF NOT EXISTS `sys_dept` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
- `name` varchar(50) NOT NULL COMMENT '部门名称',
+ `name` varchar(30) NOT NULL COMMENT '部门名称',
`parent_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上级部门ID',
`ancestors` varchar(512) DEFAULT '' COMMENT '祖级列表',
- `description` varchar(512) DEFAULT NULL COMMENT '描述',
+ `description` varchar(200) DEFAULT NULL COMMENT '描述',
`sort` int UNSIGNED NOT NULL DEFAULT 999 COMMENT '部门排序',
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(1:启用,2:禁用)',
`is_system` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否为系统内置数据',
@@ -49,10 +49,10 @@ CREATE TABLE IF NOT EXISTS `sys_dept` (
CREATE TABLE IF NOT EXISTS `sys_role` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
- `name` varchar(50) NOT NULL COMMENT '角色名称',
- `code` varchar(50) NOT NULL COMMENT '角色编码',
+ `name` varchar(30) NOT NULL COMMENT '角色名称',
+ `code` varchar(30) NOT NULL COMMENT '角色编码',
`data_scope` tinyint(1) NOT NULL DEFAULT 4 COMMENT '数据权限(1:全部数据权限,2:本部门及以下数据权限,3:本部门数据权限,4:仅本人数据权限,5:自定义数据权限)',
- `description` varchar(512) DEFAULT NULL COMMENT '描述',
+ `description` varchar(200) DEFAULT NULL COMMENT '描述',
`sort` int UNSIGNED NOT NULL DEFAULT 999 COMMENT '角色排序',
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(1:启用,2:禁用)',
`is_system` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否为系统内置数据',
@@ -81,14 +81,14 @@ CREATE TABLE IF NOT EXISTS `sys_role_dept` (
CREATE TABLE IF NOT EXISTS `sys_user` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
- `username` varchar(50) NOT NULL COMMENT '用户名',
- `nickname` varchar(50) DEFAULT NULL COMMENT '昵称',
- `password` varchar(255) DEFAULT NULL COMMENT '密码',
+ `username` varchar(64) NOT NULL COMMENT '用户名',
+ `nickname` varchar(30) DEFAULT NULL COMMENT '昵称',
+ `password` varchar(32) DEFAULT NULL COMMENT '密码',
`gender` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '性别(0:未知,1:男,2:女)',
- `email` varchar(100) DEFAULT NULL COMMENT '邮箱',
- `phone` varchar(50) DEFAULT NULL COMMENT '手机号码',
+ `email` varchar(255) DEFAULT NULL COMMENT '邮箱',
+ `phone` varchar(15) DEFAULT NULL COMMENT '手机号码',
`avatar` varchar(255) DEFAULT NULL COMMENT '头像地址',
- `description` varchar(512) DEFAULT NULL COMMENT '描述',
+ `description` varchar(200) DEFAULT NULL COMMENT '描述',
`status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(1:启用,2:禁用)',
`is_system` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否为系统内置数据',
`pwd_reset_time` datetime DEFAULT NULL COMMENT '最后一次修改密码时间',
diff --git a/continew-admin-webapi/src/main/resources/db/changelog/v1.1.0/continew-admin_table.sql b/continew-admin-webapi/src/main/resources/db/changelog/v1.1.0/continew-admin_table.sql
index 402111fe..7bf8210b 100644
--- a/continew-admin-webapi/src/main/resources/db/changelog/v1.1.0/continew-admin_table.sql
+++ b/continew-admin-webapi/src/main/resources/db/changelog/v1.1.0/continew-admin_table.sql
@@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS `gen_field_config` (
CREATE TABLE IF NOT EXISTS `sys_announcement` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
- `title` varchar(255) NOT NULL COMMENT '标题',
+ `title` varchar(150) NOT NULL COMMENT '标题',
`content` mediumtext NOT NULL COMMENT '内容',
`type` varchar(30) NOT NULL COMMENT '类型',
`effective_time` datetime DEFAULT NULL COMMENT '生效时间',
diff --git a/continew-admin-webapi/src/main/resources/db/changelog/v1.2.0/continew-admin_table.sql b/continew-admin-webapi/src/main/resources/db/changelog/v1.2.0/continew-admin_table.sql
index 572402d9..9eb2e2f4 100644
--- a/continew-admin-webapi/src/main/resources/db/changelog/v1.2.0/continew-admin_table.sql
+++ b/continew-admin-webapi/src/main/resources/db/changelog/v1.2.0/continew-admin_table.sql
@@ -3,9 +3,9 @@
-- changeset Charles7c:1
CREATE TABLE IF NOT EXISTS `sys_dict` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
- `name` varchar(50) NOT NULL COMMENT '字典名称',
+ `name` varchar(30) NOT NULL COMMENT '字典名称',
`code` varchar(30) NOT NULL COMMENT '字典编码',
- `description` varchar(512) DEFAULT NULL COMMENT '描述',
+ `description` varchar(200) DEFAULT NULL COMMENT '描述',
`is_system` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否为系统内置数据',
`create_user` bigint(20) UNSIGNED NOT NULL COMMENT '创建人',
`create_time` datetime NOT NULL COMMENT '创建时间',
@@ -18,11 +18,11 @@ CREATE TABLE IF NOT EXISTS `sys_dict` (
CREATE TABLE IF NOT EXISTS `sys_dict_item` (
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
- `label` varchar(50) NOT NULL COMMENT '字典标签',
+ `label` varchar(30) NOT NULL COMMENT '字典标签',
`value` varchar(30) NOT NULL COMMENT '字典值',
`color` varchar(30) DEFAULT NULL COMMENT '背景颜色',
`sort` int UNSIGNED NOT NULL DEFAULT 999 COMMENT '字典项排序',
- `description` varchar(512) DEFAULT NULL COMMENT '描述',
+ `description` varchar(200) DEFAULT NULL COMMENT '描述',
`dict_id` bigint(20) UNSIGNED NOT NULL COMMENT '字典ID',
`create_user` bigint(20) UNSIGNED NOT NULL COMMENT '创建人',
`create_time` datetime NOT NULL COMMENT '创建时间',