server/service/src/main/java/com/doumee/dao/system/vo/DepartmentTree.java
@@ -3,6 +3,7 @@ import com.doumee.core.utils.Constants; import com.doumee.dao.business.model.Company; import com.doumee.dao.business.model.CompanyDepartment; import com.github.xiaoymin.knife4j.core.util.CollectionUtils; import org.apache.commons.lang3.StringUtils; import java.util.ArrayList; @@ -95,6 +96,11 @@ } // for循环结束,即节点下没有任何节点,树形构建结束,设置树结果 pNode.setChildList(childTree); if(CollectionUtils.isNotEmpty(childTree)){ pNode.setHasChildren(false); }else{ pNode.setHasChildren(true); } return pNode; }