-- {FunctionName}菜单 INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_time, remark) VALUES ('{FunctionName}', {ParentId}, 1, '{ModuleName}/{ModelTypeName}', '{ModuleName}/{ViewsFileName}/index', 0, 0, 'C', '0', '0', '{Permission}:list', 'icon1', GETDATE(), '{FunctionName}'); -- 按钮父菜单id declare @menuId int = @@identity INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time) VALUES ('{FunctionName}查询', @menuId, 1, '#', NULL, 0, 0, 'F', '0', '0', '{Permission}:query', '', '', GETDATE()); INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time) VALUES ('{FunctionName}新增', @menuId, 2, '#', NULL, 0, 0, 'F', '0', '0', '{Permission}:add', '', '', GETDATE()); INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time) VALUES ('{FunctionName}删除', @menuId, 3, '#', NULL, 0, 0, 'F', '0', '0', '{Permission}:delete', '', '', GETDATE()); INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time) VALUES ('{FunctionName}修改', @menuId, 4, '#', NULL, 0, 0, 'F', '0', '0', '{Permission}:update', '', '', GETDATE()); INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time) VALUES ('{FunctionName}导出', @menuId, 5, '#', NULL, 0, 0, 'F', '0', '0', '{Permission}:export', '', '', GETDATE()); SELECT * FROM sys_menu WHERE parentId = @menuId; SELECT * FROM sys_menu WHERE menuId = @menuId;