-- 数字员工菜单重命名：工作流模板库 -> 工作流模板，工作流执行任务 -> 工作流执行

-- 总后台 adminui (sys_menu)
UPDATE sys_menu SET menu_name = '工作流模板'
WHERE menu_name IN ('工作流模板库', '工作流模板')
  AND (parent_id = 2864 OR path IN ('template', 'company-workflowLobster'));

UPDATE sys_menu SET menu_name = '工作流执行'
WHERE menu_name IN ('工作流执行任务', '工作流执行')
  AND (parent_id = 2864 OR path = 'workflow-execution');

-- 主库租户菜单模板
UPDATE tenant_sys_menu SET menu_name = '工作流模板'
WHERE menu_name IN ('工作流模板库', '工作流模板')
  AND (parent_id = 29900 OR path IN ('template', 'company-workflowLobster') OR menu_id IN (29903, 32481));

UPDATE tenant_sys_menu SET menu_name = '工作流执行'
WHERE menu_name IN ('工作流执行任务', '工作流执行')
  AND (parent_id = 29900 OR path = 'workflow-execution' OR menu_id = 29949);

UPDATE tenant_company_menu SET menu_name = '工作流模板'
WHERE menu_name IN ('工作流模板库', '工作流模板')
  AND (parent_id = 29900 OR path IN ('template', 'company-workflowLobster') OR menu_id IN (29903, 32481));

UPDATE tenant_company_menu SET menu_name = '工作流执行'
WHERE menu_name IN ('工作流执行任务', '工作流执行')
  AND (parent_id = 29900 OR path = 'workflow-execution' OR menu_id = 29949);
