...
|
...
|
@@ -3,6 +3,7 @@ package repository |
|
|
import (
|
|
|
"context"
|
|
|
"fmt"
|
|
|
|
|
|
"github.com/jinzhu/copier"
|
|
|
"github.com/pkg/errors"
|
|
|
"github.com/tiptok/gocomm/pkg/cache"
|
...
|
...
|
@@ -43,7 +44,7 @@ func (repository *CompanyRepository) 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 {
|
...
|
...
|
|