作者 tangxvhui
... ... @@ -44,7 +44,7 @@ func (repository *ArticleRepository) Update(ctx context.Context, conn transactio
return nil, err
}
queryFunc := func() (interface{}, error) {
tx = tx.Model(m).Updates(m)
tx = tx.Model(m).Save(m)
return nil, tx.Error
}
if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil {
... ...
... ... @@ -42,7 +42,7 @@ func (repository *ArticleSectionRepository) Update(ctx context.Context, conn tra
return nil, err
}
queryFunc := func() (interface{}, error) {
tx = tx.Model(m).Updates(m)
tx = tx.Model(m).Save(m)
return nil, tx.Error
}
if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil {
... ...