第一次写,呃呃,直接上代码把(本人还是菜鸟,如有不足,求大佬指点)
private List
<Integer
> getAllSubDepId(List
<Integer
> depList
){
try{
for(int dep
: depList
){
if(!下级部门id集合
.isEmpty()){
depList
.addAll(Objects
.requireNonNull(this.getAllSubDepId(下级部门id集合
)))
return depList
;
}
}
return depList
}catch(Exception e
){
return null;
}
}
转载请注明原文地址: https://www.6miu.com/read-5031480.html