{"param1":"SELECT  DISTINCT  tt.gName,tt.gId,tt.mName,tt.mId,tt.pName,tt.pId, tt.pgId,tt.pgName FROM (
select mmg.`name` gName,mmg.g_id gId,m.`name` mName,m.m_id mId,p.`name` pName,p.p_id pId, ppg.pg_id pgId,ppg.name pgName,mmg.seq
from m_menu_group mmg
INNER JOIN m_menu m on mmg.g_id = m.g_id and m.status_cd = '0'
inner join p_privilege p on m.m_id = p.m_id and p.status_cd = '0' and p.domain in (#domain#,'9999')
inner join p_privilege_rel ppr on ppr.p_id = p.p_id and ppr.status_cd = '0' 
inner join p_privilege_group ppg on ppr.pg_id = ppg.pg_id and ppg.status_cd = '0'
inner join p_privilege_user ppu on ppu.p_id  = ppg.pg_id and ppu.privilege_flag = '1' and ppu.status_cd = '0' and ppu.user_id = #userId#
where mmg.status_cd = '0'
union
select mmg.`name` gName,mmg.g_id gId,m.`name` mName,m.m_id mId,p.`name` pName,p.p_id pId, '-1' pgId,'' pgName,mmg.seq
from m_menu_group mmg
INNER JOIN m_menu m on mmg.g_id = m.g_id and m.status_cd = '0'
inner join p_privilege p on m.m_id = p.m_id and p.status_cd = '0' and p.domain in (#domain#,'9999')
inner join p_privilege_user ppu on ppu.p_id  = p.p_id and ppu.privilege_flag = '0' and ppu.status_cd = '0' and ppu.user_id = #userId#
where mmg.status_cd = '0'
) tt
order by tt.seq asc "}