-- ----------------------------
-- 支付管理菜单配置
-- 执行此SQL添加支付订单查询菜单到系统
-- ----------------------------

-- ----------------------------
-- 1、支付管理主菜单（目录）
-- ----------------------------
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
values('支付管理', '0', '20', 'payment', NULL, 1, 0, 'M', '0', '0', NULL, 'money', 'admin', sysdate(), '支付管理目录菜单');

-- 获取刚刚插入的菜单ID (适用于MySQL)
set @parentId = LAST_INSERT_ID();

-- ----------------------------
-- 2、支付订单查询菜单
-- ----------------------------
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
values('支付订单查询', @parentId, '1', 'order', 'payment/order/index', 1, 0, 'C', '0', '0', 'payment:order:list', 'el-icon-s-order', 'admin', sysdate(), '支付订单查询菜单');

-- 获取刚刚插入的菜单ID
set @orderMenuId = LAST_INSERT_ID();

-- ----------------------------
-- 3、支付订单查询相关按钮权限
-- ----------------------------
-- 查询权限
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
values('支付订单查询-查看', @orderMenuId, '1', '', '', 1, 0, 'F', '0', '0', 'payment:order:query', '#', 'admin', sysdate(), '');

-- 导出权限
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
values('支付订单查询-导出', @orderMenuId, '2', '', '', 1, 0, 'F', '0', '0', 'payment:order:export', '#', 'admin', sysdate(), '');
