diff --git a/server/upload/internal/logic/uploadfilebaselogic.go b/server/upload/internal/logic/uploadfilebaselogic.go index 2b1f5d93..dbb0be24 100644 --- a/server/upload/internal/logic/uploadfilebaselogic.go +++ b/server/upload/internal/logic/uploadfilebaselogic.go @@ -61,9 +61,12 @@ func (l *UploadFileBaseLogic) UploadFileBase(req *types.UploadFileBaseReq, useri userId = userinfo.UserId uid = userId } - - guestId = req.GuestId - userId = req.UserId + if guestId == 0 { + guestId = req.GuestId + } + if userId == 0 { + userId = req.UserId + } // 定义存储桶名称 var bucketName *string diff --git a/server/upload/internal/logic/uploadlogologic.go b/server/upload/internal/logic/uploadlogologic.go index 99084502..f9babfb8 100644 --- a/server/upload/internal/logic/uploadlogologic.go +++ b/server/upload/internal/logic/uploadlogologic.go @@ -110,12 +110,16 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us // } // resultStr = string(b) - // 上传图片 - var reqs types.UploadFileBaseReq - // reqs.FileType = + // // 上传图片 + // var reqs types.UploadFileBaseReq + // reqs.ApiType = 2 + // reqs.UploadBucket = 2 + // reqs.Metadata = "" + // reqs.FileData = "" + // reqs.FileKey = "" - // 创建一个业务逻辑层实例 - NewUploadFileBaseLogic(l.ctx, l.svcCtx).UploadFileBase(&reqs, userinfo) + // // 创建一个业务逻辑层实例 + // resUpload := NewUploadFileBaseLogic(l.ctx, l.svcCtx).UploadFileBase(&reqs, userinfo) var module = "logo" var nowTime = time.Now().Unix()