From d83f96c6010f15be19302fb611146a10dd8052be Mon Sep 17 00:00:00 2001 From: nixj Date: Thu, 27 Jun 2024 14:35:57 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90update=E3=80=91null=E5=80=BC=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/chint/manage/util/BaseUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chint/manage/util/BaseUtil.java b/src/main/java/com/chint/manage/util/BaseUtil.java index 6db0cdb2..2d3ad896 100644 --- a/src/main/java/com/chint/manage/util/BaseUtil.java +++ b/src/main/java/com/chint/manage/util/BaseUtil.java @@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.List; +import java.util.Objects; /** * 基础方法工具类 @@ -28,7 +29,7 @@ public class BaseUtil { } public List getRouteIds(){ - List list = BaseContext.getCurrentUser().loadRoleOrg().getRoleOrgCodeList(); + List list = BaseContext.getCurrentUser().loadRoleOrg().getRoleOrgCodeList().stream().filter(Objects::nonNull).toList(); List result= jdbcRouteOrderExtensionFieldBasicRepository.findAllByBelongDeptCodeIn(list); return result.stream().map(RouteOrderExtensionFieldBasic::getRouteId).toList(); }