fix:设置当前logo
This commit is contained in:
parent
bf9c6c9386
commit
37e0d03de1
|
@ -149,14 +149,19 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
|
|||
return err
|
||||
}
|
||||
userInfo.Metadata = &metadataBUserInfo
|
||||
userInfo.Utime = &nowTime
|
||||
|
||||
if userInfo.Id == 0 {
|
||||
// 新增
|
||||
userInfo.Module = &module
|
||||
userInfo.Ctime = &nowTime
|
||||
userInfo.Utime = &nowTime
|
||||
userInfo.UserId = &userId
|
||||
userInfo.GuestId = &guestId
|
||||
resCreate := tx.Model(&userInfo).Create(&userInfo)
|
||||
err = resCreate.Error
|
||||
} else {
|
||||
// 更新
|
||||
userInfo.Utime = &nowTime
|
||||
resUpdates := tx.Model(&userInfo).Select("metadata").Where("id = ?", userInfo.Id).Updates(&userInfo)
|
||||
err = resUpdates.Error
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user