From d16cc9b5c077c121d300b374abf49b914644b3ef Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 18 Jun 2021 16:55:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4=E4=B8=8B=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/base/mapper/ext/ExtProjectMapper.xml | 6 ++++++ .../java/io/metersphere/controller/ProjectController.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml index 782514f831..0c2c5669ae 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtProjectMapper.xml @@ -62,6 +62,12 @@ #{value} + + AND p.workspace_id IN + + #{value} + + diff --git a/backend/src/main/java/io/metersphere/controller/ProjectController.java b/backend/src/main/java/io/metersphere/controller/ProjectController.java index 13ba4113d9..2f94268875 100644 --- a/backend/src/main/java/io/metersphere/controller/ProjectController.java +++ b/backend/src/main/java/io/metersphere/controller/ProjectController.java @@ -90,7 +90,7 @@ public class ProjectController { if (StringUtils.isBlank(request.getProjectId())) { List sourceIds = SessionUtils.getUser().getUserGroups().stream().map(UserGroup::getSourceId).collect(Collectors.toList()); request.setFilters(new HashMap>() {{ - put("project_id", sourceIds); + put("workspace_id", sourceIds); }}); } Page page = PageHelper.startPage(goPage, pageSize, true);