sort 升序

parent aaf4d118
...@@ -29,7 +29,7 @@ private List<MenuResponse> RecursionFill(List<sys_menu> menuList, int parentId) ...@@ -29,7 +29,7 @@ private List<MenuResponse> RecursionFill(List<sys_menu> menuList, int parentId)
if (menuList.Any(t => t.ParentID == parentId)) if (menuList.Any(t => t.ParentID == parentId))
{ {
var list = new List<MenuResponse>(); var list = new List<MenuResponse>();
foreach (var item in menuList.Where(t => t.ParentID == parentId).OrderByDescending(t => t.Sort)) foreach (var item in menuList.Where(t => t.ParentID == parentId).OrderBy(t => t.Sort))
{ {
var menu = Mapper.Map<MenuResponse>(item); var menu = Mapper.Map<MenuResponse>(item);
menu.Children = RecursionFill(menuList, item.ID); menu.Children = RecursionFill(menuList, item.ID);
......
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