-- 支付单列表：拆分订单按钮权限（对接 order.order/split）
SET @order_menu_pid = (SELECT id FROM system_menu WHERE perms = 'order.order/lists' LIMIT 1);

INSERT INTO system_menu (pid, type, name, icon, sort, perms, paths, component, selected, params, is_cache, is_show, is_disable, create_time, update_time, delete_time)
SELECT @order_menu_pid, 'A', '拆分订单', '', 88, 'order.order/split', '', '', '', '', 0, 1, 0, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), NULL
WHERE @order_menu_pid IS NOT NULL
  AND NOT EXISTS (SELECT 1 FROM system_menu WHERE perms = 'order.order/split' LIMIT 1);
