mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-14 19:15:06 +08:00
28 lines
903 B
Plaintext
28 lines
903 B
Plaintext
-- 菜单 SQL
|
|
INSERT INTO `system_menu`(
|
|
`name`, `permission`, `menu_type`, `sort`, `parent_id`,
|
|
`path`, `icon`, `component`, `status`
|
|
)
|
|
VALUES (
|
|
'${table.classComment}管理', '', 2, 0, ${table.parentMenuId},
|
|
'${simpleClassName_strikeCase}', '', '${table.moduleName}/${classNameVar}/index', 0
|
|
);
|
|
|
|
-- 按钮父菜单ID
|
|
SELECT @parentId := LAST_INSERT_ID();
|
|
|
|
-- 按钮 SQL
|
|
#set ($functionNames = ['查询', '创建', '更新', '删除', '导出'])
|
|
#set ($functionOps = ['query', 'create', 'update', 'delete', 'export'])
|
|
#foreach ($functionName in $functionNames)
|
|
#set ($index = $foreach.count - 1)
|
|
INSERT INTO `system_menu`(
|
|
`name`, `permission`, `menu_type`, `sort`, `parent_id`,
|
|
`path`, `icon`, `component`, `status`
|
|
)
|
|
VALUES (
|
|
'${table.classComment}${functionName}', '${permissionPrefix}:${functionOps.get($index)}', 3, $foreach.count, @parentId,
|
|
'', '', '', 0
|
|
);
|
|
#end
|