fix 修复watch没有被正常设置的bug
Some checks failed
Build image / build (push) Failing after 13s

This commit is contained in:
timerzz 2024-04-13 09:31:21 +08:00
parent 1f51aeb783
commit 13a5f51c31

View File

@ -120,6 +120,7 @@ func (c *CoachOutlet) Watch() {
if !inventory.AllocationResetDate.IsZero() {
c.detail.AllocationResetDate = inventory.AllocationResetDate
}
c.detail.Watch = true
if c.detail.Orderable {
c.detail.Watch = false
c.detail.AllocationResetDate = time.Now()
@ -207,6 +208,7 @@ func (c *CoachOutlet) requestProductDetail(ctx context.Context) error {
c.detail = resp.ProductData[0].Product()
c.detail.Remark = c.cfg.Remark
c.detail.Link = fmt.Sprintf("https://www.coachoutlet.com%s", c.detail.Link)
c.detail.Watch = true
if c.detail.Orderable {
c.detail.Watch = false
if c.detail.AllocationResetDate.IsZero() {