From 7e96383530a1b3695c8cdbce02afa40b5fb01a25 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Mon, 21 Aug 2023 14:59:21 +0800 Subject: [PATCH] fix --- service/repositories/image_handle.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index 305ffe2c..1f86dacb 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -281,6 +281,8 @@ func (l *defaultImageHandle) LogoStandard(ctx context.Context, in *LogoStandardR json.Unmarshal([]byte(*resourceInfo.Metadata), &logoStandardMetaData) } // 取出参数 + ismaxProportion = logoStandardMetaData.Result.IsmaxProportion + imgColor = logoStandardMetaData.Result.ImgColor return &LogoStandardRes{ ResourceId: resourceInfo.ResourceId, @@ -360,6 +362,20 @@ func (l *defaultImageHandle) LogoStandard(ctx context.Context, in *LogoStandardR imgColor = append(imgColor, v.(string)) } + var logoStandardRes LogoStandardRes + logoStandardRes.IsmaxProportion = ismaxProportion + logoStandardRes.ImgColor = imgColor + + logoStandardMetaData.Param = *in + logoStandardMetaData.Result = logoStandardRes + metadataB, err := json.Marshal(logoStandardMetaData) + if err != nil { + logx.Error(err) + return nil, err + } + + var metadata = string(metadataB) + // 上传文件 var upload = file.Upload{ Ctx: ctx, @@ -372,6 +388,7 @@ func (l *defaultImageHandle) LogoStandard(ctx context.Context, in *LogoStandardR FileData: fileBase, UploadBucket: 1, ApiType: 2, + Metadata: metadata, }) if err != nil { logx.Error(err)