1.主要思想:根据已有数据,规则性的造数据 select * FROM(select lId,strName,lId as lParentId,-1 as orderIdx from tbClassify WHERE lParentId = 0 UNION ALL(select t1.* from tbClassify t1 join(select lId from tbClassify where lParentId=0 order by orderIdx) t2 ont1.lParentI
紧接上一篇,将List<Menu>的扁平结构数据, 转换成树形结构的数据 返回给前端 , 废话不多说,开撸! --------------------- 步骤: 1. 建 Menu实体结构 public class Menu { /// <summary> /// ID /// </summary> public int ID { get; set; } /// <summary> /// 菜单名 /// </summary> publi