feat 更新provider article时,更新库存
This commit is contained in:
parent
8bd70ec18d
commit
217039202d
@ -89,7 +89,7 @@ func (p *providerArticleApi) Get(query *GetProviderArticleQuery) (article v2.Pro
|
||||
func (p *providerArticleApi) Upsert(article v2.ProviderArticle) error {
|
||||
if err := p.db.Clauses(clause.OnConflict{
|
||||
Columns: []clause.Column{{Name: "provider_id"}, {Name: "sku_id"}},
|
||||
DoUpdates: clause.AssignmentColumns([]string{"cost", "available", "updated_at"}),
|
||||
DoUpdates: clause.AssignmentColumns([]string{"cost", "available", "updated_at", "ast"}),
|
||||
}).Create(&article).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user