join dc_menu_permission t2 on t1.id=t2.menuid and t2.delstatus=0 and t2.role_id in ({string.Join(",",objRoles.Select(a=>a.role_id))})
where t1.delstatus=0 AND t1.is_develop = 0
union all
select t1.id,t1.parentid,t1.icon,t1.`name`,t1.path,t1.sort from dc_menu t1 where t1.delstatus=0 {(objRoles.Select(a=>a.role_id).Contains(37)?string.Empty:"AND t1.is_develop = 0")} and 1 = (select isall from dc_menu_permission where role_id in ({string.Join(",",objRoles.Select(a=>a.role_id))}) and isall=1 and delstatus=0 order by isall desc limit 1)) tb order by parentid,sort";
select t1.id,t1.parentid,t1.icon,t1.`name`,t1.path,t1.sort from dc_menu t1 where t1.delstatus=0 {(objRoles.Select(a=>a.role_id).Contains(37)?"OR t1.is_develop = 1":"AND t1.is_develop = 0")} and 1 = (select isall from dc_menu_permission where role_id in ({string.Join(",",objRoles.Select(a=>a.role_id))}) and isall=1 and delstatus=0 order by isall desc limit 1)) tb order by parentid,sort";