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}")