-- ============================================================
-- 短信接口菜单添加脚本
-- ============================================================

-- 查找短信管理分组(通信管理 2400)下的最大order_num
-- 当前菜单: 2408(短信管理,order=8), 2409(短信套餐,order=9), 2410(短信订单,order=10)
-- 在短信管理(2408)之后、短信套餐(2409)之前插入短信接口菜单

-- 插入短信接口菜单 (menu_id 2408.5 取 24081)
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, menu_type, icon, visible, status, perms, is_frame, create_by, create_time)
VALUES (24081, '短信接口', 2400, 9, 'smsApi', 'admin/smsApi/index', 'C', 'el-icon-connection', '0', '0', '', 0, 'admin', NOW());

-- 将短信套餐和短信订单的order_num后移
UPDATE sys_menu SET order_num = 10 WHERE menu_id = 2409;
UPDATE sys_menu SET order_num = 11 WHERE menu_id = 2410;

-- 给超级管理员角色(role_id=1)授权
INSERT INTO sys_role_menu (role_id, menu_id) VALUES (1, 24081);
