菜单重复问题修复原创
2人赞赏了该文章
372次浏览
编辑于2021年11月20日 18:29:49
查询重复数据:
select fnumber, fname_l2, fdisplayname_l2 from T_PM_MainMenuItem where fnumber in (select fnumber from (select count(fnumber) as aa, fnumber from T_PM_MainMenuItem where 1 = 1 group by fnumber) where aa >= 2)
存在脏数据,难以排查,无法升级,可以用如下方法处理:
(1)备份客户化菜单
select * into T_PM_MainMenuItem_bak from T_PM_MainMenuItem;
(2)查看备份是否成功,查出数据说明备份成功
select * from T_PM_MainMenuItem_bak
(3)删除客户化菜单
delete from T_PM_MainMenuItem;
(4)菜单升级,选全部升级
(5)二开菜单恢复_找出需要恢复的菜单
select * into T_PM_MainMenuItem_bak_dlp from T_PM_MainMenuItem_bak where fnumber not in (select fnumber from T_PM_MainMenuItem);
(6)二开菜单恢复_确认需要恢复的菜单
select * from T_PM_MainMenuItem_bak_dlp
(7)二开菜单恢复_将需要恢复的菜单恢复
insert into T_PM_MainMenuItem select * from T_PM_MainMenuItem_bak_dlp where fid not in (select fid from T_PM_MainMenuItem)