ALTER TABLE sys_dept ADD COLUMN model_parm TEXT NULL COMMENT '视频模型列表JSON(label+value)' AFTER byte_api_key;
ALTER TABLE ai_order ADD COLUMN ext_status varchar(255) COMMENT '执行状态';
ALTER TABLE `byteai`.`ai_order`
    MODIFY COLUMN `img1` varchar(2000) CHARACTER  SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '首帧图片' AFTER `is_top`,
    MODIFY COLUMN `img2` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '第二张图片' AFTER `img1`;

-- 2026-04-07 新建表 tos_asset（审核批次 items），完整 DDL 见 tos_asset.sql
-- 2026-04-07 若表已存在仅补列：alter_tos_asset_ai_user_result.sql



INSERT INTO `byteai`.`sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (111, '门户视频默认参数', 'portal.video.defaults', '{\"model\":\"ep-202604170001\",\"duration\":5,\"resolution\":\"720p\",\"ratio\":\"16:9\"}', 'N', 'admin', '2026-04-17 16:40:56', 'admin', '2026-04-17 16:40:56', '门户视频默认参数(JSON)');
INSERT INTO `byteai`.`sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (112, '门户视频模型列表(全局兜底)', 'portal.video.models', '[{\"label\":\"Seedance 2.0\",\"value\":\"ep-202604170001\"},{\"label\":\"Seedance Pro\",\"value\":\"ep-202604170002\"}]', 'N', 'admin', '2026-04-17 16:40:56', 'admin', '2026-04-17 16:40:56', '当部门model_parm为空时使用');
INSERT INTO `byteai`.`sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (113, '门户视频比例选项', 'portal.video.ratios', '[\"16:9\",\"9:16\",\"1:1\",\"3:4\",\"4:3\",\"21:9\"]', 'N', 'admin', '2026-04-17 16:40:56', 'admin', '2026-04-17 16:40:56', '门户视频比例选项(JSON数组)');
INSERT INTO `byteai`.`sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (114, '门户视频时长选项', 'portal.video.durations', '[5,6,7,8,9,10,11,12,13,14,15]', 'N', 'admin', '2026-04-17 16:40:56', 'admin', '2026-04-17 16:40:56', '门户视频时长选项(JSON数组)');
INSERT INTO `byteai`.`sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (115, '门户视频分辨率选项', 'portal.video.resolutions', '[\"720p\",\"1080p\",\"480p\"]', 'N', 'admin', '2026-04-17 16:40:56', 'admin', '2026-04-17 16:40:56', '门户视频分辨率选项(JSON数组)');
INSERT INTO `byteai`.`sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (116, '门户视频功能类型', 'portal.video.functionType', '21', 'N', 'admin', '2026-04-17 16:40:56', 'admin', '2026-04-17 16:40:56', '与 ai_manager.type 对应');

-- 团队每日消耗统计：来源表补字段（实际充值积分）
ALTER TABLE `ai_video_report_data`
    ADD COLUMN `recharge_score` DECIMAL(14,2) NOT NULL DEFAULT '0.00' COMMENT '实际充值积分（充值-退款）' AFTER `use_tokens`;

-- 团队充值/退款/手工调账订单：类型扩展、备注加长、积分字段说明（手动修改允许正负）
ALTER TABLE `ai_charge_refund_order`
    MODIFY COLUMN `order_type` TINYINT NOT NULL COMMENT '订单类型(0-充值;1-退款;2-手动修改)',
    MODIFY COLUMN `amount` DECIMAL(12,2) NOT NULL COMMENT '积分：充值/退款填绝对值；手动修改可正(加)可负(减)',
    MODIFY COLUMN `remark` VARCHAR(500) NULL DEFAULT NULL COMMENT '备注';






------------------ 团队后台菜单与权限（总管理 admin-ui 动态路由）
-- parent_id=0 为顶级；若需挂到现有目录，请改第一行父菜单的 parent_id 并删掉目录插入，仅保留子菜单挂到已有父级。

-- 目录：团队后台
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, update_by, update_time, remark)
values('团队后台', '0', '8', 'subteam', null, 1, 0, 'M', '0', '0', '', 'peoples', 'admin', sysdate(), '', null, '团队管理员使用');

SELECT @subteamRoot := LAST_INSERT_ID();

-- 工作台（概览）
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, update_by, update_time, remark)
values('工作台', @subteamRoot, '1', 'overview', 'subteam/overview/index', 1, 0, 'C', '0', '0', 'subteam:overview:view', 'dashboard', 'admin', sysdate(), '', null, '');
SELECT @m0 := LAST_INSERT_ID();
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, update_by, update_time, remark)
values('工作台查询', @m0, '1', '#', '', 1, 0, 'F', '0', '0', 'subteam:overview:view', '#', 'admin', sysdate(), '', null, '');

-- 用户管理
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, update_by, update_time, remark)
values('用户管理', @subteamRoot, '2', 'user', 'subteam/user/index', 1, 0, 'C', '0', '0', 'subteam:user:list', 'user', 'admin', sysdate(), '', null, '');
SELECT @m1 := LAST_INSERT_ID();
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, update_by, update_time, remark)
values('用户查询', @m1, '1', '#', '', 1, 0, 'F', '0', '0', 'subteam:user:query', '#', 'admin', sysdate(), '', null, '');
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, update_by, update_time, remark)
values('用户新增', @m1, '2', '#', '', 1, 0, 'F', '0', '0', 'subteam:user:add', '#', 'admin', sysdate(), '', null, '');
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, update_by, update_time, remark)
values('用户修改', @m1, '3', '#', '', 1, 0, 'F', '0', '0', 'subteam:user:edit', '#', 'admin', sysdate(), '', null, '');
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, update_by, update_time, remark)
values('用户删除', @m1, '4', '#', '', 1, 0, 'F', '0', '0', 'subteam:user:remove', '#', 'admin', sysdate(), '', null, '');
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, update_by, update_time, remark)
values('重置密码', @m1, '5', '#', '', 1, 0, 'F', '0', '0', 'subteam:user:resetPwd', '#', 'admin', sysdate(), '', null, '');
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, update_by, update_time, remark)
values('下放积分', @m1, '6', '#', '', 1, 0, 'F', '0', '0', 'subteam:user:deptScoreIssue', '#', 'admin', sysdate(), '', null, '');
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, update_by, update_time, remark)
values('回收积分', @m1, '7', '#', '', 1, 0, 'F', '0', '0', 'subteam:user:deptScoreReclaim', '#', 'admin', sysdate(), '', null, '');

-- 视频订单
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, update_by, update_time, remark)
values('订单记录', @subteamRoot, '3', 'video-order', 'subteam/videoOrder/index', 1, 0, 'C', '0', '0', 'subteam:videoOrder:list', 'list', 'admin', sysdate(), '', null, '');
SELECT @m2 := LAST_INSERT_ID();
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, update_by, update_time, remark)
values('订单查询', @m2, '1', '#', '', 1, 0, 'F', '0', '0', 'subteam:videoOrder:query', '#', 'admin', sysdate(), '', null, '');
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, update_by, update_time, remark)
values('订单导出', @m2, '2', '#', '', 1, 0, 'F', '0', '0', 'subteam:videoOrder:export', '#', 'admin', sysdate(), '', null, '');

-- 团队充值记录
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, update_by, update_time, remark)
values('团队充值记录', @subteamRoot, '4', 'charge-order', 'subteam/chargeOrder/index', 1, 0, 'C', '0', '0', 'subteam:charge:list', 'money', 'admin', sysdate(), '', null, '');
SELECT @m3 := LAST_INSERT_ID();
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, update_by, update_time, remark)
values('充值记录查询', @m3, '1', '#', '', 1, 0, 'F', '0', '0', 'subteam:charge:query', '#', 'admin', sysdate(), '', null, '');
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, update_by, update_time, remark)
values('充值记录导出', @m3, '2', '#', '', 1, 0, 'F', '0', '0', 'subteam:charge:export', '#', 'admin', sysdate(), '', null, '');

-- 用户余额变动（门户 ai_user）
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, update_by, update_time, remark)
values('用户余额变动', @subteamRoot, '5', 'user-balance', 'subteam/userBalance/index', 1, 0, 'C', '0', '0', 'subteam:userBalance:list', 'chart', 'admin', sysdate(), '', null, '');
SELECT @m4 := LAST_INSERT_ID();
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, update_by, update_time, remark)
values('余额变动查询', @m4, '1', '#', '', 1, 0, 'F', '0', '0', 'subteam:userBalance:query', '#', 'admin', sysdate(), '', null, '');

-- 团队消耗统计
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, update_by, update_time, remark)
values('团队消耗统计', @subteamRoot, '6', 'consume-stat', 'subteam/consumeStat/index', 1, 0, 'C', '0', '0', 'subteam:consume:list', 'chart', 'admin', sysdate(), '', null, '');
SELECT @m5 := LAST_INSERT_ID();
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, update_by, update_time, remark)
values('消耗统计查询', @m5, '1', '#', '', 1, 0, 'F', '0', '0', 'subteam:consume:list', '#', 'admin', sysdate(), '', null, '');

-- 团队余额变动
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, update_by, update_time, remark)
values('团队余额变动', @subteamRoot, '7', 'group-balance', 'subteam/groupBalance/index', 1, 0, 'C', '0', '0', 'subteam:groupBalance:list', 'nested', 'admin', sysdate(), '', null, '');
SELECT @m6 := LAST_INSERT_ID();
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, update_by, update_time, remark)
values('团队余额变动查询', @m6, '1', '#', '', 1, 0, 'F', '0', '0', 'subteam:groupBalance:query', '#', 'admin', sysdate(), '', null, '');
-- 菜单 SQL
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, update_by, update_time, remark)
values('团队（部门）余额变动', '3', '1', 'record', 'ai/record/index', 1, 0, 'C', '0', '0', 'ai:record:list', '#', 'admin', sysdate(), '', null, '团队（部门）余额变动菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
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, update_by, update_time, remark)
values('团队（部门）余额变动查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'ai:record:query',        '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）余额变动新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'ai:record:add',          '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）余额变动修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'ai:record:edit',         '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）余额变动删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'ai:record:remove',       '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）余额变动导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'ai:record:export',       '#', 'admin', sysdate(), '', null, '');

-- 菜单 SQL
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, update_by, update_time, remark)
values('团队（部门）充值退款订单', '3', '1', 'order', 'ai/order/index', 1, 0, 'C', '0', '0', 'ai:order:list', '#', 'admin', sysdate(), '', null, '团队（部门）充值退款订单菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
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, update_by, update_time, remark)
values('团队（部门）充值退款订单查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'ai:order:query',        '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）充值退款订单新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'ai:order:add',          '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）充值退款订单修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'ai:order:edit',         '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）充值退款订单删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'ai:order:remove',       '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）充值退款订单导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'ai:order:export',       '#', 'admin', sysdate(), '', null, '');

-- 团队每日消耗统计（路由 path：data，组件：ai/data/index，接口：GET /ai/data/list → ai:data:list）
-- parent_id：请改为环境中「AI 管理」等父菜单的 menu_id（示例 3，与 orderMenu.sql 一致）
-- 若曾执行过旧脚本，请在「菜单管理」删除旧「AI视频生成统计数据」等重复项，或按 perms/path 自行 DELETE 后再执行

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, update_by, update_time, remark)
values('团队每日消耗统计', '3', '2', 'data', 'ai/data/index', 1, 0, 'C', '0', '0', 'ai:data:list', 'chart', 'admin', sysdate(), '', null, '按日、团队查看消耗与充值对账；须填日期与团队名称查询');

SELECT @parentId := LAST_INSERT_ID();

-- 与若依习惯一致：列表页的「查询」子权限（与主菜单同为 list，角色勾选菜单时一般已包含；可按需删去本行）
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, update_by, update_time, remark)
values('团队每日消耗统计查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'ai:data:list', '#', 'admin', sysdate(), '', null, '');

-- AiVideoReportData：仅查询与新增（及导出）；无修改/删除接口
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, update_by, update_time, remark)
values('团队统计-详情', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'ai:data:query', '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队统计-新增', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'ai:data:add', '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队统计-导出', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'ai:data:export', '#', 'admin', sysdate(), '', null, '');
-- 菜单 SQL
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, update_by, update_time, remark)
values('团队（部门）对应火山引擎配置', '3', '1', 'config', 'ai/config/index', 1, 0, 'C', '0', '0', 'ai:config:list', '#', 'admin', sysdate(), '', null, '团队（部门）对应火山引擎配置菜单');

-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

-- 按钮 SQL
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, update_by, update_time, remark)
values('团队（部门）对应火山引擎配置查询', @parentId, '1',  '#', '', 1, 0, 'F', '0', '0', 'ai:config:query',        '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）对应火山引擎配置新增', @parentId, '2',  '#', '', 1, 0, 'F', '0', '0', 'ai:config:add',          '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）对应火山引擎配置修改', @parentId, '3',  '#', '', 1, 0, 'F', '0', '0', 'ai:config:edit',         '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）对应火山引擎配置删除', @parentId, '4',  '#', '', 1, 0, 'F', '0', '0', 'ai:config:remove',       '#', 'admin', sysdate(), '', null, '');

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, update_by, update_time, remark)
values('团队（部门）对应火山引擎配置导出', @parentId, '5',  '#', '', 1, 0, 'F', '0', '0', 'ai:config:export',       '#', 'admin', sysdate(), '', null, '');

ALTER TABLE `byteai`.`ai_balance_change_record`
    ADD COLUMN `dept_id` bigint NULL COMMENT '部门ID' AFTER `remark`;

ALTER TABLE `byteai`.`ai_dept_ark_config`
    ADD COLUMN `remark` varchar(255) NULL AFTER `update_time`;

ALTER TABLE `byteai`.`ai_video_report_data`
    ADD COLUMN `recharge_score` decimal(14, 2) NULL AFTER `user_id`;

-- 团队端「团队积分变动」导出权限（组件 ai/groupchargeorder/index，接口 POST /ai/group/chargeorder/record/export）
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, update_by, update_time, remark)
SELECT '团队积分变动导出', m.menu_id, 6, '#', '', 1, 0, 'F', '0', '0', 'ai:groupChargeOrder:record:export', '#', 'admin', sysdate(), '', null, '与 ai:groupChargeOrder:list 同页，单独控制导出'
FROM sys_menu m
WHERE m.perms = 'ai:groupChargeOrder:list' AND m.menu_type = 'C'
LIMIT 1;

-- 团队后台「团队余额变动」导出（组件 subteam/groupBalance/index，接口 POST /subteam/group-balance/export）
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, update_by, update_time, remark)
SELECT '团队余额变动导出', m.menu_id, 2, '#', '', 1, 0, 'F', '0', '0', 'subteam:groupBalance:export', '#', 'admin', sysdate(), '', null, '与 subteam:groupBalance:list 同页'
FROM sys_menu m
WHERE m.perms = 'subteam:groupBalance:list' AND m.menu_type = 'C'
LIMIT 1;

-- 团队后台「团队消耗统计」导出（组件 subteam/consumeStat/index，接口 POST /subteam/consume-stat/export）
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, update_by, update_time, remark)
SELECT '消耗统计导出', m.menu_id, 2, '#', '', 1, 0, 'F', '0', '0', 'subteam:consume:export', '#', 'admin', sysdate(), '', null, '与 subteam:consume:list 同页'
FROM sys_menu m
WHERE m.perms = 'subteam:consume:list' AND m.menu_type = 'C' AND m.path = 'consume-stat'
LIMIT 1;