varobjRoles=cn.Query<dc_user_role_relation>("select t1.* from dc_user_role_relation t1 join dc_user_role t2 on t1.role_id=t2.id and t2.delstatus=0 where t1.delstatus=0 and t1.userid="+uid);
if(objRoles.Count()==0)
{
returnlist;
}
varsql=$@"select * from (select t1.id,t1.parentid,t1.icon,t1.`name`,t1.path,t1.sort from dc_menu t1
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
union all
select t1.id,t1.parentid,t1.icon,t1.`name`,t1.path,t1.sort from dc_menu t1 where t1.delstatus=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";
varobjRoles=cn.Query<dc_user_role_relation>("select t1.* from dc_user_role_relation t1 join dc_user_role t2 on t1.role_id=t2.id and t2.delstatus=0 where t1.delstatus=0 and t1.userid="+uid);