fix 修复抓取时没有更新price_status和disc_percent的bug
All checks were successful
Build image / build (push) Successful in 1m33s

This commit is contained in:
timerzz 2024-05-15 20:00:54 +08:00
parent 41c4107014
commit 3eeed3d11a

View File

@ -109,6 +109,6 @@ func (c *Controller) saveRespData(list []coach_client.Product) error {
})
return c.db.Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "pid"}},
DoUpdates: clause.AssignmentColumns([]string{"name", "color", "link", "orderable", "us_price", "cny_price", "cal_mark", "rate"}),
DoUpdates: clause.AssignmentColumns([]string{"name", "color", "link", "orderable", "us_price", "cny_price", "cal_mark", "rate", "price_status", "disc_percent"}),
}).Create(products).Error
}