Skip to content

Commit

Permalink
fix: 修复初始菜单数据错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed May 11, 2024
1 parent 044b4b6 commit f062797
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private void checkPath(MenuReq req) {
// 非外链菜单参数修正
if (Boolean.FALSE.equals(isExternal)) {
ValidationUtils.throwIf(URLUtils.isHttpUrl(path), "路由地址格式错误");
req.setPath(StrUtil.prependIfMissing(path, StringConstants.SLASH));
req.setPath(StrUtil.isBlank(path) ? path : StrUtil.prependIfMissing(path, StringConstants.SLASH));
req.setName(StrUtil.removePrefix(req.getName(), StringConstants.SLASH));
req.setComponent(StrUtil.removePrefix(req.getComponent(), StringConstants.SLASH));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
INSERT INTO `sys_menu`
(`id`, `title`, `parent_id`, `type`, `path`, `name`, `component`, `redirect`, `icon`, `is_external`, `is_cache`, `is_hidden`, `permission`, `sort`, `status`, `create_user`, `create_time`, `update_user`, `update_time`)
VALUES
(1000, '系统管理', 0, 1, '/system', 'System', 'Layout', NULL, 'settings', b'0', b'0', b'0', NULL, 1, 1, 1, NOW(), NULL, NULL),
(1000, '系统管理', 0, 1, '/system', 'System', 'Layout', '/system/user', 'settings', b'0', b'0', b'0', NULL, 1, 1, 1, NOW(), NULL, NULL),
(1010, '用户管理', 1000, 2, '/system/user', 'SystemUser', 'system/user/index', NULL, 'user', b'0', b'0', b'0', NULL, 1, 1, 1, NOW(), NULL, NULL),
(1011, '查看', 1010, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:user:list', 1, 1, 1, NOW(), NULL, NULL),
(1012, '新增', 1010, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:user:add', 2, 1, 1, NOW(), NULL, NULL),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
INSERT INTO "sys_menu"
("id", "title", "parent_id", "type", "path", "name", "component", "redirect", "icon", "is_external", "is_cache", "is_hidden", "permission", "sort", "status", "create_user", "create_time", "update_user", "update_time")
VALUES
(1000, '系统管理', 0, 1, '/system', 'System', 'Layout', NULL, 'settings', false, false, false, NULL, 1, 1, 1, NOW(), NULL, NULL),
(1000, '系统管理', 0, 1, '/system', 'System', 'Layout', '/system/user', 'settings', false, false, false, NULL, 1, 1, 1, NOW(), NULL, NULL),
(1010, '用户管理', 1000, 2, '/system/user', 'SystemUser', 'system/user/index', NULL, 'user', false, false, false, NULL, 1, 1, 1, NOW(), NULL, NULL),
(1011, '查看', 1010, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:user:list', 1, 1, 1, NOW(), NULL, NULL),
(1012, '新增', 1010, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'system:user:add', 2, 1, 1, NOW(), NULL, NULL),
Expand Down

0 comments on commit f062797

Please sign in to comment.