diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectMemberController.java b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectMemberController.java index 99db476e0b..f7443b6237 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectMemberController.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectMemberController.java @@ -3,10 +3,7 @@ package io.metersphere.project.controller; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.metersphere.project.dto.ProjectUserDTO; -import io.metersphere.project.request.ProjectMemberAddRequest; -import io.metersphere.project.request.ProjectMemberBatchDeleteRequest; -import io.metersphere.project.request.ProjectMemberEditRequest; -import io.metersphere.project.request.ProjectMemberRequest; +import io.metersphere.project.request.*; import io.metersphere.project.service.ProjectMemberService; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.system.dto.CommentUserInfo; @@ -98,7 +95,7 @@ public class ProjectMemberController { @Operation(summary = "项目管理-成员-批量添加至用户组") @RequiresPermissions(PermissionConstants.PROJECT_USER_UPDATE) @CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project") - public void addMemberRole(@RequestBody ProjectMemberAddRequest request) { + public void addMemberRole(@RequestBody ProjectMemberAddRoleRequest request) { projectMemberService.addRole(request, SessionUtils.getUserId()); } diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.java b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.java index 14b840a355..a0c6b90c45 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.java @@ -1,12 +1,12 @@ package io.metersphere.project.mapper; import io.metersphere.project.dto.ProjectUserRoleDTO; -import io.metersphere.project.request.ProjectMemberBatchDeleteRequest; import io.metersphere.project.request.ProjectUserRoleMemberRequest; import io.metersphere.project.request.ProjectUserRoleRequest; import io.metersphere.system.domain.User; import io.metersphere.system.domain.UserRoleRelation; import io.metersphere.system.dto.sdk.OptionDTO; +import io.metersphere.system.dto.table.TableBatchProcessDTO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -57,5 +57,10 @@ public interface ExtProjectUserRoleMapper { */ List getProjectUserSelectList(@Param("projectId") String projectId, @Param("keyword") String keyword); - ListgetProjectRoleMemberIds(@Param("request") ProjectMemberBatchDeleteRequest request); + /** + * 根据列表参数获取选中的用户ID集合 + * @param request 列表请求参数 + * @return 用户ID集合 + */ + List getProjectRoleMemberIds(@Param("request") TableBatchProcessDTO request); } diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.xml b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.xml index c561598bc6..5c691d6d5f 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.xml +++ b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectUserRoleMapper.xml @@ -65,7 +65,7 @@