SET @objectId = 'ptdev';
SET @menuId = '4164004985249468416';
select tm.mapper_field,tb_pop.mf_id,tb_pop.menu_id,tb_mf.is_enabled,tb_mf.func_id from (select * from ( select pop_id,menu_id,object_type,object_id,mf_id from bo_popedom where object_id=@objectId and (object_type=2 and menu_id=@menuId) and checked=1 union select pop_id,menu_id,object_type,object_id,mf_id from bo_popedom where object_id in (select role_id from bo_user_role where user_id=@objectId) and object_type=1 and checked=1 and menu_id=@menuId union select pop_id,menu_id,object_type,object_id,mf_id from bo_popedom where object_id in (select dep_id from bo_user_dep where user_id=@objectId) and object_type=4 and checked=1 and menu_id=@menuId union select pop_id,menu_id,object_type,object_id,mf_id from bo_popedom where object_id in (select job_id from bo_user_job where user_id=@objectId) and object_type=5 and checked=1 and menu_id=@menuId ) t where (concat(menu_id,mf_id)) not in (select concat(menu_id,mf_id) from bo_popedom where object_id=@objectId and object_type=3 and menu_id=@menuId)) tb_pop inner join bo_menu_function tb_mf on (tb_mf.mf_id=tb_pop.mf_id) inner join bo_sys_menu tm on (tm.menu_id=tb_pop.menu_id)
文档更新时间: 2023-07-19 13:58 作者:admin