From 988f6c2537463a6df5ee5ace6332c40e4436a6f5 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Tue, 22 Aug 2023 10:16:03 +0800 Subject: [PATCH 1/2] fix --- server/upload/internal/logic/uploadlogologic.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/upload/internal/logic/uploadlogologic.go b/server/upload/internal/logic/uploadlogologic.go index 82d0427b..3d441f07 100644 --- a/server/upload/internal/logic/uploadlogologic.go +++ b/server/upload/internal/logic/uploadlogologic.go @@ -3,6 +3,7 @@ package logic import ( "encoding/json" "errors" + "fmt" "fusenapi/model/gmodel" "fusenapi/utils/auth" "fusenapi/utils/basic" @@ -154,9 +155,10 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us } var resultStr string - var postMap = make(map[string]interface{}, 1) + var postMap = make(map[string]string, 1) postMap["logo_url"] = uploadRes.ResourceUrl postMapB, _ := json.Marshal(postMap) + fmt.Println(string(postMapB)) var headerData = make(map[string]string, 1) headerData["Content-Type"] = "application/json" From 5e00447da344e9f180df778b72b5934633366938 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Tue, 22 Aug 2023 10:21:46 +0800 Subject: [PATCH 2/2] fix --- service/repositories/image_handle.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index 01310e23..c1899458 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -97,10 +97,6 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq json.Unmarshal(hashKeyDataB, &hashKeyDataMap) var resourceId string = hash.JsonHashKey(hashKeyDataMap) - fmt.Println("hashKeyData:", hashKeyData) - - fmt.Println("resourceId:", resourceId) - resourceModel := gmodel.NewFsResourceModel(l.MysqlConn) resourceInfo, err := resourceModel.FindOneById(ctx, resourceId) if err == nil && resourceInfo.ResourceId != "" { @@ -179,7 +175,7 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq } logx.Infof("合图请求算法--结束时间:%v", time.Now()) - logx.Infof("合图请求算法--返回结果:%v", string(b)) + var resultStr string if string(b) == "Internal Server Error" { err = errors.New("BLMService fail Internal Server Error")