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 {