diff --git a/epdc-cloud-news/src/main/java/com/elink/esua/epdc/service/impl/ModuleTypeServiceImpl.java b/epdc-cloud-news/src/main/java/com/elink/esua/epdc/service/impl/ModuleTypeServiceImpl.java index f4b219e..6d66153 100644 --- a/epdc-cloud-news/src/main/java/com/elink/esua/epdc/service/impl/ModuleTypeServiceImpl.java +++ b/epdc-cloud-news/src/main/java/com/elink/esua/epdc/service/impl/ModuleTypeServiceImpl.java @@ -291,8 +291,10 @@ public class ModuleTypeServiceImpl extends BaseServiceImpl others = this.getOtherDept(deptList, parent); - - while (!others.isEmpty()) { + int startSize = 0; + int endSize = others.size(); + while (!others.isEmpty() && startSize != endSize) { + startSize = endSize; for (int i = 0; i < parent.size(); i++) { node = parent.getJSONObject(i); children = new JSONArray(); @@ -312,7 +314,7 @@ public class ModuleTypeServiceImpl extends BaseServiceImpl