From 86547b9267e0427e0d1890040e858fd7964cbc32 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Wed, 18 Oct 2023 11:54:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=90=88=E5=9B=BE=E6=96=B0=E5=A2=9Edebug?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/internal/logic/logocombinelogic.go | 11 +++++------ service/repositories/image_handle.go | 13 ++++--------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/server/resource/internal/logic/logocombinelogic.go b/server/resource/internal/logic/logocombinelogic.go index 609a4316..2a601548 100644 --- a/server/resource/internal/logic/logocombinelogic.go +++ b/server/resource/internal/logic/logocombinelogic.go @@ -116,6 +116,7 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth }, ProductTemplateTagGroups: req.TemplateTagGroups, ProductTemplateV2Info: productTemplateV2Info, + Debug: userinfo.Debug, }) if err != nil { @@ -124,10 +125,8 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth // 返回成功的响应和上传URL return resp.SetStatus(basic.CodeOK, map[string]interface{}{ - "resource_id": res.ResourceId, - "resource_url": res.ResourceUrl, - "resource_metadata": "", - "diff_time_logo_combine": res.DiffTimeLogoCombine, - "diff_time_upload_file": res.DiffTimeUploadFile, - }) + "resource_id": res.ResourceId, + "resource_url": res.ResourceUrl, + "resource_metadata": "", + }).WithDebug(res.DebugData) } diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index 170eeb1c..bde815fa 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -131,12 +131,10 @@ type ( Debug *auth.Debug `json:"debug"` } LogoCombineRes struct { - ResourceId string - ResourceUrl *string - Metadata *string - DiffTimeLogoCombine int64 - DiffTimeUploadFile int64 - DebugData *auth.DebugData `json:"debug_data"` + ResourceId string + ResourceUrl *string + Metadata *string + DebugData *auth.DebugData `json:"debug_data"` } ) type TemplateTagColor struct { @@ -314,9 +312,6 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq resp.ResourceId = uploadRes.ResourceId resp.ResourceUrl = &uploadRes.ResourceUrl - resp.DiffTimeLogoCombine = diffTimeLogoCombine - resp.DiffTimeUploadFile = diffTimeUploadFile - if in.Debug != nil { resp.DebugData = &auth.DebugData{ DiffTimeLogoCombine: diffTimeLogoCombine,