From c3738739bac832f6727eed06f9104946c2cc4c68 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Fri, 10 Apr 2020 11:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/base/mapper/ext/ExtWorkspaceMapper.java | 4 +++- .../io/metersphere/base/mapper/ext/ExtWorkspaceMapper.xml | 5 +++++ .../java/io/metersphere/controller/WorkspaceController.java | 5 ++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtWorkspaceMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtWorkspaceMapper.java index 538b463116..57dfd286bf 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtWorkspaceMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtWorkspaceMapper.java @@ -1,10 +1,12 @@ package io.metersphere.base.mapper.ext; +import io.metersphere.controller.request.WorkspaceRequest; import io.metersphere.dto.WorkspaceDTO; +import org.apache.ibatis.annotations.Param; import java.util.List; public interface ExtWorkspaceMapper { - List getWorkspaceWithOrg(); + List getWorkspaceWithOrg(@Param("request") WorkspaceRequest request); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtWorkspaceMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtWorkspaceMapper.xml index a406d61bf1..e4c32b353f 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtWorkspaceMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtWorkspaceMapper.xml @@ -5,6 +5,11 @@ \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java index 6804200919..45f02ff1ae 100644 --- a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java +++ b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java @@ -7,7 +7,6 @@ import io.metersphere.commons.constants.RoleConstants; import io.metersphere.commons.utils.PageUtils; import io.metersphere.commons.utils.Pager; import io.metersphere.controller.request.WorkspaceRequest; -import io.metersphere.dto.OrganizationMemberDTO; import io.metersphere.dto.WorkspaceDTO; import io.metersphere.dto.WorkspaceMemberDTO; import io.metersphere.service.WorkspaceService; @@ -73,9 +72,9 @@ public class WorkspaceController { @PostMapping("list/all/{goPage}/{pageSize}") @RequiresRoles(RoleConstants.ADMIN) - public Pager> getAllWorkspaceList(@PathVariable int goPage, @PathVariable int pageSize) { + public Pager> getAllWorkspaceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody WorkspaceRequest request) { Page page = PageHelper.startPage(goPage, pageSize, true); - return PageUtils.setPageInfo(page, workspaceService.getAllWorkspaceList()); + return PageUtils.setPageInfo(page, workspaceService.getAllWorkspaceList(request)); } @GetMapping("/list/userworkspace/{userId}")