diff --git a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductModuleServiceImpl.java b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductModuleServiceImpl.java index 215f0b336..433757849 100644 --- a/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductModuleServiceImpl.java +++ b/microservices-modules/microservices-modules-pms/src/main/java/com/microservices/pms/product/service/impl/PmsProductModuleServiceImpl.java @@ -324,8 +324,13 @@ public class PmsProductModuleServiceImpl implements IPmsProductModuleService allPmsProductModule.setId(0L); allPmsProductModule.setModuleName(ALL_MODULE); allPmsProductModule.setNodeDataCount(allNodeDataCount); - allPmsProductModule.setIsFixedModule(pmsProductModule.getIsFixedModule()); + allPmsProductModule.setIsFixedModule(true); moduleList.add(allPmsProductModule); + // 模块根据id排序 + moduleList = moduleList.stream() + .sorted(Comparator.comparing(PmsProductModule::getId)) + .sorted(Comparator.comparing(PmsProductModule::getIsFixedModule)) + .collect(Collectors.toList()); // 构建无所属模块 PmsProductModule noPmsProductModule = new PmsProductModule(); noPmsProductModule.setPmsProductIdentifier(pmsProductModule.getPmsProductIdentifier()); @@ -333,9 +338,8 @@ public class PmsProductModuleServiceImpl implements IPmsProductModuleService noPmsProductModule.setModuleName(NO_MODULE); noPmsProductModule.setParentId(0L); noPmsProductModule.setNodeDataCount(noModuleNodeDataCount); + noPmsProductModule.setIsFixedModule(true); moduleList.add(noPmsProductModule); - // 模块根据id排序 - moduleList = moduleList.stream().sorted(Comparator.comparing(PmsProductModule::getId)).collect(Collectors.toList()); return buildModuleTreeSelect(moduleList); }