当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Analysis of kubernetes service types: from concept to practice
- Adobe Lightroom /Lr 2021软件安装包(附安装教程)
- Annual salary of 900000 programmers is not as good as 3800 civil servants a month? How to choose between stability and high income?
- Using subprocess residue in supervisor and python multiprocessing
- How to choose a good company
- Got timeout reading communication packets解决方法
- Python image recognition OCR
- Let's talk about the locks in the database
- easyui dialog“缓存问题”
- 看一遍就理解,图解单链表反转
猜你喜欢

洞察——风格注意力网络(SANet)在任意风格迁移中的应用

数据库基本操作

Git code submission operation, and git push prompt failed to push some refs'xxx '

What do you think of the most controversial programming ideas?

See once to understand, graphic single chain table inversion

盘点那些争议最大的编程观点,你是什么看法呢?

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

Let's talk about the locks in the database

14000 word distributed transaction principle analysis, master all of them, are you afraid of being asked in the interview?

More than 50 object detection datasets from different industries
随机推荐
Do not understand the underlying principle of database index? That's because you don't have a B tree in your heart
Summary of the resumption of a 618 promotion project
一万四千字分布式事务原理解析,全部掌握你还怕面试被问?
Recommend suicide, openai warns: gpt-3 is too risky for medical purposes
CPP (1) installation of cmake
统计文本中字母的频次(不区分大小写)
More than 50 object detection datasets from different industries
「混合云」会是云计算的下一个战场吗?
AFO记
Count the frequency of letters in text (case insensitive)
分享几个我日常使用的VS Code插件
awk实现类sql的join操作
See once to understand, graphic single chain table inversion
Web Security (4) -- XSS attack
A detailed explanation of microservice architecture
awk实现类sql的join操作
How to choose a good company
一万四千字分布式事务原理解析,全部掌握你还怕面试被问?
团灭 LeetCode 股票买卖问题
What is the relationship between low code vs model driven?
