fix:设置当前logo

This commit is contained in:
momo 2023-09-08 18:22:44 +08:00
parent 7abcfadd93
commit bf9c6c9386

View File

@ -109,11 +109,11 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
}
}
var module = "profile"
if req.SetLogoSelected == 1 {
var userInfo = &gmodel.FsUserInfo{}
BuilderDB := tx.Model(&gmodel.FsUserInfo{}).Where("module = ?", "profile")
BuilderDB := tx.Model(&gmodel.FsUserInfo{}).Where("module = ?", module)
if userId > 0 {
BuilderDB.Where("user_id=?", userId)
} else {
@ -152,6 +152,7 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
userInfo.Utime = &nowTime
if userInfo.Id == 0 {
// 新增
userInfo.Module = &module
resCreate := tx.Model(&userInfo).Create(&userInfo)
err = resCreate.Error
} else {