|  |  |  | 
|---|
|  |  |  | import com.zy.asrs.wcs.system.service.MenuService; | 
|---|
|  |  |  | import com.zy.asrs.wcs.utils.ExcelUtil; | 
|---|
|  |  |  | import com.zy.asrs.wcs.utils.NodeUtils; | 
|---|
|  |  |  | import com.zy.asrs.wcs.utils.Utils; | 
|---|
|  |  |  | import com.zy.asrs.wcs.utils.CommonUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | 
|---|
|  |  |  | //        List<Menu> menus = menuService.list(wrapper); | 
|---|
|  |  |  | //        return R.ok().add(Utils.toTreeData(menus, 0L, Menu::getParentId, Menu::getId, Menu::setChildren)); | 
|---|
|  |  |  | List<Menu> menuList = menuService.list(new LambdaQueryWrapper<Menu>().orderByAsc(Menu::getSort)); | 
|---|
|  |  |  | List<Menu> treeData = Utils.toTreeData(menuList, 0L, Menu::getParentId, Menu::getId, Menu::setChildren); | 
|---|
|  |  |  | List<Menu> treeData = CommonUtils.toTreeData(menuList, 0L, Menu::getParentId, Menu::getId, Menu::setChildren); | 
|---|
|  |  |  | if (!Cools.isEmpty(map.get("condition"))) { | 
|---|
|  |  |  | treeData = Utils.treeRemove(menuList, String.valueOf(map.get("condition")), Menu::getName, Menu::getChildren, Menu::setChildren); | 
|---|
|  |  |  | CommonUtils.treeRemove(treeData, String.valueOf(map.get("condition")), Menu::getName, Menu::getChildren); | 
|---|
|  |  |  | CommonUtils.treeRemove(treeData, String.valueOf(map.get("condition")), Menu::getName, Menu::getChildren); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok().add(treeData); | 
|---|
|  |  |  | } | 
|---|