fix:upload设置
This commit is contained in:
parent
3e018487c6
commit
6e71fde6f5
|
@ -122,7 +122,7 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
|
|||
return err
|
||||
}
|
||||
userMaterialInfo.Metadata = &metadataBUserMaterial
|
||||
resUpdates := tx.Model(&gmodel.FsUserMaterial{}).Select("metadata", "ctime").Where("id = ?", req.LogoSelectedId).Updates(&userMaterialInfo)
|
||||
resUpdates := tx.Model(&gmodel.FsUserMaterial{}).Select("metadata", "utime").Where("id = ?", req.LogoSelectedId).Updates(&userMaterialInfo)
|
||||
err = resUpdates.Error
|
||||
if err != nil {
|
||||
if err != gorm.ErrRecordNotFound {
|
||||
|
@ -218,7 +218,7 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
|
|||
} else {
|
||||
// 更新
|
||||
userInfo.Utime = &nowTime
|
||||
resUpdates := tx.Model(&gmodel.FsUserInfo{}).Select("metadata", "ctime").Where("id = ?", userInfo.Id).Updates(&userInfo)
|
||||
resUpdates := tx.Model(&gmodel.FsUserInfo{}).Select("metadata", "utime").Where("id = ?", userInfo.Id).Updates(&userInfo)
|
||||
err = resUpdates.Error
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user