当前位置:网站首页>Get tree menu list
Get tree menu list
2020-11-07 21:03:00 【Maiyuweng】
Get tree menu list
/**
* Get area tree list
* @return
*/
public List<MapAreaTreeVo> getAreaTreeList(){
List<MapAreaTreeVo> arealist = areaDao.getAreaTreeList(0);
for(MapAreaTreeVo vo :arealist){
// Recursive loop acquisition
vo.setChildren(getAreaTreePidList(vo.getId()));
}
return arealist;
}
/**
* Get the tree list under the parent menu
* @param pid
* @return
*/
public List<MapAreaTreeVo> getAreaTreePidList(Integer pid){
List<MapAreaTreeVo> mapAreaTreeVoList = areaDao.getAreaTreeList(pid);
if(null!=mapAreaTreeVoList && mapAreaTreeVoList.size()>0){
for(MapAreaTreeVo vo:mapAreaTreeVoList){
vo.setChildren(getAreaTreePidList(vo.getId()));
}
}
return mapAreaTreeVoList;
}
Entity class
public class MapAreaTreeVo {
private Integer id;
private Integer pid;
private String title;
private List<MapAreaTreeVo> children;
}
版权声明
本文为[Maiyuweng]所创,转载请带上原文链接,感谢
边栏推荐
- 快速上手Git
- Python 图片识别 OCR
- supervisor进程管理安装使用
- Animation techniques and details you may not know
- Dynamic programming -- state compression DP of set represented by binary
- The CPU does this without the memory
- WPF 关于绘图个人总结
- Stack bracket matching
- Improvement of maintenance mode of laravel8 update
- Adobe Lightroom /Lr 2021软件安装包(附安装教程)
猜你喜欢
![A compilation bug brought by vs2015 Update1 update [existing solutions]](/img/3b/00bc81122d330c9d59909994e61027.jpg)
A compilation bug brought by vs2015 Update1 update [existing solutions]

What magic things can a line of Python code do?

来自不同行业领域的50多个对象检测数据集

What do you think of the most controversial programming ideas?

What kind of technical ability should a programmer who has worked for 1-3 years? How to improve?

Reflection on a case of bus card being stolen and swiped

云计算之路-出海记:整一台 aws 免费云服务器

【C++学习笔记】C++ 标准库 std::thread 的简单使用,一文搞定还不简单?

IDEA-项目未自动生成 .iml 文件

Count the frequency of letters in text (case insensitive)
随机推荐
一万四千字分布式事务原理解析,全部掌握你还怕面试被问?
Animation techniques and details you may not know
Share several vs Code plug-ins I use everyday
Recommend suicide, openai warns: gpt-3 is too risky for medical purposes
It's time to end bertology
年薪90万程序员不如月入3800公务员?安稳与高收入,到底如何选择?
虚拟DOM中给同一层级的元素设置固定且唯一的key为什么能提高性能
See once to understand, graphic single chain table inversion
关于update操作并发问题
Using pipe() to improve code readability in pandas
构造请求日志分析系统
Getting started with go wire dependency injection
The CPU does this without the memory
小熊派开发板实践:智慧路灯沙箱实验之真实设备接入
Dynamic programming -- state compression DP of set represented by binary
Cpp(二) 创建Cpp工程
Web Security (3) -- CSRF attack
What is the relationship between low code vs model driven?
On hiz buffer
你可能不知道的Animation动画技巧与细节