当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Deep into web workers (1)
- Git code submission operation, and git push prompt failed to push some refs'xxx '
- On hiz buffer
- What kind of technical ability should a programmer who has worked for 1-3 years? How to improve?
- [C + + learning notes] how about the simple use of the C + + standard library STD:: thread?
- Improvement of maintenance mode of laravel8 update
- 【解决方案】分布式定时任务解决方案
- 低代码 vs 模型驱动,它们之间到底是什么关系?
- 工作1-3年的程序员,应该具备怎么样的技术能力?该如何提升?
- static+代码块+多态+异常
猜你喜欢
洞察——风格注意力网络(SANet)在任意风格迁移中的应用
Deep into web workers (1)
洞察——风格注意力网络(SANet)在任意风格迁移中的应用
The CPU does this without the memory
Analysis of kubernetes service types: from concept to practice
websocket+probuf.原理篇
Ac86u KX Online
工作1-3年的程序员,应该具备怎么样的技术能力?该如何提升?
On the coverage technology and best practice of go code
云计算之路-出海记:整一台 aws 免费云服务器
随机推荐
Adobe Lightroom / LR 2021 software installation package (with installation tutorial)
Sentry installation
三步一坑五步一雷,高速成长下的技术团队怎么带?
Using pipe() to improve code readability in pandas
Kylin on Kubernetes 在 eBay 的实践
Static + code block + polymorphism + exception
ngnix集群高并发
留给快手的时间不多了
「混合云」会是云计算的下一个战场吗?
Recommend suicide, openai warns: gpt-3 is too risky for medical purposes
面部识别:攻击类型和反欺骗技术
C language I blog assignment 03
IDEA-项目未自动生成 .iml 文件
当 TiDB 与 Flink 相结合:高效、易用的实时数仓
低代码 vs 模型驱动,它们之间到底是什么关系?
Insight -- the application of sanet in arbitrary style transfer
Go之发送钉钉和邮箱
When tidb and Flink are combined: efficient and easy to use real-time data warehouse
Python image recognition OCR
洞察——风格注意力网络(SANet)在任意风格迁移中的应用