👔 代码生成-生成新代码菜单Sql

pull/827/head
peishaopeng 2023-11-01 11:10:10 +08:00
parent 2a879115bc
commit 6b9aaaf893
2 changed files with 8 additions and 0 deletions

View File

@ -64,6 +64,7 @@ public class GenUtil {
templateNames.add("Service");
templateNames.add("ServiceImpl");
templateNames.add("Repository");
templateNames.add("Sql");
return templateNames;
}
@ -341,6 +342,8 @@ public class GenUtil {
genMap.put("betweens", betweens);
// 保存非空字段信息
genMap.put("isNotNullColumns", isNotNullColumns);
// 添加前端组件路径
genMap.put("apiPath", genConfig.getApiPath());
return genMap;
}

View File

@ -0,0 +1,5 @@
INSERT INTO `eladmin`.`sys_menu` (`pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (NULL, 3, 1, '${apiAlias}管理', '${className}', '${apiPath}index', 1, 'menu', '${changeClassName}', b'0', b'0', b'0', '${changeClassName}:list', NULL, NULL, NOW(), NULL);
SET @last_id_in_table1 = LAST_INSERT_ID();
INSERT INTO `eladmin`.`sys_menu` (`pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (@last_id_in_table1, 0, 2, '${apiAlias}新增', NULL, NULL, 1, NULL, NULL, b'0', b'0', b'0', '${changeClassName}:add', NULL, NULL, NOW(), NULL);
INSERT INTO `eladmin`.`sys_menu` (`pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (@last_id_in_table1, 0, 2, '${apiAlias}编辑', NULL, NULL, 1, NULL, NULL, b'0', b'0', b'0', '${changeClassName}:edit', NULL, NULL, NOW(), NULL);
INSERT INTO `eladmin`.`sys_menu` (`pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (@last_id_in_table1, 0, 2, '${apiAlias}删除', NULL, NULL, 1, NULL, NULL, b'0', b'0', b'0', '${changeClassName}:del', NULL, NULL, NOW(), NULL);