fix:上传logo
This commit is contained in:
parent
98851a41ea
commit
acf3b9bacc
|
@ -208,7 +208,8 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// 更新用户信息
|
// 更新用户信息
|
||||||
userInfoGorm := tx.Where("module = ?", "profile")
|
var module = "profile"
|
||||||
|
userInfoGorm := tx.Where("module = ?", module)
|
||||||
userInfo := gmodel.FsUserInfo{}
|
userInfo := gmodel.FsUserInfo{}
|
||||||
if userId > 0 {
|
if userId > 0 {
|
||||||
userInfoGorm.Where("user_id = ?", userId)
|
userInfoGorm.Where("user_id = ?", userId)
|
||||||
|
@ -257,6 +258,7 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
userInfo.Module = &module
|
||||||
resCreate := tx.Create(&userInfo)
|
resCreate := tx.Create(&userInfo)
|
||||||
err = resCreate.Error
|
err = resCreate.Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user