From 61dd727e40db181c509c41c0caefca25f1b62cc2 Mon Sep 17 00:00:00 2001 From: jsonwan Date: Wed, 27 Jul 2022 16:50:29 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E7=A7=BB=E9=99=A4=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E9=9B=86=E5=BC=95=E5=85=A5=E7=9A=84=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E4=BB=A3=E7=A0=81=20#896?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 恢复合并代码时误删的代码 --- .../api/inner/impl/ServiceApplicationResourceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceApplicationResourceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceApplicationResourceImpl.java index 02ca3b365f..d7ae084df2 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceApplicationResourceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/api/inner/impl/ServiceApplicationResourceImpl.java @@ -151,8 +151,11 @@ public InternalResponse> listApps(String scopeType) InternalResponse.buildSuccessResp(appList); } - appList = appList.stream().filter(app -> app.getScope().getType() == ResourceScopeTypeEnum.from(scopeType)) - .collect(Collectors.toList()); + if (scopeType != null) { + appList = appList.stream() + .filter(app -> app.getScope().getType() == ResourceScopeTypeEnum.from(scopeType)) + .collect(Collectors.toList()); + } List resultList = appList.stream().map(this::convertToServiceApp).collect(Collectors.toList());