From 41c410701424ab09f08038ec6261b82f1abc4f56 Mon Sep 17 00:00:00 2001 From: timerzz Date: Wed, 15 May 2024 19:48:39 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=8A=93=E5=8F=96=E6=97=B6=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=8A=98=E6=89=A3=E5=8A=9B=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 2 +- go.sum | 2 ++ product/controller.go | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index d90d7dc..5714ee1 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index cfd2ba0..8298439 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/product/controller.go b/product/controller.go index 4f6a277..de837d5 100644 --- a/product/controller.go +++ b/product/controller.go @@ -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,