From 3cb5ccc937dc358460cb2e033525867813f7d25c Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Fri, 25 Aug 2023 10:08:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=AF=B7=E6=B1=82=E7=AE=97=E6=B3=95,?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/internal/logic/logocombinelogic.go | 3 ++- server/resource/internal/logic/logoremovebglogic.go | 3 ++- server/upload/internal/logic/uploadlogologic.go | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/server/resource/internal/logic/logocombinelogic.go b/server/resource/internal/logic/logocombinelogic.go index 53b02768..b1d5cc11 100644 --- a/server/resource/internal/logic/logocombinelogic.go +++ b/server/resource/internal/logic/logocombinelogic.go @@ -1,6 +1,7 @@ package logic import ( + "fmt" "fusenapi/service/repositories" "fusenapi/utils/auth" "fusenapi/utils/basic" @@ -70,7 +71,7 @@ func (l *LogoCombineLogic) LogoCombine(req *types.LogoCombineReq, userinfo *auth }) if err != nil { - return resp.SetStatus(basic.CodeServiceErr) + return resp.SetStatus(basic.CodeServiceErr, fmt.Sprintf("算法请求--LOGO信息--错误:%+v", err)) } // 返回成功的响应和上传URL diff --git a/server/resource/internal/logic/logoremovebglogic.go b/server/resource/internal/logic/logoremovebglogic.go index 4091c7a0..648ab01c 100644 --- a/server/resource/internal/logic/logoremovebglogic.go +++ b/server/resource/internal/logic/logoremovebglogic.go @@ -1,6 +1,7 @@ package logic import ( + "fmt" "fusenapi/service/repositories" "fusenapi/utils/auth" "fusenapi/utils/basic" @@ -48,7 +49,7 @@ func (l *LogoRemovebgLogic) LogoRemovebg(req *types.LogoRemovebgReq, userinfo *a }) if err != nil { - return resp.SetStatus(basic.CodeServiceErr) + return resp.SetStatus(basic.CodeServiceErr, fmt.Sprintf("算法请求--LOGO信息--错误:%+v", err)) } // 返回成功的响应和上传URL diff --git a/server/upload/internal/logic/uploadlogologic.go b/server/upload/internal/logic/uploadlogologic.go index 6b6abea0..ea2eefbb 100644 --- a/server/upload/internal/logic/uploadlogologic.go +++ b/server/upload/internal/logic/uploadlogologic.go @@ -1,6 +1,7 @@ package logic import ( + "fmt" "fusenapi/model/gmodel" "fusenapi/service/repositories" "fusenapi/utils/auth" @@ -135,7 +136,7 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us }) if err != nil { logx.Error(err) - return resp.SetStatus(basic.CodeServiceErr) + return resp.SetStatus(basic.CodeServiceErr, fmt.Sprintf("算法请求--LOGO信息--错误:%+v", err)) } logoUrl = resLogoStandard.ResourceUrl } else { @@ -178,7 +179,7 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us if err != nil { logx.Error(err) - return resp.SetStatus(basic.CodeServiceErr) + return resp.SetStatus(basic.CodeServiceErr, fmt.Sprintf("算法请求--LOGO信息--错误:%+v", err)) } resultStr = resLogoStandard.Res