Merge branch 'test' of http://gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss into test
正在显示
2 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -44,7 +44,7 @@ func (repository *ArticleRepository) Update(ctx context.Context, conn transactio | @@ -44,7 +44,7 @@ func (repository *ArticleRepository) Update(ctx context.Context, conn transactio | ||
| 44 | return nil, err | 44 | return nil, err |
| 45 | } | 45 | } |
| 46 | queryFunc := func() (interface{}, error) { | 46 | queryFunc := func() (interface{}, error) { |
| 47 | - tx = tx.Model(m).Updates(m) | 47 | + tx = tx.Model(m).Save(m) |
| 48 | return nil, tx.Error | 48 | return nil, tx.Error |
| 49 | } | 49 | } |
| 50 | if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil { | 50 | if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil { |
| @@ -42,7 +42,7 @@ func (repository *ArticleSectionRepository) Update(ctx context.Context, conn tra | @@ -42,7 +42,7 @@ func (repository *ArticleSectionRepository) Update(ctx context.Context, conn tra | ||
| 42 | return nil, err | 42 | return nil, err |
| 43 | } | 43 | } |
| 44 | queryFunc := func() (interface{}, error) { | 44 | queryFunc := func() (interface{}, error) { |
| 45 | - tx = tx.Model(m).Updates(m) | 45 | + tx = tx.Model(m).Save(m) |
| 46 | return nil, tx.Error | 46 | return nil, tx.Error |
| 47 | } | 47 | } |
| 48 | if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil { | 48 | if _, err = repository.Query(queryFunc, m.CacheKeyFunc()); err != nil { |
-
请 注册 或 登录 后发表评论