-- ============================================================
-- 全局中文乱码修复脚本（菜单 remark / menu_name，HEX 3F 问号乱码）
-- 自动化执行：java/scripts/DbRemarkEncodingFixAll.java
-- ============================================================

-- 3006 - 测试场景管理
UPDATE sys_menu SET menu_name='测试场景管理', update_time=NOW() WHERE menu_id=3006 AND (HEX(menu_name) LIKE '3F3F%' OR menu_name LIKE '%?%');
UPDATE company_menu SET menu_name='测试场景管理', update_time=NOW() WHERE menu_id=3006 AND (HEX(menu_name) LIKE '3F3F%' OR menu_name LIKE '%?%');

-- 3007 - E2E运行历史
UPDATE sys_menu SET menu_name='E2E运行历史', update_time=NOW() WHERE menu_id=3007 AND (HEX(menu_name) LIKE '4532453F%' OR menu_name LIKE '%?%');
UPDATE company_menu SET menu_name='E2E运行历史', update_time=NOW() WHERE menu_id=3007 AND (HEX(menu_name) LIKE '4532453F%' OR menu_name LIKE '%?%');

-- 3008 - 动态节点审批
UPDATE sys_menu SET menu_name='动态节点审批', remark='数字员工动态节点学习产物审批', update_time=NOW()
WHERE menu_id=3008 AND (HEX(menu_name) LIKE '3F3F%' OR menu_name LIKE '%?%' OR HEX(remark) LIKE '3F3F%' OR remark LIKE '%?%');
UPDATE company_menu SET menu_name='动态节点审批', remark='数字员工动态节点学习产物审批', update_time=NOW()
WHERE menu_id=3008 AND (HEX(menu_name) LIKE '3F3F%' OR menu_name LIKE '%?%' OR HEX(remark) LIKE '3F3F%' OR remark LIKE '%?%');
UPDATE tenant_sys_menu SET menu_name='动态节点审批', remark='数字员工动态节点学习产物审批', update_time=NOW()
WHERE menu_id=3008 AND (HEX(menu_name) LIKE '3F3F%' OR menu_name LIKE '%?%' OR HEX(remark) LIKE '3F3F%' OR remark LIKE '%?%');
UPDATE tenant_company_menu SET menu_name='动态节点审批', remark='数字员工动态节点学习产物审批', update_time=NOW()
WHERE menu_id=3008 AND (HEX(menu_name) LIKE '3F3F%' OR menu_name LIKE '%?%' OR HEX(remark) LIKE '3F3F%' OR remark LIKE '%?%');

-- sys_dict_type 任务分组
UPDATE sys_dict_type SET dict_name='任务分组', remark='任务分组列表', update_time=NOW()
WHERE dict_type='sys_job_group' AND (HEX(dict_name) LIKE '3F3F%' OR HEX(remark) LIKE '3F3F%' OR dict_name LIKE '%?%' OR remark LIKE '%?%');
