递归查询

/**
* 递归查询
* */
@Override
public List<String> getList(String wwid) {
List<String>returnList = Lists.newArrayList();
List<String>list = managerScoreMapper.mssqlGetWwIdByWwId(wwid);
if (ObjectUtils.isNotEmpty(list)){
list.forEach(v->{
returnList.add(v);
List<String>list1 = getList(v);
if (ObjectUtils.isNotEmpty(list1)){
list1.forEach(v1->{
returnList.add(v1);
});
}
});
}
return returnList;
}
posted @ 2022-01-12 16:22  IT-Jack  阅读(43)  评论(0编辑  收藏  举报