From e52227de9bdc91a8b1dbf25f36a78eb1dce3d70a Mon Sep 17 00:00:00 2001 From: timerzz Date: Mon, 29 Jul 2024 22:02:28 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=88=A4=E6=96=AD=E6=9C=89=E8=B4=A7?= =?UTF-8?q?=E6=89=8D=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spider/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spider/controller.go b/spider/controller.go index ee89fbf..2351e17 100644 --- a/spider/controller.go +++ b/spider/controller.go @@ -97,7 +97,7 @@ func (c *Controller) Crawl() error { if err = c.db.Select("rate", "dw_price").Updates(&product).Error; err != nil { slog.Warn(fmt.Sprintf("更新pid:%s的数据库失败:%v", product.Pid, err)) } - if product.Rate >= 15 { + if product.Rate >= 15 && product.Orderable { c.Push(fmt.Sprintf("%s 的收益率达到%.2f%%", product.Pid, product.Rate), fmt.Sprintf("%s 的成本为%.2f, 得物收益为%.2f, 收益率为%.2f%%, 链接:%s", product.Pid, product.CNYPrice, product.DWPrice, product.Rate, product.Link)) }