feat 抓取时保存折扣力度
All checks were successful
Build image / build (push) Successful in 1m29s

This commit is contained in:
timerzz 2024-05-15 19:48:39 +08:00
parent 48f65937ab
commit 41c4107014
3 changed files with 5 additions and 2 deletions

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.22.2
toolchain go1.22.3
require (
gitea.timerzz.com/kedaya_haitao/common v0.0.0-20240515055453-202f8a89111a
gitea.timerzz.com/kedaya_haitao/common v0.0.0-20240515114301-570e19d76c1a
github.com/go-resty/resty/v2 v2.13.1
github.com/gofiber/fiber/v3 v3.0.0-beta.2
github.com/golang/glog v1.2.1

2
go.sum
View File

@ -1,6 +1,8 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
gitea.timerzz.com/kedaya_haitao/common v0.0.0-20240515055453-202f8a89111a h1:D1yaUoTNJ1GyPzrVzrqFr8MBrOS/IpfyMg5kjE8diwk=
gitea.timerzz.com/kedaya_haitao/common v0.0.0-20240515055453-202f8a89111a/go.mod h1:cgLy4gB0z2UZD3kBp1IAemt28dkaKNdt4RC0LNkE1I8=
gitea.timerzz.com/kedaya_haitao/common v0.0.0-20240515114301-570e19d76c1a h1:lmhF73Y8SSwNntZzOFwVrSP2Y0UOh9l8anHr6lBQ/xI=
gitea.timerzz.com/kedaya_haitao/common v0.0.0-20240515114301-570e19d76c1a/go.mod h1:cgLy4gB0z2UZD3kBp1IAemt28dkaKNdt4RC0LNkE1I8=
github.com/3andne/restls-client-go v0.1.6 h1:tRx/YilqW7iHpgmEL4E1D8dAsuB0tFF3uvncS+B6I08=
github.com/3andne/restls-client-go v0.1.6/go.mod h1:iEdTZNt9kzPIxjIGSMScUFSBrUH6bFRNg0BWlP4orEY=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=

View File

@ -95,7 +95,8 @@ func (c *Controller) saveRespData(list []coach_client.Product) error {
Color: color.Text,
Link: fmt.Sprintf("%s/%s", "https://www.coachoutlet.com", color.Url),
Image: color.Media.Thumbnail.Src,
Orderable: price.OnSale,
Orderable: color.Orderable,
DiscPercent: int(price.Price.MarkdownDiscPercent),
USPrice: price.Price.Sales.Value,
Freight: c.Freight,
ExchangeRate: c.ExchangeRate,