diff --git a/backend/services/bug-management/src/main/java/io/metersphere/bug/controller/BugRelateCaseController.java b/backend/services/bug-management/src/main/java/io/metersphere/bug/controller/BugRelateCaseController.java index a44d59e252..4d2102a59e 100644 --- a/backend/services/bug-management/src/main/java/io/metersphere/bug/controller/BugRelateCaseController.java +++ b/backend/services/bug-management/src/main/java/io/metersphere/bug/controller/BugRelateCaseController.java @@ -43,7 +43,7 @@ public class BugRelateCaseController { private BugRelateCaseCommonService bugRelateCaseCommonService; @PostMapping("/un-relate/page") - @Operation(description = "缺陷管理-关联用例-未关联用例-列表分页") + @Operation(summary = "缺陷管理-关联用例-未关联用例-列表分页") @RequiresPermissions(PermissionConstants.PROJECT_BUG_READ) public Pager> unRelatedPage(@Validated @RequestBody TestCasePageProviderRequest request) { bugRelateCaseCommonService.checkCaseTypeParamIllegal(request.getSourceType()); @@ -77,7 +77,7 @@ public class BugRelateCaseController { } @PostMapping("/page") - @Operation(description = "缺陷管理-关联用例-列表分页查询") + @Operation(summary = "缺陷管理-关联用例-列表分页查询") @RequiresPermissions(PermissionConstants.PROJECT_BUG_READ) public Pager> page(@Validated @RequestBody BugRelatedCasePageRequest request) { Page page = PageHelper.startPage(request.getCurrent(), request.getPageSize()); @@ -85,7 +85,7 @@ public class BugRelateCaseController { } @GetMapping("/un-relate/{id}") - @Operation(description = "缺陷管理-关联用例-取消关联用例") + @Operation(summary = "缺陷管理-关联用例-取消关联用例") @RequiresPermissions(PermissionConstants.PROJECT_BUG_UPDATE) @Parameter(name = "id", description = "ID", schema = @Schema(requiredMode = Schema.RequiredMode.REQUIRED)) @Log(type = OperationLogType.DISASSOCIATE, expression = "#msClass.getRelateLog(#id)", msClass = BugRelateCaseLogService.class) @@ -94,7 +94,7 @@ public class BugRelateCaseController { } @GetMapping("/check-permission/{projectId}/{caseType}") - @Operation(description = "缺陷管理-关联用例-查看用例权限校验") + @Operation(summary = "缺陷管理-关联用例-查看用例权限校验") @Parameters({ @Parameter(name = "projectId", description = "项目ID", schema = @Schema(requiredMode = Schema.RequiredMode.REQUIRED)), @Parameter(name = "caseType", description = "关联用例类型(FUNCTIONAL, API, SCENARIO)", schema = @Schema(requiredMode = Schema.RequiredMode.REQUIRED)) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/utils/ServiceUtils.java b/backend/services/system-setting/src/main/java/io/metersphere/system/utils/ServiceUtils.java index efa55e15f6..7176b52e6e 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/utils/ServiceUtils.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/utils/ServiceUtils.java @@ -8,6 +8,7 @@ import io.metersphere.system.dto.sdk.request.PosRequest; import jakarta.validation.ConstraintViolation; import jakarta.validation.Validator; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import java.lang.reflect.Method; import java.util.ArrayList; @@ -120,6 +121,9 @@ public class ServiceUtils { } public static String compressName(String name, int maxSize) { + if (StringUtils.isBlank(name)) { + return StringUtils.EMPTY; + } String newName = name; // 限制名称长度 (数据库里最大的长度是255,这里判断超过250时截取到200附近) if (newName.length() > maxSize) { diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.java index 35a292afa9..f1a529e9ad 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.java @@ -27,10 +27,10 @@ public interface ExtTestPlanReportApiCaseMapper { /** * 获取项目下接口用例所属模块集合 - * @param projectId 计划ID + * @param ids 模块ID集合 * @return 模块集合 */ - List getPlanExecuteCaseModules(@Param("id") String projectId); + List getPlanExecuteCaseModules(@Param("ids") List ids); /** * 分页查询报告关联的用例 diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml index 0091bf055e..1bea6486d8 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanReportApiCaseMapper.xml @@ -20,8 +20,11 @@