fix:上传logo

This commit is contained in:
momo 2023-09-07 13:23:43 +08:00
parent 98851a41ea
commit acf3b9bacc

View File

@ -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 {