From d639a12efccd4676b52934f4328324816e434ec3 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Fri, 25 Oct 2024 14:07:32 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E6=96=B0=E5=A2=9E=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/definition/ApiDocShareController.java | 3 +++ .../api/dto/definition/request/ApiDocShareExportRequest.java | 3 +++ frontend/src/models/bug-management.ts | 2 +- frontend/src/views/bug-management/utils.ts | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/controller/definition/ApiDocShareController.java b/backend/services/api-test/src/main/java/io/metersphere/api/controller/definition/ApiDocShareController.java index aa26720369..5731482f1b 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/controller/definition/ApiDocShareController.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/controller/definition/ApiDocShareController.java @@ -128,6 +128,9 @@ public class ApiDocShareController { @Operation(summary = "接口测试-定义-分享-导出") @Parameter(name = "type", description = "导出类型", schema = @Schema(requiredMode = Schema.RequiredMode.REQUIRED)) public String export(@RequestBody ApiDocShareExportRequest request, @PathVariable String type) { + List protocols = apiTestService.getProtocols(request.getOrgId()); + List protocolList = protocols.stream().map(ProtocolDTO::getProtocol).toList(); + request.setProtocols(protocolList); return apiDocShareService.export(request, type, SessionUtils.getUserId()); } diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/definition/request/ApiDocShareExportRequest.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/definition/request/ApiDocShareExportRequest.java index 8356ffd7fb..9ce6ea7da6 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/dto/definition/request/ApiDocShareExportRequest.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/definition/request/ApiDocShareExportRequest.java @@ -14,4 +14,7 @@ public class ApiDocShareExportRequest extends ApiDefinitionBatchExportRequest { @Schema(description = "分享ID", requiredMode = Schema.RequiredMode.REQUIRED) private String shareId; + + @Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED) + private String orgId; } diff --git a/frontend/src/models/bug-management.ts b/frontend/src/models/bug-management.ts index 1223825e35..af7f0695af 100644 --- a/frontend/src/models/bug-management.ts +++ b/frontend/src/models/bug-management.ts @@ -61,7 +61,7 @@ export interface BugEditCustomFieldItem { name: string; type: string | undefined; value: string; - text?: string[] | null; // 消息通知文本提示 + text?: string | null; // 消息通知文本提示 } export type BugBatchUpdateFiledType = 'single_select' | 'multiple_select' | 'tags' | 'input' | 'user_selector' | 'date'; export interface BugBatchUpdateFiledForm { diff --git a/frontend/src/views/bug-management/utils.ts b/frontend/src/views/bug-management/utils.ts index 0f28e53923..af18fb23a3 100644 --- a/frontend/src/views/bug-management/utils.ts +++ b/frontend/src/views/bug-management/utils.ts @@ -88,7 +88,7 @@ export function getCurrentText(item: FormRuleItem, currentCustomFields: CustomFi : currentItemOptions.filter((e: any) => e.value === item.value); const optionText = filteredOptions.map((option) => option.text); - return optionText; + return JSON.stringify(optionText); } return null; }