Commit fa7743e0 by guanzhenshan

解决菜单重复的问题

parent 579b1262
......@@ -74,7 +74,7 @@ namespace Bailun.DC.Services
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";
obj = cn.Query<dc_menu>(sql, null, null, true, 2 * 60).Distinct().ToList();
obj = cn.Query<dc_menu>(sql, null, null, true, 2 * 60).ToList();
foreach (var item in obj.Where(a => a.parentid == 0))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment