From acf3b9baccebe1f2f8489fd4f4ce1afca98aec50 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Thu, 7 Sep 2023 13:23:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=B8=8A=E4=BC=A0logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 2dc66024..e242f3a2 100644 --- a/server/upload/internal/logic/uploadlogologic.go +++ b/server/upload/internal/logic/uploadlogologic.go @@ -208,7 +208,8 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us return err } // 更新用户信息 - userInfoGorm := tx.Where("module = ?", "profile") + var module = "profile" + userInfoGorm := tx.Where("module = ?", module) userInfo := gmodel.FsUserInfo{} if userId > 0 { userInfoGorm.Where("user_id = ?", userId) @@ -257,6 +258,7 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us } } } else { + userInfo.Module = &module resCreate := tx.Create(&userInfo) err = resCreate.Error if err != nil {