From e2c802ceef38265198707ad71b4c48acdb477881 Mon Sep 17 00:00:00 2001 From: OTTO <731554297@qq.com> Date: Fri, 20 Dec 2024 08:47:46 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E9=87=8D=E6=9E=84):=20?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=A7=E5=93=81=E9=9C=80=E6=B1=82=E8=A7=84?= =?UTF-8?q?=E6=A0=BC=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 产品需求固定模块排序到最后面 Signed-off-by: OTTO <731554297@qq.com> --- .../service/impl/PmsProductModuleServiceImpl.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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); }