From a498b53ce45fbd2c03f601d98ac5db8da500ccf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= Date: Tue, 25 Mar 2025 19:54:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=91=E7=9C=A0400ms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/service/cmb_order.go | 5 +++++ third_party/swagger_ui/openapi.yaml | 20 +++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/internal/service/cmb_order.go b/internal/service/cmb_order.go index 0d4003f..be46ae9 100644 --- a/internal/service/cmb_order.go +++ b/internal/service/cmb_order.go @@ -5,6 +5,7 @@ import ( "encoding/json" "github.com/go-kratos/kratos/v2/errors" "github.com/go-kratos/kratos/v2/log" + "time" err2 "voucher/api/err" v1 "voucher/api/v1" "voucher/internal/biz/bo" @@ -64,6 +65,10 @@ func (c *CmbService) order(ctx context.Context, request *v1.CmbRequest) (string, return "", err } + if bizContent.ActivityId == "001" { + time.Sleep(400 * time.Millisecond) + } + boReq := &bo.OrderCreateReqBo{ OutBizNo: bizContent.TransactionId, ProductNo: bizContent.ActivityId, diff --git a/third_party/swagger_ui/openapi.yaml b/third_party/swagger_ui/openapi.yaml index dcbcf7d..eb8440b 100644 --- a/third_party/swagger_ui/openapi.yaml +++ b/third_party/swagger_ui/openapi.yaml @@ -157,7 +157,9 @@ components: properties: transactionId: type: string - description: "业务参数\r\n 唯一流水号,需支持14天内幂等" + description: |- + 业务参数 + 唯一流水号,需支持14天内幂等 activityId: type: string description: 外部合作方权益批次号 @@ -181,19 +183,25 @@ components: properties: activityId: type: string - description: "业务参数\r\n 外部合作方权益批次号" + description: |- + 业务参数 + 外部合作方权益批次号 api.v1.CmbQueryRequest: type: object properties: codeNo: type: string - description: "业务参数\r\n 外部合作方权益批次号" + description: |- + 业务参数 + 外部合作方权益批次号 api.v1.CmbReply: type: object properties: respCode: type: string - description: "响应公共参数\r\n 接口调用返回码,1000 成功,1001 失败" + description: |- + 响应公共参数 + 接口调用返回码,1000 成功,1001 失败 respMsg: type: string description: 返回话术,失败信息落此字段 @@ -217,7 +225,9 @@ components: properties: mid: type: string - description: "请求公共参数\r\n 合作方唯一ID,32位定长" + description: |- + 请求公共参数 + 合作方唯一ID,32位定长 aid: type: string description: 应用唯一ID,32位定长