diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/CaseReviewController.java b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/CaseReviewController.java index 294ae76dec..772d8661a4 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/CaseReviewController.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/CaseReviewController.java @@ -9,8 +9,8 @@ import io.metersphere.functional.service.CaseReviewLogService; import io.metersphere.functional.service.CaseReviewNoticeService; import io.metersphere.functional.service.CaseReviewService; import io.metersphere.sdk.constants.PermissionConstants; -import io.metersphere.system.domain.User; import io.metersphere.system.dto.sdk.request.PosRequest; +import io.metersphere.system.dto.user.UserDTO; import io.metersphere.system.log.annotation.Log; import io.metersphere.system.log.constants.OperationLogType; import io.metersphere.system.notice.annotation.SendNotice; @@ -51,7 +51,7 @@ public class CaseReviewController { } @PostMapping("/module/count") - @Operation(summary = "用例管理-用例评审-获取模块树统计数量") + @Operation(summary = "用例管理-用例评审-统计模块数量") @RequiresPermissions(PermissionConstants.CASE_REVIEW_READ) @CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project") public Map moduleCount(@Validated @RequestBody CaseReviewPageRequest request) { @@ -92,7 +92,7 @@ public class CaseReviewController { @Operation(summary = "用例管理-用例评审-获取具有评审权限的用户") @RequiresPermissions(value = {PermissionConstants.CASE_REVIEW_READ_ADD,PermissionConstants.CASE_REVIEW_READ_UPDATE}, logical = Logical.OR) @CheckOwner(resourceId = "#projectId", resourceType = "project") - public List getReviewUserList(@PathVariable String projectId, @Schema(description = "查询关键字,根据邮箱和用户名查询") + public List getReviewUserList(@PathVariable String projectId, @Schema(description = "查询关键字,根据邮箱和用户名查询") @RequestParam(value = "keyword", required = false) String keyword) { return caseReviewService.getReviewUserList(projectId, keyword); } diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseController.java b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseController.java index d216f43bfe..c6b1d1e063 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseController.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseController.java @@ -139,7 +139,7 @@ public class FunctionalCaseController { } @PostMapping("/module/count") - @Operation(summary = "用例管理-功能用例-表格分页查询文件") + @Operation(summary = "用例管理-功能用例-统计模块数量") @RequiresPermissions(PermissionConstants.FUNCTIONAL_CASE_READ) @CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project") public Map moduleCount(@Validated @RequestBody FunctionalCasePageRequest request) { diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewService.java index 49122f6bce..ca800139c4 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewService.java @@ -17,8 +17,8 @@ import io.metersphere.sdk.constants.ApplicationNumScope; import io.metersphere.sdk.constants.PermissionConstants; import io.metersphere.sdk.exception.MSException; import io.metersphere.sdk.util.BeanUtils; -import io.metersphere.system.domain.User; import io.metersphere.system.dto.sdk.request.PosRequest; +import io.metersphere.system.dto.user.UserDTO; import io.metersphere.system.mapper.ExtUserMapper; import io.metersphere.system.uid.IDGenerator; import io.metersphere.system.uid.NumGenerator; @@ -317,7 +317,7 @@ public class CaseReviewService { * @param keyword 查询关键字,根据邮箱和用户名查询 * @return List */ - public List getReviewUserList(String projectId, String keyword) { + public List getReviewUserList(String projectId, String keyword) { return extUserMapper.getUserByPermission(projectId, keyword, PermissionConstants.CASE_REVIEW_REVIEW); } diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.java b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.java index 546b9d243e..c45c0e8351 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.java @@ -1,6 +1,7 @@ package io.metersphere.system.mapper; import io.metersphere.system.domain.User; +import io.metersphere.system.dto.user.UserDTO; import io.metersphere.system.dto.user.UserExtendDTO; import org.apache.ibatis.annotations.Param; @@ -30,7 +31,7 @@ public interface ExtUserMapper { * @param permission 权限 * @return 用户列表 */ - ListgetUserByPermission(@Param("projectId") String projectId, @Param("keyword") String keyword, @Param("permission") String permission); + ListgetUserByPermission(@Param("projectId") String projectId, @Param("keyword") String keyword, @Param("permission") String permission); long countByIdAndPassword(@Param("userId") String id, @Param("password") String password); diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.xml index 9c19d13794..8e9a4c73c4 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtUserMapper.xml @@ -58,9 +58,10 @@ - + SELECT u.id as id, u.name as name, u.email as email, ue.avatar as avatar FROM user u + LEFT JOIN user_extend ue ON u.id = ue.id LEFT JOIN user_role_relation urr ON u.id = urr.user_id WHERE urr.role_id IN (SELECT urp.role_id FROM user_role_permission urp WHERE urp.permission_id = #{permission}) AND urr.source_id = #{projectId}